Conversation
This comment has been minimized.
This comment has been minimized.
|
|
||
| type t = | ||
| | Exercises of (id * Meta.t option) list | ||
| | Exercises of (id * Meta.t option * Subindex.t option) list |
There was a problem hiding this comment.
As the Subindex.t type already contains a Meta.t, I'd suggest refactoring this type into 3 constructors
(to avoid by construction the "case that can't occur" :)
Hoping this small refactoring won't have any impact on the rest!
src/state/learnocaml_data.mli
Outdated
|
|
||
| val enc: t Json_encoding.encoding | ||
|
|
||
| val sub_enc: t Json_encoding.encoding |
There was a problem hiding this comment.
As discussed in our meeting, you should be able to remove that line (enforcing that there is a learnocaml_version: "2" in subindex.json? - I've just updated #331 (comment))
| module Subindex = struct | ||
| include Exercise.Subindex | ||
|
|
||
| (*let get_from_subindex subindex = | ||
| Exercise.Subindex*) | ||
| end |
There was a problem hiding this comment.
unused code? (to be removed in that case)
src/repo/learnocaml_exercise.ml
Outdated
|
|
||
|
|
||
| type t = | ||
| | Subexercise of (id * exercise list) |
There was a problem hiding this comment.
As a reminder: this type should be refined to include the boolean student_hidden and the weights (student_weight, teacher_weight)
There was a problem hiding this comment.
(as well as the boolean check_all_against)
| Lwt_list.map_p | ||
| (fun exo -> Grader_cli.grade ?print_result ?dirname meta | ||
| (Learnocaml_exercise.Exercise exo) output_json) | ||
| exs |
There was a problem hiding this comment.
and just to recap, here you'll probably implement the check_all_against feature
let's say that if you have [ex1; ex2; ex3; exall] with "check_all_against": "exall", you'd grade
[ex1; ex1_with_exall_tests; ex2; ex2_with_exall_tests; ex3; ex3_with_exall_tests; exall].
Does this sound OK for you @YoanwM ?
| (** Returns an HTML string expected to be put in an iframe *) | ||
| val exercise_text: | ||
| Exercise.Meta.t -> Exercise.t -> string | ||
| Exercise.Meta.t -> Learnocaml_exercise.t -> string |
There was a problem hiding this comment.
is this legit? (I'm not saying this is not the case 🙂 but we'll just need to have a look)
…learnocaml_v3 * 'learnocaml_v3' of github.com:pfitaxel/learn-ocaml: New exercise version
This PR implements the feature requests #331 and #395.
(Direct link to the specification of
subindex.json)