|
1 | 1 | <?php
|
2 |
| -$devoir = App\Models\Devoir::where('jeton_secret', $jeton_secret)->first(); |
| 2 | +//$devoir = App\Models\Devoir::where('jeton_secret', $jeton_secret)->first(); |
| 3 | +$devoir = App\Models\Devoir::find(Crypt::decryptString($devoir_id)); |
3 | 4 | if (!$devoir){
|
4 | 5 | echo "<pre>Cet entraînement n'existe pas</pre>";
|
5 | 6 | exit();
|
6 | 7 | }
|
7 |
| -$devoir_eleves = App\Models\Devoir_eleve::where('jeton_devoir', $devoir->jeton)->orderBy('pseudo')->get(); |
| 8 | +$devoir_eleves = App\Models\Copie::where('jeton_devoir', $devoir->jeton)->orderBy('pseudo')->get(); |
8 | 9 | ?>
|
9 | 10 | <!doctype html>
|
10 | 11 | <html lang="fr">
|
|
44 | 45 | </style>
|
45 | 46 | <title>ENTRAÎNEMENT / DEVOIR | {{$devoir->jeton}} | IMPRIMER</title>
|
46 | 47 | </head>
|
47 |
| -<body class="no-mathjax"> |
| 48 | +<body> |
48 | 49 |
|
49 | 50 | <div id="header" class="container pt-3">
|
50 | 51 | <div class="row pt-3">
|
51 | 52 | <div class="col-md-2">
|
52 | 53 | <div class="text-right mb-3">
|
53 |
| - <a class="btn btn-light btn-sm" href="/devoir-console/{{strtoupper($jeton_secret)}}" role="button"><i class="fas fa-arrow-left"></i></a> |
| 54 | + <a class="btn btn-light btn-sm" href="/devoir-console/{{ $devoir->jeton_secret }}" role="button"><i class="fas fa-arrow-left"></i></a> |
54 | 55 | </div>
|
55 | 56 | </div>
|
56 | 57 | <div class="col-md-8">
|
|
67 | 68 |
|
68 | 69 | <!-- CONSIGNES -->
|
69 | 70 | <div class="text-monospace mt-3">{{strtoupper(__('consignes'))}}</div>
|
70 |
| - <div class="mathjax" style="padding:10px 15px 0px 15px;border-radius:4px;border:solid 1px gray;background-color:white;"> |
71 |
| - <?php |
72 |
| - include('lib/parsedownmath/ParsedownMath.php'); |
73 |
| - $Parsedown = new ParsedownMath([ |
74 |
| - 'math' => [ |
75 |
| - 'enabled' => true, // Write true to enable the module |
76 |
| - 'matchSingleDollar' => true // default false |
77 |
| - ] |
78 |
| - ]); |
79 |
| - echo $Parsedown->text($devoir->consignes_eleve); |
80 |
| - ?> |
81 |
| - </div> |
| 71 | + <div class="markdown_content" style="padding:10px 15px 0px 15px;border-radius:4px;border:solid 1px gray;background-color:white;">{{ $devoir->consignes_eleve }}</div> |
82 | 72 | <!-- CONSIGNES -->
|
83 | 73 |
|
84 | 74 | <!-- SOLUTION -->
|
|
113 | 103 |
|
114 | 104 | <!-- CONSIGNES -->
|
115 | 105 | <div class="text-monospace mt-3">{{strtoupper(__('consignes'))}}</div>
|
116 |
| - <div class="mathjax" style="padding:12px 15px 0px 15px;border-radius:4px;border:solid 1px gray;background-color:white;"> |
117 |
| - <?php |
118 |
| - $Parsedown = new ParsedownMath([ |
119 |
| - 'math' => [ |
120 |
| - 'enabled' => true, // Write true to enable the module |
121 |
| - 'matchSingleDollar' => true // default false |
122 |
| - ] |
123 |
| - ]); |
124 |
| - echo $Parsedown->text($devoir->consignes_eleve); |
125 |
| - ?> |
126 |
| - </div> |
| 106 | + <div class="markdown_content" style="padding:12px 15px 0px 15px;border-radius:4px;border:solid 1px gray;background-color:white;">{{ $devoir->consignes_eleve }}</div> |
127 | 107 | <!-- CONSIGNES -->
|
128 | 108 |
|
129 | 109 | <!-- CODE ELEVE -->
|
|
152 | 132 | {{-- /PRINT --}}
|
153 | 133 |
|
154 | 134 | @include('inc-bottom-js')
|
| 135 | + @include('markdown/inc-markdown-afficher-js') |
155 | 136 |
|
156 |
| - <script> |
157 |
| - MathJax = { |
158 |
| - tex: { |
159 |
| - inlineMath: [['$', '$'], ['\\(', '\\)']], |
160 |
| - displayMath: [ ['$$','$$'], ["\\[","\\]"] ], |
161 |
| - processEscapes: true |
162 |
| - }, |
163 |
| - options: { |
164 |
| - ignoreHtmlClass: "no-mathjax", |
165 |
| - processHtmlClass: "mathjax" |
166 |
| - } |
167 |
| - }; |
168 |
| - </script> |
169 |
| - <script type="text/javascript" id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script> |
| 137 | + |
170 | 138 |
|
171 | 139 |
|
172 | 140 | <script src="{{ asset('js/ace/ace.js') }}" type="text/javascript" charset="utf-8"></script>
|
|
0 commit comments