- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::formfield::grade_boundary
::xowiki::formfield::grade_boundary create ...
Class Relations
::xotcl::Class create ::xowiki::formfield::grade_boundary \ -superclass ::xowiki::formfield::numberMethods (to be applied on instances)
render_input (scripted)
# # The definition of this validator assumes 4 grade boundaries with # exactly these naming conventions. The corresponding form is # defined in edit-grading-scheme.wf. # next template::add_event_listener -event input -id ${:id} -script { const inputField = event.target; const form = inputField.parentNode.parentNode; //console.log('check descending values'); const grade1 = form.elements["grade1"]; const grade2 = form.elements["grade2"]; const grade3 = form.elements["grade3"]; const grade4 = form.elements["grade4"]; if (grade1.value < grade2.value) { console.log('error grade 1'); grade2.setCustomValidity('percentage for grade 1 must by larger than grade 2'); } else { grade2.setCustomValidity(''); } if (grade2.value < grade3.value) { console.log('error grade 2'); grade3.setCustomValidity('percentage for grade 2 must by larger than grade 3'); } else { grade3.setCustomValidity(''); } if (grade3.value < grade4.value) { console.log('error grade 3'); grade4.setCustomValidity('percentage for grade 3 must by larger than grade 4'); } else { grade4.setCustomValidity(''); } }
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables