Index: openacs-4/packages/xowf/xowf.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/xowf.info,v
diff -u -r1.12.2.13 -r1.12.2.14
--- openacs-4/packages/xowf/xowf.info 10 Apr 2020 12:09:23 -0000 1.12.2.13
+++ openacs-4/packages/xowf/xowf.info 22 Apr 2020 19:56:26 -0000 1.12.2.14
@@ -10,15 +10,15 @@
t
xowf
-
+
Gustaf Neumann
XoWiki Content Flow - an XoWiki based workflow system implementing state-based behavior of wiki pages and forms
2017-08-06
WU Vienna
2
-
-
+
+
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 -r1.2.2.24 -r1.2.2.25
--- openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 19 Apr 2020 15:30:45 -0000 1.2.2.24
+++ openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 22 Apr 2020 19:56:26 -0000 1.2.2.25
@@ -151,4 +151,11 @@
Ver�ffentlichung der Pr�fung
seit der Ver�ffentlichung
Erreichte Punkte
+
+ Korrekt
+ automatische Einsicht m�glich
+ automatische Einsicht nicht m�glich
+ Randomisierung f�r Pr�fung geeignet
+ Randomisierung f�r Pr�fung nicht geeignet (keine Zufallsauswahl "immer" verwenden)
+
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 -r1.2.2.22 -r1.2.2.23
--- openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 19 Apr 2020 19:05:36 -0000 1.2.2.22
+++ openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 22 Apr 2020 19:56:26 -0000 1.2.2.23
@@ -172,4 +172,10 @@
Exam Published
since published
Achieved Points
+
+ Correct
+ automated exam review possible
+ automated exam review not possible
+ randomization for exam ok
+ randomization for exam not ok ("always" should not be used)
Index: openacs-4/packages/xowf/lib/inclass-exam.wf
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/inclass-exam.wf,v
diff -u -r1.1.2.22 -r1.1.2.23
--- openacs-4/packages/xowf/lib/inclass-exam.wf 20 Apr 2020 09:46:06 -0000 1.1.2.22
+++ openacs-4/packages/xowf/lib/inclass-exam.wf 22 Apr 2020 19:56:26 -0000 1.1.2.23
@@ -161,10 +161,17 @@
if {$proctoring} {
append text "Exam with Proctoring.
"
}
- set nrQuestions [llength [dict get $combined_form_info title_infos]]
+ 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]
+
append text [subst {
- $nrQuestions [expr {$nrQuestions == 1? "#xowf.question#" : "#xowf.questions#"}],
- [::xowf::test_item::question_manager total_minutes $combined_form_info] #xowf.Minutes#
+ $nrQuestions [expr {$nrQuestions == 1 ? "#xowf.question#" : "#xowf.questions#"}],
+ [::xowf::test_item::question_manager total_minutes $combined_form_info] #xowf.Minutes#,
+ [expr {$autograde ? "#xowf.exam_review_possible#" : "#xowf.exam_review_not_possible#"}],
+ [expr {$randomizationOk ? "#xowf.randomization_for_exam_ok#" : "#xowf.randomization_for_exam_not_ok#"}].
+
}]
set wf [xowf::test_item::answer_manager get_answer_wf $obj]
@@ -176,7 +183,7 @@
set pLink "."
} else {
#
- # Always compute the testrun and answer link.
+ # Always compute the test-run and answer link.
#
set wf_pretty_link [$wf pretty_link]
set tLink [export_vars -base $wf_pretty_link {
@@ -398,6 +405,8 @@
set HTML ""
set heading ""
set as_student [${:package_id} query_parameter as_student:boolean 0]
+ set combined_form_info [::xowf::test_item::question_manager combined_question_form [self]]
+ set autograde [dict get $combined_form_info autograde]
set ctx [::xowf::Context require [self]]
set wf [xowf::test_item::answer_manager get_answer_wf [self]]
@@ -407,7 +416,6 @@
set creation_user [$package_id query_parameter creation_user:integer ""]
set revision_id [$package_id query_parameter rid:integer ""]
-
set items [xowf::test_item::answer_manager get_wf_instances \
{*}[expr {$creation_user ne "" ? "-creation_user $creation_user" : ""}] \
{*}[expr {$filter_id ne "" ? "-item_id $filter_id" : ""}] \
@@ -460,10 +468,10 @@
xo::cc eval_as_user -user_id [$i creation_user] {
$i set __feedback_mode 2
set question_form [$i render_content]
- if {$withSignature || $as_student} {
+ if {$withSignature || $autograde} {
set answerAttributes [xowf::test_item::renaming_form_loader \
answer_attributes [$i instance_attributes]]
- if {$as_student} {
+ if {$autograde} {
set achieved_points [xowf::test_item::answer_manager achieved_points \
-answer_object $i -answer_attributes $answerAttributes]
}
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 -r1.7.2.49 -r1.7.2.50
--- openacs-4/packages/xowf/tcl/test-item-procs.tcl 19 Apr 2020 15:30:45 -0000 1.7.2.49
+++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 22 Apr 2020 19:56:26 -0000 1.7.2.50
@@ -713,6 +713,7 @@
set count 0
set options {}
set correct {}
+ set solution {}
foreach {fieldName value} $answerFields {
#ns_log notice ...fieldName=$fieldName->$value
@@ -723,11 +724,13 @@
regexp {^(.*)(
)\s*$} $text . text .
lappend options [list $text [incr count]]
lappend correct [dict get $value $fieldName.correct]
+ lappend solution [dict get $value $fieldName.solution]
}
dict set fc_dict richtext 1
dict set fc_dict answer $correct
dict set fc_dict options $options
+ dict set fc_dict descriptions $solution
dict set fc_dict shuffle_kind [${:parent_field} get_named_sub_component_value shuffle]
dict set fc_dict grading [${:parent_field} get_named_sub_component_value grading]
dict set fc_dict show_max [${:parent_field} get_named_sub_component_value show_max]
@@ -760,6 +763,7 @@
# ::xowiki::formfield::mc_field
#
Class create mc_field -superclass TestItemField -parameter {
+ {n ""}
}
mc_field instproc initialize {} {
@@ -777,7 +781,8 @@
#:msg autoCorrectSpec=$autoCorrectSpec
:create_components [subst {
{text {$widget,height=50px,label=#xowf.sub_question#,plugins=OacsFs}}
- {correct {boolean,horizontal=true,label=Korrekt}}
+ {correct {boolean,horizontal=true,label=#xowf.Correct#,form_item_wrapper_CSSclass=form-inline}}
+ {solution {textarea,rows=2,label=#xowf.Solution#,form_item_wrapper_CSSclass=form-inline}}
}]
set :__initialized 1
}
@@ -1491,12 +1496,14 @@
set IPinfo [subst {IP: [:get_IPs $revision_sets]}]
set statusInfo "#xowf.Status#: $submission_info
"
}
+
if {$achieved_points ne ""} {
set possiblePoints [format %.2f [dict get $achieved_points possiblePoints]]
set achievedPoints [format %.2f [dict get $achieved_points achievedPoints]]
set percentage [format %.2f [expr {$achievedPoints*100.0/$possiblePoints}]]
set achievedPointsInfo [subst {
- #xowf.Achieved_points#: $achievedPoints von möglichen $possiblePoints Punkten, $percentage%
+ #xowf.Achieved_points#: $achievedPoints von möglichen $possiblePoints Punkten,
+ $percentage%
}]
} else {
set achievedPointsInfo ""
@@ -1507,8 +1514,8 @@
$statusInfo
#xowf.Duration#: [dict get $duration from] - [dict get $duration to]
([dict get $duration duration]$extraDurationInfo)
- $IPinfo
$achievedPointsInfo
+ $IPinfo
}]
return $HTML
}
@@ -2013,6 +2020,8 @@
set full_disabled_fc {}
set title_infos {}
set position 0
+ set randomizationOk 1
+ set autoGrade 1
foreach form_obj $form_objs number $numbers {
set form_obj [::xowf::test_item::renaming_form_loader rename_attributes $form_obj]
set form_title [$form_obj title]
@@ -2043,12 +2052,48 @@
-minutes $minutes \
-position $position]
incr position
+
+ set formAttributes [$form_obj instance_attributes]
+ if {[dict exists $formAttributes question]} {
+ #
+ # Check autograding and randomization for exam.
+ #
+ set qd [dict get [$form_obj instance_attributes] question]
+ #
+ # No question should have shuffle "always".
+ #
+ if {[dict exists $qd question.shuffle]
+ && [dict get $qd question.shuffle] eq "always"} {
+ ns_log notice "FOUND shuffle $qd"
+ set randomizationOk 0
+ }
+ #
+ # For autoGrade, we assume currently to have either a grading,
+ # or a question, where every alternative is exactly provided.
+ #
+ if {[dict exists $qd question.grading]} {
+ # autograde ok
+ } elseif [dict exists $qd question.interaction question.interaction.answer] {
+ set answer [dict get $qd question.interaction question.interaction.answer]
+ foreach k [dict keys $answer] {
+ if {![dict exists $answer $k $k.correct]} {
+ set autoGrade 0
+ }
+ }
+ } else {
+ set autoGrade 0
+ }
+ }
}
+
return [list \
form $full_form \
title_infos $title_infos \
form_constraints [join [lsort -unique $full_fc] \n] \
- disabled_form_constraints [join [lsort -unique $full_disabled_fc] \n]]
+ disabled_form_constraints [join [lsort -unique $full_disabled_fc] \n] \
+ randomization_for_exam $randomizationOk \
+ autograde $autoGrade \
+ question_objs $form_objs]
}