Skip to content

Commit 5ebb02d

Browse files
authored
Merge pull request #439 from AltGr/fixes
A few fixes, in particular for student follow-up on new repos
2 parents 2b7f304 + 3962166 commit 5ebb02d

10 files changed

+25
-22
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ translations/$(LANGS:=.pot):
3838
@for f in $(LANGS); do echo >> translations/$$f.po; done
3939
@rm -f translations/*.pot
4040
@${DUNE} clean ${DUNE_ARGS}
41+
-rm -f ${INDEX_ODOC_PATH}
4142
@DUMP_POT=1 ${DUNE} build ${DUNE_ARGS} -j 1
4243
@for f in $(LANGS); do \
4344
mv translations/$$f.pot translations/$$f.pot.bak; \

src/app/learnocaml_exercise_main.ml

+3-2
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ let () =
223223
Manip.Ev.onclick btn (fun _ -> Lwt.wakeup u () ; true) ;
224224
let div =
225225
Tyxml_js.Html5.(div ~a: [ a_class [ "dialog" ] ]
226-
[ txt [%i"Grading is taking a lot of time, "] ;
226+
[ txt [%i"Grading is taking a lot of time, \
227+
maybe your code is looping? "] ;
227228
btn ;
228229
txt " ?" ]) in
229230
Manip.SetCss.opacity div (Some "0") ;
@@ -249,7 +250,7 @@ let () =
249250
Lwt.return_unit)
250251
in
251252
let abortion =
252-
Lwt_js.sleep 5. >>= fun () ->
253+
Lwt_js.sleep 15. >>= fun () ->
253254
Manip.SetCss.opacity abort_message (Some "1") ;
254255
aborted >>= fun () ->
255256
Lwt.return Learnocaml_report.[ Message ([ Text [%i"Grading aborted by user."] ], Failure) ] in

src/state/learnocaml_store.ml

+6-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,12 @@ module Exercise = struct
203203
List.iter (fun st -> Hashtbl.add tbl st.id st) l;
204204
tbl)
205205
@@ function
206-
| Unix.Unix_error (Unix.ENOENT, _, _) -> Lwt.return tbl
206+
| Unix.Unix_error (Unix.ENOENT, _, _) ->
207+
Lazy.force !index >>= fun index ->
208+
Exercise.Index.fold_exercises (fun () id _ ->
209+
Hashtbl.add tbl id (Exercise.Status.default id))
210+
() index;
211+
Lwt.return tbl
207212
| e -> Lwt.fail e
208213
)
209214

static/description.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@
4242
<!-- Anything below could be recreated dynamically, but IDs must be kept. -->
4343
<div id="learnocaml-exo-toolbar">
4444
<div class="logo">
45-
<img src="/icons/logo_ocaml.svg">
46-
<span>Learn OCaml</span>
4745
<img src="/icons/logo_ocsf.svg">
46+
<span>Learn OCaml</span>
4847
</div>
4948
</div>
5049
<div id="learnocaml-exo-tab-buttons">

static/exercise.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
<div id="learnocaml-exo-toolbar">
4040
<a href="/">
4141
<div class ="logo">
42-
<img src="/icons/logo_ocaml.svg">
43-
<span>Learn OCaml</span>
4442
<img src="/icons/logo_ocsf.svg">
43+
<!-- <img src="/icons/logo_ocaml.svg"> -->
44+
<span>Learn OCaml</span>
4545
</div>
4646
</a>
4747
<!--

static/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</div>
2424
<div id="learnocaml-main-toolbar">
2525
<div class="logo">
26-
<img src="/icons/logo_ocaml.svg">
26+
<img src="/icons/logo_ocsf.svg">
2727
<span>Learn OCaml</span>
2828
</div>
2929
</div>

static/partition-view.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@
3838
<!-- Anything below could be recreated dynamically, but IDs must be kept. -->
3939
<div id="learnocaml-exo-toolbar">
4040
<div class="logo">
41-
<img src="/icons/logo_ocaml.svg">
42-
<span>Learn OCaml</span>
4341
<img src="/icons/logo_ocsf.svg">
42+
<span>Learn OCaml</span>
4443
</div>
4544
<div id="learnocaml-token">
4645
</div>

static/playground.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@
3838
<div id="learnocaml-exo-toolbar">
3939
<a href="/">
4040
<div class ="logo">
41-
<img src="/icons/logo_ocaml.svg">
42-
<span>Learn OCaml</span>
4341
<img src="/icons/logo_ocsf.svg">
42+
<span>Learn OCaml</span>
4443
</div>
4544
</a>
4645
<!--

static/student-view.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@
3838
<!-- Anything below could be recreated dynamically, but IDs must be kept. -->
3939
<div id="learnocaml-exo-toolbar">
4040
<div class="logo">
41-
<img src="/icons/logo_ocaml.svg">
42-
<span>Learn OCaml</span>
4341
<img src="/icons/logo_ocsf.svg">
42+
<span>Learn OCaml</span>
4443
</div>
4544
<!--
4645
<button id="learnocaml-exo-button-grade">

translations/fr.po

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
msgid ""
66
msgstr ""
77
"Project-Id-Version: learn-ocaml ~dev\n"
8-
"PO-Revision-Date: 2021-10-01 01:00+0200\n"
8+
"PO-Revision-Date: 2021-10-11 15:30+0200\n"
99
"Last-Translator: Louis Gesbert <[email protected]>\n"
1010
"Language-Team: OCamlPro\n"
1111
"Language: french\n"
@@ -747,23 +747,23 @@ msgstr "Noter!"
747747
msgid "abort"
748748
msgstr "abandonner"
749749

750-
#: File "src/app/learnocaml_exercise_main.ml", line 226, characters 35-70
751-
msgid "Grading is taking a lot of time, "
752-
msgstr "La notation prend longtemps, "
750+
#: File "src/app/learnocaml_exercise_main.ml", lines 226-227, characters 35-65
751+
msgid "Grading is taking a lot of time, maybe your code is looping? "
752+
msgstr "La notation prend du temps, peut-être une boucle infinie dans votre code ? "
753753

754-
#: File "src/app/learnocaml_exercise_main.ml", line 232, characters 35-57
754+
#: File "src/app/learnocaml_exercise_main.ml", line 233, characters 35-57
755755
msgid "Launching the grader"
756756
msgstr "Lancement de la notation"
757757

758-
#: File "src/app/learnocaml_exercise_main.ml", line 255, characters 60-86
758+
#: File "src/app/learnocaml_exercise_main.ml", line 256, characters 60-86
759759
msgid "Grading aborted by user."
760760
msgstr "Notation annulée par l'utilisateur."
761761

762-
#: File "src/app/learnocaml_exercise_main.ml", line 276, characters 38-59
762+
#: File "src/app/learnocaml_exercise_main.ml", line 277, characters 38-59
763763
msgid "Error in your code."
764764
msgstr "Erreur dans le code."
765765

766-
#: File "src/app/learnocaml_exercise_main.ml", line 277, characters 27-85
766+
#: File "src/app/learnocaml_exercise_main.ml", line 278, characters 27-85
767767
msgid "Cannot start the grader if your code does not typecheck."
768768
msgstr "La notation ne peut être lancée si le code ne compile pas."
769769

0 commit comments

Comments
 (0)