@@ -117,6 +117,7 @@
var isMobile = @mobile_p;literal@;
var nextLabel = "#acs-kernel.common_Next#";
var submitLabel = "#proctoring-support.wizard_finish#";
+ var acceptLabel = "#proctoring-support.accept#";
var blackPictureSizeThreshold = 24000; // kbytes
Index: openacs-4/packages/proctoring-support/www/resources/proctored-page.js
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/www/resources/proctored-page.js,v
diff -u -r1.1.2.4 -r1.1.2.5
--- openacs-4/packages/proctoring-support/www/resources/proctored-page.js 18 Aug 2020 12:46:10 -0000 1.1.2.4
+++ openacs-4/packages/proctoring-support/www/resources/proctored-page.js 28 Aug 2020 13:33:40 -0000 1.1.2.5
@@ -174,9 +174,6 @@
var streams = [];
var handlers = [];
-if (hasExaminationStatement) {
- handlers.push(approveStartExam);
-}
if (hasProctoring) {
handlers.push(function () {
clearError();
@@ -290,16 +287,22 @@
});
});
}
+if (hasExaminationStatement) {
+ handlers.push(function () {
+ var acceptButton = document.getElementById("nextBtn");
+ acceptButton.innerHTML = acceptLabel;
+ var clickHandler = function(e) {
+ approveStartExam();
+ this.removeEventListener("click", clickHandler);
+ };
+ acceptButton.addEventListener("click", clickHandler);
+ });
+}
function showTab(n) {
// This function will display the specified tab of the form...
var x = document.getElementsByClassName("tab");
x[n].style.display = "block";
- if (typeof handlers[n] == "function") {
- handlers[n]();
- } else {
- valid = true;
- }
//... and fix the Previous/Next buttons:
if (n == 0) {
document.getElementById("prevBtn").style.display = "none";
@@ -312,7 +315,13 @@
document.getElementById("nextBtn").innerHTML = nextLabel;
}
//... and run a function that will display the correct step indicator:
- fixStepIndicator(n)
+ fixStepIndicator(n);
+
+ if (typeof handlers[n] == "function") {
+ handlers[n]();
+ } else {
+ valid = true;
+ }
}
var errorEl = document.querySelector("#error-message");