From 30c10357656761c8af6d0b491330f78a98282f80 Mon Sep 17 00:00:00 2001 From: russell-rozenbaum Date: Mon, 5 Aug 2024 11:58:38 -0400 Subject: [PATCH] fixed bugs with some editors not being disabled when editing title --- src/haz3lschool/Exercise.re | 10 ++++++++++ src/haz3lweb/Store.re | 2 -- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/haz3lschool/Exercise.re b/src/haz3lschool/Exercise.re index 8bacf9e04c..276ce8d3d3 100644 --- a/src/haz3lschool/Exercise.re +++ b/src/haz3lschool/Exercise.re @@ -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), }, }; diff --git a/src/haz3lweb/Store.re b/src/haz3lweb/Store.re index 942c3e03bf..8d20b6294f 100644 --- a/src/haz3lweb/Store.re +++ b/src/haz3lweb/Store.re @@ -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) =>