Index: openacs-4/packages/xowf/xowf.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/xowf.info,v
diff -u -r1.12.2.19 -r1.12.2.20
--- openacs-4/packages/xowf/xowf.info 26 Aug 2020 18:55:47 -0000 1.12.2.19
+++ openacs-4/packages/xowf/xowf.info 23 Sep 2020 09:24:34 -0000 1.12.2.20
@@ -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.34 -r1.2.2.35
--- openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 29 Jun 2020 08:15:48 -0000 1.2.2.34
+++ openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 23 Sep 2020 09:24:34 -0000 1.2.2.35
@@ -170,6 +170,8 @@
Ver�ffentlichung der Pr�fung
seit der Ver�ffentlichung
Erreichte Punkte
+ Punkt
+ Punkte
Korrekt
automatische Einsicht m�glich
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.32 -r1.2.2.33
--- openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 1 Jul 2020 19:37:38 -0000 1.2.2.32
+++ openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 23 Sep 2020 09:24:34 -0000 1.2.2.33
@@ -194,6 +194,8 @@
Exam Published
since published
Achieved Points
+ Point
+ Points
Correct
automated exam review possible
Index: openacs-4/packages/xowf/lib/inclass-exam-answer.wf
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/inclass-exam-answer.wf,v
diff -u -r1.1.2.20 -r1.1.2.21
--- openacs-4/packages/xowf/lib/inclass-exam-answer.wf 4 Aug 2020 16:16:17 -0000 1.1.2.20
+++ openacs-4/packages/xowf/lib/inclass-exam-answer.wf 23 Sep 2020 09:24:34 -0000 1.1.2.21
@@ -334,7 +334,7 @@
set form_info [::xowf::test_item::question_manager combined_question_form \
-with_numbers \
-with_title \
- -with_minutes \
+ -with_points \
-user_specific \
-shuffle_id $shuffle_id \
$parent_obj]
@@ -487,7 +487,7 @@
-user_id [xo::cc user_id] \
-ts [ns_queryget ts]
ns_return 200 text/plain OK
- ad_script_abort
+ ad_script_abort
}
}
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.78 -r1.7.2.79
--- openacs-4/packages/xowf/tcl/test-item-procs.tcl 22 Sep 2020 10:35:18 -0000 1.7.2.78
+++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 23 Sep 2020 09:24:34 -0000 1.7.2.79
@@ -214,6 +214,7 @@
}
:create_components [subst {
{minutes number,form_item_wrapper_CSSclass=form-inline,min=1,default=2,label=#xowf.Minutes#}
+ {points number,form_item_wrapper_CSSclass=form-inline,min=0.1,default=2,step=0.1,label=#xowf.Points#}
$shuffleSpec
$gradingSpec
{interaction {$interaction_class,$options,feedback_level=${:feedback_level},auto_correct=${:auto_correct},label=}}
@@ -1269,14 +1270,14 @@
#
# No end given. set it to start + exam time + 5 minutes
#
- set end_clock [expr {$start_clock + ($total_minutes + 5)*60}]
+ set end_clock [expr {$start_clock + ($total_minutes + 5) * 60}]
set new_dtend [clock format $end_clock -format %H:%M]
ns_log notice "#### no dtend given. set it from $dtend to $new_dtend"
} else {
set end_date [clock format $start_clock -format %Y-%m-%d]T$dtend
set end_clock [clock scan $end_date -format %Y-%m-%dT%H:%M]
- if {($end_clock - $start_clock) < ($total_minutes*60)} {
+ if {($end_clock - $start_clock) < ($total_minutes * 60)} {
#
# The specified end time is too early. Set it to start +
# exam time + 5 minutes
@@ -1571,7 +1572,7 @@
#ns_log notice "FOO: $a <$f> $cd"
if {[dict exists $cd points]} {
set totalPoints [expr {$totalPoints + [dict get $cd points]}]
- set achieveablePoints [expr {$achieveablePoints + [$f set test_item_minutes]}]
+ set achieveablePoints [expr {$achieveablePoints + [$f set test_item_points]}]
} else {
ns_log notice "$a: no points in correction_data, ignoring in points calculation"
}
@@ -1934,10 +1935,10 @@
# Add exercise score weighted to the total score to
# compute points.
#
- if {[$ff_obj exists test_item_minutes]} {
- #ns_log notice "[$ff_obj name]: grading_score <$r>, test_item_minutes <[$ff_obj set test_item_minutes]>"
+ if {[$ff_obj exists test_item_points]} {
+ #ns_log notice "[$ff_obj name]: grading_score <$r>, test_item_points <[$ff_obj set test_item_points]>"
- set minutes [$ff_obj set test_item_minutes]
+ set minutes [$ff_obj set test_item_points]
set total_score [expr {$total_score + ($minutes * [$ff_obj set grading_score])}]
set total_points [expr {$total_points + $minutes}]
}
@@ -2545,7 +2546,7 @@
$form_obj set_property form_constraints $fc
}
- :method add_to_fc {-fc:required -position -minutes} {
+ :method add_to_fc {-fc:required -position -minutes -points} {
return [lmap c $fc {
if {[regexp {^[^:]+_:} $c]} {
if {[info exists position]} {
@@ -2554,6 +2555,9 @@
if {[info exists minutes]} {
append c ,test_item_minutes=$minutes
}
+ if {[info exists points]} {
+ append c ,test_item_points=$points
+ }
#ns_log notice "APPEND $c"
}
set c
@@ -2564,6 +2568,7 @@
{-numbers ""}
{-with_title:switch false}
{-with_minutes:switch false}
+ {-with_points:switch false}
form_objs
} {
set full_form {}
@@ -2577,6 +2582,11 @@
set form_obj [::xowf::test_item::renaming_form_loader rename_attributes $form_obj]
set form_title [$form_obj title]
set minutes [:question_property $form_obj minutes]
+ set points [:question_property $form_obj points]
+ if {$points eq ""} {
+ ns_log notice "NO POINTS, default to minutes $minutes"
+ set points $minutes
+ }
set title ""
if {$number ne ""} {
append title "#xowf.question# $number:"
@@ -2587,6 +2597,9 @@
if {$with_minutes} {
append title " - [:minutes_string $form_obj]"
}
+ if {$with_points} {
+ append title " - [:points_string $form_obj]"
+ }
append full_form "$title
\n"
append full_form [$form_obj property form] \n
@@ -2597,10 +2610,12 @@
lappend full_fc [:add_to_fc \
-fc [$form_obj property form_constraints] \
-minutes $minutes \
+ -points $points \
-position $position]
lappend full_disabled_fc [:add_to_fc \
-fc [$form_obj property disabled_form_constraints] \
-minutes $minutes \
+ -points $points \
-position $position]
incr position
@@ -2668,15 +2683,31 @@
#
set minutes [:question_property $form_obj minutes]
if {$minutes ne ""} {
- set key [expr {$minutes eq "1" ? [_ xowiki.minute] : [_ xowiki.minutes]}]
- set minutes "($minutes $key)"
+ set pretty_label [expr {$minutes eq "1" ? [_ xowiki.minute] : [_ xowiki.minutes]}]
+ set minutes "($minutes $pretty_label)"
}
}
+ :public method points_string {form_obj:object} {
+ #
+ # Get an attribute of the original question
+ #
+ set points [:question_property $form_obj points]
+ if {$points eq ""} {
+ # just for legacy, questions without points
+ set points [:question_property $form_obj minutes]
+ }
+ if {$points ne ""} {
+ set pretty_label [expr {$points eq "1" ? [_ xowf.Point] : [_ xowf.Points]}]
+ set minutes "($points $pretty_label)"
+ }
+ }
+
:public method combined_question_form {
{-with_numbers:switch false}
{-with_title:switch false}
{-with_minutes:switch false}
+ {-with_points:switch false}
{-user_specific:switch false}
{-shuffle_id:integer -1}
obj:object
@@ -2700,6 +2731,7 @@
return [:question_info \
-with_title=$with_title \
-with_minutes=$with_minutes \
+ -with_points=$with_points \
{*}$extra_flags \
$form_objs]
}
Index: openacs-4/packages/xowiki/xowiki.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v
diff -u -r1.180.2.45 -r1.180.2.46
--- openacs-4/packages/xowiki/xowiki.info 26 Aug 2020 18:34:59 -0000 1.180.2.45
+++ openacs-4/packages/xowiki/xowiki.info 23 Sep 2020 09:24:34 -0000 1.180.2.46
@@ -10,7 +10,7 @@
t
xowiki
-
+
Gustaf Neumann
A xotcl-based enterprise wiki system with multiple object types
2017-08-06
@@ -55,7 +55,7 @@
BSD-Style
2
-
+
Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v
diff -u -r1.284.2.121 -r1.284.2.122
--- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 22 Sep 2020 10:32:06 -0000 1.284.2.121
+++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 23 Sep 2020 09:24:34 -0000 1.284.2.122
@@ -65,6 +65,7 @@
in_position
test_item_in_position
test_item_minutes
+ test_item_points
} -ad_doc {
Base FormField class.
@@ -842,11 +843,11 @@
set grading_score 0.0
}
#:log "=== ${:name} grading ${:grading} => $grading_score"
- if {[info exists :test_item_minutes]} {
- set points [format %.2f [expr {${:test_item_minutes} * $grading_score / 100.0}]]
+ if {[info exists :test_item_points]} {
+ set points [format %.2f [expr {${:test_item_points} * $grading_score / 100.0}]]
dict set :correction_data points $points
#append feedback " correct: $grading_score "
- append feedback " points: $points of [format %.2f ${:test_item_minutes}]"
+ append feedback " points: $points of [format %.2f ${:test_item_points}]"
} else {
append feedback " grading_score $grading_score"
}