Index: lams_tool_scratchie/web/pages/authoring/basic.jsp
===================================================================
diff -u -r7b67ac0353336da9b914a82d30936b7ffe49c534 -r93b29b60866bf8f0de5d1e845128e01dd7a06026
--- lams_tool_scratchie/web/pages/authoring/basic.jsp (.../basic.jsp) (revision 7b67ac0353336da9b914a82d30936b7ffe49c534)
+++ lams_tool_scratchie/web/pages/authoring/basic.jsp (.../basic.jsp) (revision 93b29b60866bf8f0de5d1e845128e01dd7a06026)
@@ -69,7 +69,7 @@
);
}
- function changeItemQuestionVersion(itemIndex, newQbQuestionUid) {
+ function changeItemQuestionVersion(itemIndex, oldQbQuestionUid, newQbQuestionUid) {
var url = "";
$(itemTargetDiv).load(
url,
@@ -80,6 +80,17 @@
},
function(){
refreshThickbox();
+
+ // check if we are in main authoring environment
+ if (typeof window.parent.GeneralLib != 'undefined') {
+ // check if any other activities require updating
+ let activitiesWithQuestion = window.parent.GeneralLib.checkQuestionExistsInToolActivities(oldQbQuestionUid);
+ if (activitiesWithQuestion.length > 1) {
+ // update, if teacher agrees to it
+ window.parent.GeneralLib.replaceQuestionInToolActivities('${sessionMap.toolContentID}', activitiesWithQuestion,
+ oldQbQuestionUid, newQbQuestionUid);
+ }
+ }
}
);
}
Index: lams_tool_scratchie/web/pages/authoring/parts/itemlist.jsp
===================================================================
diff -u -r7b67ac0353336da9b914a82d30936b7ffe49c534 -r93b29b60866bf8f0de5d1e845128e01dd7a06026
--- lams_tool_scratchie/web/pages/authoring/parts/itemlist.jsp (.../itemlist.jsp) (revision 7b67ac0353336da9b914a82d30936b7ffe49c534)
+++ lams_tool_scratchie/web/pages/authoring/parts/itemlist.jsp (.../itemlist.jsp) (revision 93b29b60866bf8f0de5d1e845128e01dd7a06026)
@@ -94,7 +94,9 @@
class="disabled">
- Version ${otherVersion.key}
+
+ Version ${otherVersion.key}
+