Skip to content

Commit

Permalink
fixed bugs with some editors not being disabled when editing title
Browse files Browse the repository at this point in the history
  • Loading branch information
russell-rozenbaum committed Aug 5, 2024
1 parent 0ab1240 commit 30c1035
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/haz3lschool/Exercise.re
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,16 @@ module F = (ExerciseEnv: ExerciseEnv) => {
provided: eds.your_tests.provided,
};
},
hidden_bugs:
eds.hidden_bugs
|> List.map(({impl, hint}) => {
let impl = Editor.set_read_only(impl, editing);
{impl, hint};
}),
hidden_tests: {
let tests = Editor.set_read_only(eds.hidden_tests.tests, editing);
{tests, hints: eds.hidden_tests.hints};
},
your_impl: Editor.set_read_only(eds.your_impl, editing),
},
};
Expand Down
2 changes: 0 additions & 2 deletions src/haz3lweb/Store.re
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ module Exercise = {
};

let load_exercise = (spec, ~instructor_mode, ~editing_title): Exercise.state => {
print_string("ID at load: ");
print_endline(Id.to_string(spec.id));
let keystring = Id.to_string(spec.id);
switch (JsUtil.get_localstore(keystring)) {
| Some(data) =>
Expand Down

0 comments on commit 30c1035

Please sign in to comment.