Index: openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml,v diff -u -N -r1.2.2.64 -r1.2.2.65 --- openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 20 Dec 2021 17:55:18 -0000 1.2.2.64 +++ openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 27 Dec 2021 14:07:29 -0000 1.2.2.65 @@ -246,6 +246,10 @@ Exportiere Ergebnisse Exportiere Ergebnisse und Kommentare pro Frage - Sind Sie sicher, dass Sie abgeben wollen? Dieser Schritt kann nicht r�ckg�ngig gemacht werden. + Sind Sie sicher, dass Sie abgeben + wollen? Dieser Schritt kann nicht r�ckg�ngig gemacht werden. + + Wert muss kleiner oder gleich sein als + Wert muss gr��er oder gleich sein als Index: openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml,v diff -u -N -r1.2.2.71 -r1.2.2.72 --- openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 20 Dec 2021 17:55:18 -0000 1.2.2.71 +++ openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 27 Dec 2021 14:07:29 -0000 1.2.2.72 @@ -275,4 +275,8 @@ Export results and comments per question Are you sure you want to submit? This step cannot be undone. + + Value must smaller or equal + Value must larger or equal + Index: openacs-4/packages/xowf/tcl/test-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/test-item-procs.tcl,v diff -u -N -r1.7.2.188 -r1.7.2.189 --- openacs-4/packages/xowf/tcl/test-item-procs.tcl 21 Dec 2021 08:12:34 -0000 1.7.2.188 +++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 27 Dec 2021 14:07:29 -0000 1.7.2.189 @@ -2324,9 +2324,32 @@ // var id = ev.currentTarget.dataset.id; var gradingBox = document.getElementById(id); - var points = document.querySelector('#grading-points').value; + var pointsInput = document.querySelector('#grading-points'); + var helpBlock = document.querySelector('#grading-points-help-block'); var comment = document.querySelector('#grading-comment').value; + var points = pointsInput.value; + var pointsFormGroup = pointsInput.parentElement.parentElement; + if (points != "") { + if(parseFloat(points) > parseFloat(pointsInput.max) || parseFloat(points) < parseFloat(pointsInput.min)){ + if (parseFloat(points) > parseFloat(pointsInput.max)) { + helpBlock.textContent = '[_ xowf.Value_max] ' + pointsInput.max; + } else { + helpBlock.textContent = '[_ xowf.Value_min] ' + pointsInput.min; + } + pointsFormGroup.classList.add('has-error'); + helpBlock.classList.remove('hidden'); + ev.preventDefault(); + return false; + } else { + pointsFormGroup.classList.remove('has-error'); + helpBlock.classList.add('hidden'); + } + } else { + pointsFormGroup.removeClass('has-error'); + helpBlock.classList.add('hidden'); + } + document.querySelector('#' + id + ' .points').textContent = points; document.querySelector('#' + id + ' .comment').textContent = comment; gradingBox.dataset.achieved = points; @@ -2413,7 +2436,8 @@ | |
| + | type="number" step="0.1" min="0"> + | |
| |
@@ -5480,6 +5504,8 @@ set autoGrade 0 } #ns_log notice "question_info [$form_obj name] [$form_obj title] autoGrade $autoGrade" + } else { + set autoGrade 0 } return $autoGrade }