Index: lams_tool_scratchie/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -rf54c292e64bc98100d0bdaf34f361bb5e786bde4 -r2265c2e9ad0c8a27f390fcfc67769877b8c651d9 --- lams_tool_scratchie/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision f54c292e64bc98100d0bdaf34f361bb5e786bde4) +++ lams_tool_scratchie/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 2265c2e9ad0c8a27f390fcfc67769877b8c651d9) @@ -275,6 +275,9 @@ label.authoring.advanced.reveal.double.click = Require double click to reveal an answer label.learning.reveal.double.click = Note: you need to double click on an answer to reveal its result. label.authoring.advanced.reveal.double.click.tooltip = When this option is enabled, leaders will require to double click on an answer in order to reveal the result. This option might be useful for summative assessments. +label.authoring.advanced.require.all.answers = Require to reveal all correct answers before proceeding +label.authoring.advanced.require.all.answers.tooltip = When this option is enabled, leaders will require to find all the correct answers in multiple choice questions before they can complete the activity. Otherwise they will be only presented with a warning if no all correct answers are found. +label.learning.require.all.answers = Make sure you find all the correct answers for multiple choice questions before finishing. label.monitoring.change.leader = Change leader label.monitoring.leader.successfully.changed = Leader changed label.monitoring.leader.not.changed = Leader was not changed Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dbupdates/patch20230220.sql =================================================================== diff -u --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dbupdates/patch20230220.sql (revision 0) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dbupdates/patch20230220.sql (revision 2265c2e9ad0c8a27f390fcfc67769877b8c651d9) @@ -0,0 +1,14 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +-- Put all sql statements below here + +-- LDEV-5361 Add option to prevent learners from advancing if they have not found all answers +ALTER TABLE tl_lascrt11_scratchie ADD COLUMN require_all_answers TINYINT DEFAULT '1' AFTER double_click; + +-- Put all sql statements above here + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/model/Scratchie.java =================================================================== diff -u -r6fc452ae5cdbca9476f14a97ddc933a23fd8776a -r2265c2e9ad0c8a27f390fcfc67769877b8c651d9 --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/model/Scratchie.java (.../Scratchie.java) (revision 6fc452ae5cdbca9476f14a97ddc933a23fd8776a) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/model/Scratchie.java (.../Scratchie.java) (revision 2265c2e9ad0c8a27f390fcfc67769877b8c651d9) @@ -112,6 +112,9 @@ @Column(name = "double_click") private boolean revealOnDoubleClick; + @Column(name = "require_all_answers") + private boolean requireAllAnswers; + @Column(name = "confidence_levels_activity_uiid") private Integer confidenceLevelsActivityUiid; @@ -212,17 +215,13 @@ /** * Returns the object's creation date * - * @return date - * */ public Date getCreated() { return created; } /** * Sets the object's creation date - * - * @param created */ public void setCreated(Date created) { this.created = created; @@ -409,6 +408,14 @@ this.revealOnDoubleClick = revealOnDoubleClick; } + public boolean isRequireAllAnswers() { + return requireAllAnswers; + } + + public void setRequireAllAnswers(boolean requireAllAnswers) { + this.requireAllAnswers = requireAllAnswers; + } + /** * @return which preceding activity should be queried for confidence levels */ Index: lams_tool_scratchie/web/pages/authoring/advance.jsp =================================================================== diff -u -r7276ea4054a0e0a542c4845123b24ec0b5a1e195 -r2265c2e9ad0c8a27f390fcfc67769877b8c651d9 --- lams_tool_scratchie/web/pages/authoring/advance.jsp (.../advance.jsp) (revision 7276ea4054a0e0a542c4845123b24ec0b5a1e195) +++ lams_tool_scratchie/web/pages/authoring/advance.jsp (.../advance.jsp) (revision 2265c2e9ad0c8a27f390fcfc67769877b8c651d9) @@ -105,8 +105,18 @@ - "> + "> + +
+ + "> +