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.12 -r1.2.2.13
--- openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 21 Feb 2020 13:45:15 -0000 1.2.2.12
+++ openacs-4/packages/xowf/catalog/xowf.de_DE.ISO-8859-1.xml 8 Mar 2020 17:21:50 -0000 1.2.2.13
@@ -108,6 +108,9 @@
Single-Choice-Frage
Multiple-Choice-Frage
Textfrage
+ Anordnungsfrage
+ Zu ordnende Elemente
+
Dateiabgabefrage
Teilfrage
Zeige maximal
@@ -117,6 +120,7 @@
MC-Frage
SC-Frage
Dateiabgabefrage
+ Anordnungsfrage
Entwurf des Inclass-Exams (nicht freigegeben)
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.11 -r1.2.2.12
--- openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 21 Feb 2020 13:45:15 -0000 1.2.2.11
+++ openacs-4/packages/xowf/catalog/xowf.en_US.ISO-8859-1.xml 8 Mar 2020 17:21:50 -0000 1.2.2.12
@@ -120,6 +120,9 @@
Text Question
File Upload Question
Sub-Question
+ Ordering Question
+ Ordering Elements
+
Show Max
None
@@ -131,6 +134,7 @@
MC Interaction
SC Interaction
Upload Interaction
+ Ordering Interaction
Online Exam
Inclass Quiz
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.1 -r1.1.2.2
--- openacs-4/packages/xowf/lib/inclass-exam.wf 21 Feb 2020 13:45:15 -0000 1.1.2.1
+++ openacs-4/packages/xowf/lib/inclass-exam.wf 8 Mar 2020 17:21:50 -0000 1.1.2.2
@@ -29,6 +29,7 @@
# {entry -name New.Item.ShortTextInteraction -form en:TestItemShortText.form}
# {entry -name New.Item.MCInteraction -form en:TestItemMC.form}
# {entry -name New.Item.SCInteraction -form en:TestItemSC.form}
+# {entry -name New.Item.ReorderInteraction -form en:TestItemReorder.form}
# {entry -name New.Item.UploadInteraction -form en:TestItemUpload.form}
# {entry -name New.App.Exam -label "Online Exam" -form en:online-exam.wf}
#
Index: openacs-4/packages/xowf/lib/inclass-quiz.wf
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/inclass-quiz.wf,v
diff -u -r1.1.2.11 -r1.1.2.12
--- openacs-4/packages/xowf/lib/inclass-quiz.wf 21 Feb 2020 13:45:15 -0000 1.1.2.11
+++ openacs-4/packages/xowf/lib/inclass-quiz.wf 8 Mar 2020 17:21:50 -0000 1.1.2.12
@@ -23,6 +23,7 @@
# {entry -name New.Item.ShortTextInteraction -form en:TestItemShortText.form}
# {entry -name New.Item.MCInteraction -form en:TestItemMC.form}
# {entry -name New.Item.SCInteraction -form en:TestItemSC.form}
+# {entry -name New.Item.ReorderInteraction -form en:TestItemReorder.form}
# {entry -name New.App.Quiz -label "Inclass Quiz" -form en:inclass-quiz.wf}
#
# The policy has to allow the following methods on FormPages:
Index: openacs-4/packages/xowf/lib/online-exam.wf
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/lib/online-exam.wf,v
diff -u -r1.6.2.23 -r1.6.2.24
--- openacs-4/packages/xowf/lib/online-exam.wf 4 Mar 2020 10:17:04 -0000 1.6.2.23
+++ openacs-4/packages/xowf/lib/online-exam.wf 8 Mar 2020 17:21:50 -0000 1.6.2.24
@@ -29,6 +29,7 @@
# {entry -name New.Item.ShortTextInteraction -form en:TestItemShortText.form}
# {entry -name New.Item.MCInteraction -form en:TestItemMC.form}
# {entry -name New.Item.SCInteraction -form en:TestItemSC.form}
+# {entry -name New.Item.ReorderInteraction -form en:TestItemReorder.form}
# {entry -name New.Item.UploadInteraction -form en:TestItemUpload.form}
# {entry -name New.App.Exam -label "Online Exam" -form en:online-exam.wf}
#
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.26 -r1.7.2.27
--- openacs-4/packages/xowf/tcl/test-item-procs.tcl 21 Feb 2020 13:45:15 -0000 1.7.2.26
+++ openacs-4/packages/xowf/tcl/test-item-procs.tcl 8 Mar 2020 17:21:50 -0000 1.7.2.27
@@ -142,6 +142,11 @@
set auto_correct ${:auto_correct}
set can_shuffle false
}
+ ro {
+ set interaction_class reorder_interaction
+ set auto_correct ${:auto_correct}
+ set can_shuffle false
+ }
te -
st {
set interaction_class short_text_interaction
@@ -242,10 +247,10 @@
mc_interaction instproc initialize {} {
if {${:__state} ne "after_specs"} return
+
#
# build choices
#
-
if {!${:multiple}} {
append choices "{correct radio,omit}\n"
}
@@ -272,7 +277,7 @@
append form "$intro_text |
\n"
#:msg " input_field_names=${:input_field_names}"
- set mc [:get_named_sub_component_value mc]
+ set mc [:get_named_sub_component_value -from_repeat mc]
#ns_log notice "MC <$mc>"
if {!${:multiple}} {
@@ -283,8 +288,7 @@
set input_field_names {}
foreach {name .} $mc {lappend input_field_names $name}
- # don't iterate over the template field
- foreach {input_field_name data} [lrange $mc 2 end] {
+ foreach {input_field_name data} $mc {
foreach f {text correct feedback_correct feedback_incorrect} {
if {[dict exists $data $input_field_name.$f]} {
set value($f) [dict get $data $input_field_name.$f]
@@ -491,18 +495,14 @@
short_text_interaction instproc convert_to_internal {} {
set intro_text [:get_named_sub_component_value text]
- set answerFields [:get_named_sub_component_value answer]
+ set answerFields [:get_named_sub_component_value -from_repeat answer]
set options {}
set render_hints {}
set answer {}
set count 0
foreach {fieldName value} $answerFields {
- # skip template entry
- if {[lindex [split $fieldName .] end] eq 0} {
- continue
- }
#ns_log notice ...fieldName=$fieldName->$value
set af answer[incr count]
lappend options [list [dict get $value $fieldName.text] $af]
@@ -602,6 +602,79 @@
namespace eval ::xowiki::formfield {
###########################################################
#
+ # ::xowiki::formfield::reorder_interaction
+ #
+ ###########################################################
+
+ Class create reorder_interaction -superclass TestItemField -parameter {
+ }
+
+ reorder_interaction instproc initialize {} {
+ if {${:__state} ne "after_specs"} return
+ #
+ # Create component structure.
+ #
+ set widget [test_item set richtextWidget]
+ ns_log notice "[self] [:info class] auto_correct=${:auto_correct}"
+
+ :create_components [subst {
+ {text {$widget,height=100px,label=#xowf.exercise-text#,plugins=OacsFs}}
+ {answer {text,repeat=1..10,label=#xowf.reorder_question_elements#}}
+ }]
+ set :__initialized 1
+ }
+
+ reorder_interaction instproc convert_to_internal {} {
+
+ set intro_text [:get_named_sub_component_value text]
+ set answerFields [:get_named_sub_component_value -from_repeat answer]
+
+ set options {}
+ set answer {}
+ set count 0
+
+ foreach {fieldName value} $answerFields {
+ #ns_log notice ...fieldName=$fieldName->$value
+ lappend options [list $value $count]
+ lappend answer $count
+ incr count
+ }
+
+ #dict set fc_dict shuffle_kind [${:parent_field} get_named_sub_component_value shuffle]
+ #dict set fc_dict show_max [${:parent_field} get_named_sub_component_value show_max]
+ dict set fc_dict disabled_as_div 1
+ dict set fc_dict label ""
+ dict set fc_dict options $options
+ dict set fc_dict answer $answer
+
+ append form \
+ "\n"
+
+ set fc {}
+ lappend fc \
+ answer:[:dict_to_fc -type reorder_box $fc_dict] \
+ @categories:off @cr_fields:hidden
+
+ ns_log notice "reorder_interaction $form\n$fc"
+ ${:object} set_property -new 1 form $form
+ ${:object} set_property -new 1 form_constraints $fc
+ set anon_instances true ;# TODO make me configurable
+ ${:object} set_property -new 1 anon_instances $anon_instances
+ ${:object} set_property -new 1 auto_correct ${:auto_correct}
+ ${:object} set_property -new 1 has_solution false
+ }
+}
+
+
+
+namespace eval ::xowiki::formfield {
+ ###########################################################
+ #
# ::xowiki::formfield::mc_interaction2
#
###########################################################
@@ -629,16 +702,12 @@
mc_interaction2 instproc convert_to_internal {} {
set intro_text [:get_named_sub_component_value text]
- set answerFields [:get_named_sub_component_value answer]
+ set answerFields [:get_named_sub_component_value -from_repeat answer]
set count 0
set options {}
set correct {}
foreach {fieldName value} $answerFields {
- # skip template entry
- if {[lindex [split $fieldName .] end] eq 0} {
- continue
- }
#ns_log notice ...fieldName=$fieldName->$value
#set af answer[incr count]
set text [dict get $value $fieldName.text]
@@ -774,7 +843,7 @@
# Build a complex form composed of the specified form pages names
# contained in the value of this field. The form-fields have to
# be renamed. This affects the input field names in the form and
- # the form constraints. We use the item-id contained pages as a the
+ # the form constraints. We use the item_id contained pages as the
# prefix for the form-fields. This method must be most likely
# extended for other question types.
#
Index: openacs-4/packages/xowf/tcl/xowf-init.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/xowf-init.tcl,v
diff -u -r1.3.2.4 -r1.3.2.5
--- openacs-4/packages/xowf/tcl/xowf-init.tcl 21 Feb 2020 13:45:15 -0000 1.3.2.4
+++ openacs-4/packages/xowf/tcl/xowf-init.tcl 8 Mar 2020 17:21:50 -0000 1.3.2.5
@@ -4,9 +4,10 @@
::xowf::dav-todo register
#
-# Make sure, the site-wide pages are loaded
+# Make sure, the site-wide pages are loaded, and refetch pages, when
+# the source code in the prototype pages changes.
#
-::xowf::Package require_site_wide_pages
+::xowf::Package require_site_wide_pages -refetch_if_modified
#
# Run the checker for the scheduled at-jobs.
@@ -26,7 +27,7 @@
# the following job is executed after 60 seconds
ad_schedule_proc -thread t 60 ::xowf::atjob check
-
+
}
Index: openacs-4/packages/xowf/tcl/xowf-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/xowf-procs.tcl,v
diff -u -r1.28.2.26 -r1.28.2.27
--- openacs-4/packages/xowf/tcl/xowf-procs.tcl 21 Feb 2020 13:45:15 -0000 1.28.2.26
+++ openacs-4/packages/xowf/tcl/xowf-procs.tcl 8 Mar 2020 17:21:50 -0000 1.28.2.27
@@ -52,6 +52,7 @@
TestItemShortText.form
TestItemMC.form
TestItemSC.form
+ TestItemReorder.form
TestItemUpload.form
online-exam.wf
@@ -105,7 +106,7 @@
-instance_attributes $instance_attributes \
-page_template $page_template]
} else {
- ns_log error "could not load Workflow form, therefore creation of workflow $name failed as well"
+ ns_log error "could not load Workflow form, therefore, creation of workflow $name failed as well"
set p ""
}
return $p
@@ -2277,7 +2278,7 @@
# ::xowf::dav create ::xowf::baHandler -url /handler -package ::xowf::Package
#
# 2) Make sure, the basic authentication handler is initialized during
-# startup. Write an -init.tcl file containing a call to the
+# startup. Write a *-init.tcl file containing a call to the
# created handler.
# Example:
# ::xowf::baHandler register
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowf/www/prototypes/TestItemReorder.form.page'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/xowf/www/prototypes/assessment-index.page
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/www/prototypes/assessment-index.page,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/xowf/www/prototypes/assessment-index.page 21 Feb 2020 13:45:15 -0000 1.1.2.1
+++ openacs-4/packages/xowf/www/prototypes/assessment-index.page 8 Mar 2020 17:21:50 -0000 1.1.2.2
@@ -1,15 +1,14 @@
::xowiki::Page new -title "Assessment Index" -text {
#xowf.Created_Questions#:
-{{form-usages -title "Questions" -form en:TestItemText.form|en:TestItemShortText.form|en:TestItemMC.form|en:TestItemSC.form|en:TestItemUpload.form -buttons "edit duplicate slim_publish_status delete" -field_names "_title,_last_modified,_creation_user" -date_format "pretty-age" -csv false}}
+{{form-usages -title "Questions" -with_form_link 0 -form en:TestItemText.form|en:TestItemShortText.form|en:TestItemMC.form|en:TestItemSC.form|en:TestItemUpload.form|en:TestItemReorder.form -buttons "edit duplicate slim_publish_status delete" -field_names "_title,_last_modified,_creation_user" -date_format "pretty-age" -csv false}}
#xowf.Created_Assessments#:
-{{form-usages -title "Online Exams" -form en:online-exam.wf|en:inclass-quiz.wf|en:inclass-exam.wf -buttons "edit delete" -field_names "_title,_state,_last_modified,_creation_user" -date_format "pretty-age" -csv false}}
+
{{form-usages -title "Online Exams" -with_form_link 0 -form en:online-exam.wf|en:inclass-quiz.wf|en:inclass-exam.wf -buttons "edit delete" -field_names "_title,_state,_last_modified,_creation_user" -date_format "pretty-age" -csv false}}
{{set-parameter __no_footer 1}}
-
}
Index: openacs-4/packages/xowf/www/prototypes/quiz-select_question.form.page
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/www/prototypes/Attic/quiz-select_question.form.page,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/xowf/www/prototypes/quiz-select_question.form.page 21 Feb 2020 13:45:15 -0000 1.1.2.1
+++ openacs-4/packages/xowf/www/prototypes/quiz-select_question.form.page 8 Mar 2020 17:21:50 -0000 1.1.2.2
@@ -8,7 +8,7 @@
-form_constraints {
@cr_fields:hidden
{_title:text,label=#xowf.inclass-quiz-name#,default=#xowf.inclass-quiz-default_name#}
- {question:form_page,multiple=true,form=en:TestItemText.form|en:TestItemShortText.form|en:TestItemMC.form|en:TestItemSC.form,required,help_text=#xowf.select_question_help_text#,label=#xowiki.questions#}
+ {question:form_page,multiple=true,form=en:TestItemText.form|en:TestItemShortText.form|en:TestItemMC.form|en:TestItemSC.form|en:TestItemReorder.form,required,help_text=#xowf.select_question_help_text#,label=#xowiki.questions#}
_description:omit _page_order:omit
}
Index: openacs-4/packages/xowf/www/prototypes/select_question.form.page
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/www/prototypes/Attic/select_question.form.page,v
diff -u -r1.1.2.2 -r1.1.2.3
--- openacs-4/packages/xowf/www/prototypes/select_question.form.page 5 Mar 2020 11:29:15 -0000 1.1.2.2
+++ openacs-4/packages/xowf/www/prototypes/select_question.form.page 8 Mar 2020 17:21:50 -0000 1.1.2.3
@@ -8,7 +8,7 @@
-form_constraints {
@cr_fields:hidden
{_title:text,label=#xowf.online-exam-name#,default=#xowf.online-exam-default_name#}
- {question:form_page,multiple=true,form=en:TestItemText.form|en:TestItemShortText.form|en:TestItemMC.form|en:TestItemSC.form|en:TestItemUpload.form,required,help_text=#xowf.select_question_help_text#,label=#xowiki.questions#}
+ {question:form_page,multiple=true,form=en:TestItemText.form|en:TestItemShortText.form|en:TestItemMC.form|en:TestItemSC.form|en:TestItemUpload.form|en:TestItemReorder.form,required,help_text=#xowf.select_question_help_text#,label=#xowiki.questions#}
{shuffle_items:boolean,horizontal=true,label=#xowf.randomized_items#,help_text=#xowf.randomized_items_help_text#}
{signature:boolean,horizontal=true,default=f,label=#xowf.signature#,help_text=#xowf.signature-help_text#}
_description:omit _page_order:omit
Index: openacs-4/packages/xowf/www/resources/test-item.css
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/www/resources/test-item.css,v
diff -u -r1.1.2.13 -r1.1.2.14
--- openacs-4/packages/xowf/www/resources/test-item.css 21 Feb 2020 13:45:15 -0000 1.1.2.13
+++ openacs-4/packages/xowf/www/resources/test-item.css 8 Mar 2020 17:21:50 -0000 1.1.2.14
@@ -67,7 +67,8 @@
div.mc_interaction,
div.sc_interaction,
div.short_text_interaction,
-div.text_interaction {
+div.text_interaction,
+div.reorder_interaction {
padding: 15px 0px 0px 15px;
}
div.mc_interaction label,
@@ -127,16 +128,19 @@
div.text_interaction div.correct,
div.short_text_interaction div.correct,
div.mc_interaction label.correct,
-div.sc_interaction label.correct
+div.sc_interaction label.correct,
+div.reorder_interaction li.correct
{
border-width: 0px 0px 0px 4px;
border-style: solid;
border-color: green;
}
+
div.text_interaction div.incorrect,
div.short_text_interaction div.incorrect,
div.mc_interaction label.incorrect,
-div.sc_interaction label.incorrect
+div.sc_interaction label.incorrect,
+div.reorder_interaction li.incorrect
{
border-width: 0px 0px 0px 4px;
border-style: solid;