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.218 -r1.7.2.219 --- openacs-4/packages/xowf/tcl/test-item-procs.tcl 25 Feb 2022 13:09:13 -0000 1.7.2.218 +++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 28 Feb 2022 18:17:42 -0000 1.7.2.219 @@ -203,7 +203,7 @@ # value of :feedback_level. # set widget [test_item set richtextWidget] - + switch ${:feedback_level} { "none" { set definition "" @@ -3199,6 +3199,18 @@ } # + # The aggregated form (method :aggregated_form) is generated + # before submissions are available. For e.g., the exam protocol, + # the same grading-box with the same raw data will be reused + # potentially per submission. To ensure uniqueness of the HTML + # IDs for the dialogs, we have to fill in the submission IDs. + # + set grading_boxes [$root selectNodes {//div[contains(@class,'grading-box')]}] + foreach grading_box $grading_boxes { + $grading_box setAttribute id [$grading_box getAttribute id]-[$submission item_id] + } + + # # For every composite question: # # - update the question_name of the subquestion by prefixing it @@ -3228,7 +3240,7 @@ #set noManualGrading [expr {$submission_state ne "done" || $exam_state eq "published"}] set noManualGrading [expr {$exam_state eq "published"}] - set grading_boxes [${root} selectNodes {//div[contains(@class,'grading-box')]}] + set grading_boxes [$root selectNodes {//div[contains(@class,'grading-box')]}] foreach grading_box $grading_boxes { set qn [$grading_box getAttribute "data-question_name"] set item_node [$grading_box parentNode]