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.48 -r1.2.2.49
--- openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 23 Apr 2021 17:56:16 -0000 1.2.2.48
+++ openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 24 Apr 2021 19:31:34 -0000 1.2.2.49
@@ -214,4 +214,8 @@
$question_info" - util_user_message -html -message $msg - } + foreach chunk [::xowf::test_item::question_manager describe_form -asHTML $form_obj] { + util_user_message -html -message $chunk } return $form_obj } Index: openacs-4/packages/xowf/lib/edit-interaction.wf =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/Attic/edit-interaction.wf,v diff -u -N -r1.1.2.10 -r1.1.2.11 --- openacs-4/packages/xowf/lib/edit-interaction.wf 23 Apr 2021 17:56:16 -0000 1.1.2.10 +++ openacs-4/packages/xowf/lib/edit-interaction.wf 24 Apr 2021 19:31:34 -0000 1.1.2.11 @@ -22,11 +22,11 @@ } Action save -next_state created -label #xowiki.Form-submit_button# -Action tryout -next_state created -label #xowf.Preview# -proc activate {obj} { +Action preview -next_state created -label #xowf.Preview# -proc activate {obj} { # - # The action tryout renders the current test-item (question, + # The action preview renders the current test-item (question, # exercise, ...) the same was as it is shown in an quiz/exam. The - # tryout action uses the workflow "en:answer-single-question.wf" for + # preview action uses the workflow "en:answer-single-question.wf" for # rendering it. The instance for filling out the question is created # as a child object of the test-item. # @@ -69,11 +69,11 @@ ad_script_abort } -State initial -actions {save tryout} +State initial -actions {save preview} State created \ - -actions {save tryout} \ + -actions {save preview} \ -in_role swa { - -actions {save view tryout} + -actions {save view preview} } :proc item_type {obj} { @@ -95,8 +95,8 @@ set form_name [${container} form_name_from_item_type [self]] ${container}::initial form $form_name ${container}::created form $form_name - ${container}::created actions {save tryout} - #${container}::created in_role swa { -actions {save view tryout} } + ${container}::created actions {save preview} + #${container}::created in_role swa { -actions {save view preview} } } # Index: openacs-4/packages/xowf/lib/inclass-exam.wf =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/Attic/inclass-exam.wf,v diff -u -N -r1.1.2.65 -r1.1.2.66 --- openacs-4/packages/xowf/lib/inclass-exam.wf 23 Apr 2021 21:26:13 -0000 1.1.2.65 +++ openacs-4/packages/xowf/lib/inclass-exam.wf 24 Apr 2021 19:31:34 -0000 1.1.2.66 @@ -50,6 +50,7 @@ # - "print-answers" (for lecturers), # - "print-answer-table" (for lecturers), # - "print-participants" (for lecturers), +# - "exam-summary" (for lecturers), # - "delete" (for lecturers), # - "qrcode" (for lecturers) # @@ -169,6 +170,7 @@ :proc load_form {ctx title} { set obj [$ctx object] set state [$obj property _state] + set proctoring [$obj property proctoring 0] set combined_form_info [::xowf::test_item::question_manager combined_question_form -with_numbers $obj] set fullQuestionForm [dict get $combined_form_info form] @@ -177,72 +179,18 @@ #:log fullQuestionForm=$fullQuestionForm set text "
- [expr {$synchronized ? "" : "Non-"}]Synchronized Exam - [expr {$proctoring ? " with Proctoring" : ""}] -
}] - set question_objs [dict get $combined_form_info question_objs] - set nrQuestions [llength $question_objs] - set randomizationOk [dict get $combined_form_info randomization_for_exam] - set autograde [dict get $combined_form_info autograde] - set revision_sets [$obj get_revision_sets] - set published_periods [xowf::test_item::answer_manager state_periods $revision_sets -state published] - set review_periods [xowf::test_item::answer_manager state_periods $revision_sets -state submission_review] - set total_minutes [xowf::test_item::question_manager total_minutes -max_items $max_items $combined_form_info] - set total_points [xowf::test_item::question_manager total_points -max_items $max_items $combined_form_info] - set max_items_msg "" + set text [::xowf::test_item::question_manager exam_info_block \ + -combined_form_info $combined_form_info \ + $obj] + set detail_link [$obj pretty_link -query m=exam-summary] + append text "" - if {$max_items ne ""} { - set all_minutes [lmap t [dict get $combined_form_info title_infos] { - dict get $t minutes - }] - if {[llength [lsort -unique $all_minutes]] != 1} { - set max_items_msg [_ xowf.Max_items_not_ok_duration [list n $max_items]] - } elseif {$max_items > [llength $all_minutes]} { - set max_items_msg [_ xowf.Max_items_not_ok_number [list n $max_items]] - } else { - set max_items_msg [_ xowf.Max_items_ok [list n $max_items]] - } - } - - set time_window_msg "" - if {$time_window ne ""} { - set dtstart [dict get $time_window time_window.dtstart] - if {$dtstart ne ""} { - regsub -all T $dtstart " " dtstart - set dtend [dict get $time_window time_window.dtend] - set time_window_msg
- [expr {$max_items_msg ne "" ? "$max_items_msg" : ""}]
- $nrQuestions [expr {$nrQuestions == 1 ? "#xowf.question#" : "#xowf.questions#"}],
- $total_minutes #xowf.Minutes#, $total_points #xowf.Points#
- [expr {$autograde ? "#xowf.exam_review_possible#" : "#xowf.exam_review_not_possible#"}]
- [expr {$randomizationOk ? "#xowf.randomization_for_exam_ok#" : "#xowf.randomization_for_exam_not_ok#"}]
- [expr {$allow_paste ? "#xowf.Cut_and_paste_allowed#" : "#xowf.Cut_and_paste_not_allowed#"}]
- $time_window_msg
- [expr {[llength $published_periods] > 0 ? "
#xowf.inclass-exam-open#: [join $published_periods {, }]
" : ""}]
- [expr {[llength $review_periods] > 0 ? "#xowf.inclass-exam-review#: [join $review_periods {, }]
" : ""}]
-
$question_info" + lappend msgList "$msg\n" + } + } + return $msgList } + :public method exam_summary {obj} { + # + # Provide a summary of all questions of an exam. + # + set form_objs [:question_objs $obj] + set HTML [subst { +
[ns_quotehtml [$form_obj title]] | +[join $chunk { }] | +
+ [expr {$synchronized ? "" : "Non-"}]Synchronized Exam + [expr {$proctoring ? " with Proctoring" : ""}] +
}] + set question_objs [dict get $combined_form_info question_objs] + set nrQuestions [llength $question_objs] + set randomizationOk [dict get $combined_form_info randomization_for_exam] + set autograde [dict get $combined_form_info autograde] + set revision_sets [$obj get_revision_sets] + set published_periods [xowf::test_item::answer_manager state_periods $revision_sets -state published] + set review_periods [xowf::test_item::answer_manager state_periods $revision_sets -state submission_review] + set total_minutes [:total_minutes -max_items $max_items $combined_form_info] + set total_points [:total_points -max_items $max_items $combined_form_info] + set max_items_msg "" + + if {$max_items ne ""} { + set all_minutes [lmap t [dict get $combined_form_info title_infos] { + dict get $t minutes + }] + if {[llength [lsort -unique $all_minutes]] != 1} { + set max_items_msg [_ xowf.Max_items_not_ok_duration [list n $max_items]] + } elseif {$max_items > [llength $all_minutes]} { + set max_items_msg [_ xowf.Max_items_not_ok_number [list n $max_items]] + } else { + set max_items_msg [_ xowf.Max_items_ok [list n $max_items]] + } + } + + set time_window_msg "" + if {$time_window ne ""} { + set dtstart [dict get $time_window time_window.dtstart] + if {$dtstart ne ""} { + regsub -all T $dtstart " " dtstart + set dtend [dict get $time_window time_window.dtend] + set time_window_msg
+ [expr {$max_items_msg ne "" ? "$max_items_msg" : ""}]
+ $nrQuestions [expr {$nrQuestions == 1 ? "#xowf.question#" : "#xowf.questions#"}],
+ $total_minutes #xowf.Minutes#, $total_points #xowf.Points#
+ [expr {$autograde ? "#xowf.exam_review_possible#" : "#xowf.exam_review_not_possible#"}]
+ [expr {$randomizationOk ? "#xowf.randomization_for_exam_ok#" : "#xowf.randomization_for_exam_not_ok#"}]
+ [expr {$allow_paste ? "#xowf.Cut_and_paste_allowed#" : "#xowf.Cut_and_paste_not_allowed#"}]
+ $time_window_msg
+ [expr {[llength $published_periods] > 0 ? "
#xowf.inclass-exam-open#: [join $published_periods {, }]
" : ""}]
+ [expr {[llength $review_periods] > 0 ? "#xowf.inclass-exam-review#: [join $review_periods {, }]
" : ""}]
+