• Publicity: Public Only All

test-item-procs.tcl

Test Item procs - support for different kind of tests and exercises.

This file defines the following Objects and Classes: ::xowiki::formfield::TestItemField[i], ::xowiki::formfield::test_item_name[i], ::xowiki::formfield::test_item[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Question_manager[i], ::xowiki::formfield::TestItemField[i], ::xowiki::formfield::test_item_name[i], ::xowiki::formfield::test_item[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Question_manager[i]

Location:
packages/xowf/tcl/test-item-procs.tcl
Author:
Gustaf Neumann

Procedures in this file

Detailed information

Class ::xowf::test_item::Answer_manager (public)

 ::nx::Class ::xowf::test_item::Answer_manager[i]

Public API: - create_workflow - delete_all_answer_data - allow_answering - get_answer_wf - get_wf_instances - get_answer_attributes - student_submissions_exist - runtime_panel - render_answers_with_edit_history - render_answers - marked_results - answers_panel - exam_results - grading_table - grading_scheme - grade - participants_table - get_duration - get_IPs - revisions_up_to - last_time_in_state - last_time_switched_to_state - state_periods - time_window_setup - waiting_room_message

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) acs_user::get_element acs_user::get_element (public) ad_conn ad_conn (public) ad_decode ad_decode (public) ad_log ad_log (public) Class ::xowf::test_item::Answer_manager Class ::xowf::test_item::Answer_manager Class ::xowf::test_item::Answer_manager->_ Class ::xowf::test_item::Answer_manager->acs_user::get_element Class ::xowf::test_item::Answer_manager->ad_conn Class ::xowf::test_item::Answer_manager->ad_decode Class ::xowf::test_item::Answer_manager->ad_log

Testcases:
No testcase defined.

Class ::xowf::test_item::AssessmentInterface (public)

 ::nx::Class ::xowf::test_item::AssessmentInterface[i]

Abstract class for common functionality

Partial Call Graph (max 5 caller/called nodes):
%3 ad_return_url ad_return_url (public) template::adp_parse_tags template::adp_parse_tags (public) Class ::xowf::test_item::AssessmentInterface Class ::xowf::test_item::AssessmentInterface Class ::xowf::test_item::AssessmentInterface->ad_return_url Class ::xowf::test_item::AssessmentInterface->template::adp_parse_tags

Testcases:
No testcase defined.

Class ::xowf::test_item::Question_manager (public)

 ::nx::Class ::xowf::test_item::Question_manager[i]

This code manages questions and the information related to a current (selected) question via qthe "position" instance attribute. It provides the following public API: - goto_page - more_ahead - pagination_actions - current_question_form - current_question_obj - current_question_name - current_question_title - nth_question_obj - nth_question_form - exam_configuration_popup - exam_configuration_modifiable_field_names - combined_question_form - question_objs - question_names - question_count - question_property - add_seeds - total_minutes - total_points - questions_without_minutes - total_minutes_for_exam - exam_target_time - exam_base_time - percent_substitute_in_form - item_substitute_markup - describe_form - question_summary - question_info_block - question_statistics_block

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ad_log ad_log (public) ad_returnredirect ad_returnredirect (public) ad_script_abort ad_script_abort (public) template::add_body_script template::add_body_script (public) Class ::xowf::test_item::Question_manager Class ::xowf::test_item::Question_manager Class ::xowf::test_item::Question_manager->_ Class ::xowf::test_item::Question_manager->ad_log Class ::xowf::test_item::Question_manager->ad_returnredirect Class ::xowf::test_item::Question_manager->ad_script_abort Class ::xowf::test_item::Question_manager->template::add_body_script

Testcases:
No testcase defined.

Class ::xowf::test_item::Renaming_form_loader (public)

 ::nx::Class ::xowf::test_item::Renaming_form_loader[i]

Form loader that renames "generic" form-field-names as provided by the test-item form-field classes (@answer@) into names based on the form name, such that multiple of these form names can be processed together without name clashes. - answer_attributes - answer_for_form - answers_for_form - form_name_based_attribute_stem - name_to_question_obj_dict - rename_attributes

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

Class ::xowiki::formfield::TestItemField (public)

 ::xotcl::Class ::xowiki::formfield::TestItemField[i] \
    [ -feedback_level feedback_level ] [ -auto_correct auto_correct ]

Abstract class for defining common attributes for all Test Item fields.

Switches:
-feedback_level
(optional)
"full", "single", or "none"
-auto_correct
(optional)
boolean to let user add auto correction fields

Partial Call Graph (max 5 caller/called nodes):
%3 nsf::object::alloc nsf::object::alloc nsf::relation::set nsf::relation::set nx::slotObj nx::slotObj Class ::xowiki::formfield::TestItemField Class ::xowiki::formfield::TestItemField Class ::xowiki::formfield::TestItemField->nsf::object::alloc Class ::xowiki::formfield::TestItemField->nsf::relation::set Class ::xowiki::formfield::TestItemField->nx::slotObj

Testcases:
No testcase defined.

Class ::xowiki::formfield::test_item (public)

 ::xotcl::Class ::xowiki::formfield::test_item[i] \
    [ -feedback_level feedback_level ] [ -grading grading ] \
    [ -nr_choices nr_choices ] [ -question_type question_type ]

Wrapper for composite test items, containing specification for minutes, grading scheme, feedback levels, handling different types of questions ("interactions" in the terminology of QTI). When such a question is saved, an HTML form is generated, which is used as a question.

Switches:
-feedback_level
(optional)
"full", "single", or "none"
-grading
(optional)
one of "exact", "none", or one of the partial grading schemes
-nr_choices
(optional)
number of choices
-question_type
(optional)
"mc", "sc", "ot", or "st"

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) nsf::object::alloc nsf::object::alloc nsf::relation::set nsf::relation::set nx::slotObj nx::slotObj Class ::xowiki::formfield::test_item Class ::xowiki::formfield::test_item Class ::xowiki::formfield::test_item->_ Class ::xowiki::formfield::test_item->nsf::object::alloc Class ::xowiki::formfield::test_item->nsf::relation::set Class ::xowiki::formfield::test_item->nx::slotObj

Testcases:
No testcase defined.

Class ::xowiki::formfield::test_item_name (public)

 ::xotcl::Class ::xowiki::formfield::test_item_name[i]

Name sanitizer for test items

Partial Call Graph (max 5 caller/called nodes):
%3 nsf::object::alloc nsf::object::alloc nsf::relation::set nsf::relation::set nx::slotObj nx::slotObj Class ::xowiki::formfield::test_item_name Class ::xowiki::formfield::test_item_name Class ::xowiki::formfield::test_item_name->nsf::object::alloc Class ::xowiki::formfield::test_item_name->nsf::relation::set Class ::xowiki::formfield::test_item_name->nx::slotObj

Testcases:
No testcase defined.

xowf::WorkflowPage instproc render_thumbnails (public)

 <instance of xowf::WorkflowPage[i]> render_thumbnails upload_info

Renderer of the thumbnail file(s)

Parameters:
upload_info - dict containing the "file_object" and "file_name"
Returns:
HTML content

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method allow_answering (public)

 <instance of xowf::test_item::Answer_manager[i]> allow_answering \
    [ -examwf examwf ] -ip ip 

Tell if specified IP address is allowed to answer the exam.

Switches:
-examwf
(optional)
-ip
(required)
Returns:
boolean

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method answer_form_field_objs (public)

 <instance of xowf::test_item::Answer_manager[i]> answer_form_field_objs \
    [ -clear ] [ -wf wf ] [ -generic ] form_info

Instantiate the form_field objects of the provided form based on form_info.

Switches:
-clear
(optional)
-wf
(optional)
-generic
(optional)
Parameters:
form_info

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc answer_form_field_objs xowf::test_item::Answer_manager instproc answer_form_field_objs test_create_test_items->xowf::test_item::Answer_manager instproc answer_form_field_objs

Testcases:
create_test_items

xowf::test_item::Answer_manager method answers_panel (public)

 <instance of xowf::test_item::Answer_manager[i]> answers_panel \
    [ -polling ] [ -heading heading ] \
    [ -submission_msg submission_msg ] [ -manager_obj manager_obj ] \
    [ -target_state target_state ] [ -wf wf ] \
    [ -current_question current_question ] [ -extra_text extra_text ]

Produce HTML code for an answers panel, containing the number of participants of an e-assessment and the number of participants, who have already answered.

Switches:
-polling
(defaults to "false") (optional)
when specified, provide live updates of the numbers via AJAX calls
-heading
(defaults to "Submitted Answers") (optional)
-submission_msg
(defaults to "participants answered this question") (optional)
-manager_obj
(optional)
-target_state
(optional)
-wf
(optional)
-current_question
(optional)
-extra_text
(optional)
optional extra text for the panel, has to be provided with valid HTML markup.

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc answers_panel xowf::test_item::Answer_manager instproc answers_panel test_create_test_items->xowf::test_item::Answer_manager instproc answers_panel template::add_body_script template::add_body_script (public) xowf::test_item::Answer_manager instproc answers_panel->template::add_body_script xowiki::bootstrap::card xowiki::bootstrap::card (public) xowf::test_item::Answer_manager instproc answers_panel->xowiki::bootstrap::card

Testcases:
create_test_items

xowf::test_item::Answer_manager method countdown_timer (public)

 <instance of xowf::test_item::Answer_manager[i]> countdown_timer \
    -target_time target_time  -id id  [ -audio_alarm on|off ] \
    [ -audio_alarm_cookie audio_alarm_cookie ] \
    [ -audio_alarm_times audio_alarm_times ]

Accepted formats for target_time, determined by JavaScript ISO 8601, e.g. YYYY-MM-DDTHH:mm:ss.sss" Set current time based on host time instead of new Date().getTime() to avoid surprises, in cases, the time at the client browser is set incorrectly.

Switches:
-target_time
(required)
-id
(required)
-audio_alarm
(boolean) (defaults to "true") (optional)
-audio_alarm_cookie
(defaults to "incass_exam_audio_alarm") (optional)
-audio_alarm_times
(defaults to "60,30,20,10,5,2") (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc countdown_timer xowf::test_item::Answer_manager instproc countdown_timer test_create_test_items->xowf::test_item::Answer_manager instproc countdown_timer _ _ (public) xowf::test_item::Answer_manager instproc countdown_timer->_ template::add_body_script template::add_body_script (public) xowf::test_item::Answer_manager instproc countdown_timer->template::add_body_script

Testcases:
create_test_items

xowf::test_item::Answer_manager method create_workflow (public)

 <instance of xowf::test_item::Answer_manager[i]> create_workflow \
    [ -answer_workflow answer_workflow ] \
    [ -master_workflow master_workflow ] parentObj

Create a workflow based on the template provided in this method for answering the question for the students. The name of the workflow is derived from the workflow instance and recorded in the formfield "wfName". :log "create_answer_workflow $parentObj"

Switches:
-answer_workflow
(defaults to "/packages/xowf/lib/online-exam-answer.wf") (optional)
-master_workflow
(defaults to "en:Workflow.form") (optional)
Parameters:
parentObj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc create_workflow xowf::test_item::Answer_manager instproc create_workflow test_create_test_items->xowf::test_item::Answer_manager instproc create_workflow xowf::include xowf::include xowf::test_item::Answer_manager instproc create_workflow->xowf::include

Testcases:
create_test_items

xowf::test_item::Answer_manager method delete_all_answer_data (public)

 <instance of xowf::test_item::Answer_manager[i]> delete_all_answer_data \
    obj

Delete all instances of the answer workflow

Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc delete_all_answer_data xowf::test_item::Answer_manager instproc delete_all_answer_data test_create_test_items->xowf::test_item::Answer_manager instproc delete_all_answer_data

Testcases:
create_test_items

xowf::test_item::Answer_manager method delete_scheduled_atjobs (public)

 <instance of xowf::test_item::Answer_manager[i]> delete_scheduled_atjobs \
    obj

Delete previously scheduled atjobs ns_log notice "#### delete_scheduled_atjobs"

Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3 ad_conn ad_conn (public) xowf::test_item::Answer_manager instproc delete_scheduled_atjobs xowf::test_item::Answer_manager instproc delete_scheduled_atjobs xowf::test_item::Answer_manager instproc delete_scheduled_atjobs->ad_conn

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method exam_results (public)

 <instance of xowf::test_item::Answer_manager[i]> exam_results \
    [ -manual_gradings manual_gradings ] \
    [ -gradingScheme gradingScheme ] [ -only_grades on|off ] \
    [ -reply ] [ -format format ] [ -orderby orderby ] results_dict

Return results either as HTML table, as HTML chart or as csv. When "reply" is set. the result is returned directly to the browser (for downloading). When "gradingScheme" is empty, this method returns the following fields: participant, question, achieved_points, achievable points, comment When the "gradingScheme" is specified the results are per-participant. In this cases, when the "gradingScheme" is "....::none", the fields are participant, achieved, percentage otherwise the grade and rounding of achieved points and percentage are exported based on the rules of the grading scheme. participant, achieved, percentage, grade When additionally "only_grades" is specified, just participant and grad are returned/exported.

Switches:
-manual_gradings
(optional)
-gradingScheme
(optional)
needed for reporting grades, can be empty
-only_grades
(boolean) (defaults to "false") (optional)
-reply
(defaults to "false") (optional)
when false, csv will be returned as text, when true, it will be returned as response to the browser.
-format
(defaults to "csv") (optional)
-orderby
(defaults to "participant,desc") (optional)
Parameters:
results_dict - the results to format as csv, every key in the dict represents a user_id.
Returns:
csv as value or as response to the client

Partial Call Graph (max 5 caller/called nodes):
%3 ad_decode ad_decode (public) ad_script_abort ad_script_abort (public) xowf::test_item::Answer_manager instproc exam_results xowf::test_item::Answer_manager instproc exam_results xowf::test_item::Answer_manager instproc exam_results->ad_decode xowf::test_item::Answer_manager instproc exam_results->ad_script_abort

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method export_answer (public)

 <instance of xowf::test_item::Answer_manager[i]> export_answer \
    [ -combined_form_info combined_form_info ] -html html  \
    [ -recutil recutil ] [ -submission submission ]

Export the provided question and answer in GNU rectuil format. ns_log notice "answers: [$submission serialize]"

Switches:
-combined_form_info
(optional)
-html
(required)
-recutil
(optional)
-submission
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method get_IPs (public)

 <instance of xowf::test_item::Answer_manager[i]> get_IPs \
    revision_sets

Get the IP addresses for the given revision set. Should be actually only one. The revision_set must not be empty.

Parameters:
revision_sets

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc get_IPs xowf::test_item::Answer_manager instproc get_IPs test_create_test_items->xowf::test_item::Answer_manager instproc get_IPs

Testcases:
create_test_items

xowf::test_item::Answer_manager method get_answer_attributes (public)

 <instance of xowf::test_item::Answer_manager[i]> get_answer_attributes \
    [ -state state ] [ -extra_attributes extra_attributes ] wf

Extracts wf instances as answers (e.g., extracting their answer-specific attributes)

Switches:
-state
(optional)
retrieve only instances in this state
-extra_attributes
(optional)
return these attributes additionally as key/value pairs per tuple
Parameters:
wf - the workflow
Returns:
a list of dicts

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc get_answer_attributes xowf::test_item::Answer_manager instproc get_answer_attributes test_create_test_items->xowf::test_item::Answer_manager instproc get_answer_attributes

Testcases:
create_test_items

xowf::test_item::Answer_manager method get_answer_wf (public)

 <instance of xowf::test_item::Answer_manager[i]> get_answer_wf obj

return the workflow denoted by the property wfName in obj

Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc get_answer_wf xowf::test_item::Answer_manager instproc get_answer_wf test_create_test_items->xowf::test_item::Answer_manager instproc get_answer_wf

Testcases:
create_test_items

xowf::test_item::Answer_manager method get_duration (public)

 <instance of xowf::test_item::Answer_manager[i]> get_duration \
    [ -exam_published_time exam_published_time ] revision_sets

Get the duration from a set of revisions and return a dict containing "from", "fromClock","to", "toClock", "seconds", and "duration".

Switches:
-exam_published_time
(optional)
Parameters:
revision_sets

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc get_duration xowf::test_item::Answer_manager instproc get_duration test_create_test_items->xowf::test_item::Answer_manager instproc get_duration xo::db::tcl_date xo::db::tcl_date (public) xowf::test_item::Answer_manager instproc get_duration->xo::db::tcl_date

Testcases:
create_test_items

xowf::test_item::Answer_manager method get_exam_results (public)

 <instance of xowf::test_item::Answer_manager[i]> get_exam_results \
    [ -obj obj ] property [ default ]

Retrieve a property value from the exam statistics result page. This page is an instance of the exam statistics workflow stored as a child of the exam object.

Switches:
-obj
(optional)
the exam object
Parameters:
property - the property name
default (optional) - default value when property is not found

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc get_exam_results xowf::test_item::Answer_manager instproc get_exam_results test_create_test_items->xowf::test_item::Answer_manager instproc get_exam_results

Testcases:
create_test_items

xowf::test_item::Answer_manager method get_wf_instances (public)

 <instance of xowf::test_item::Answer_manager[i]> get_wf_instances \
    [ -initialize initialize ] [ -orderby orderby ] \
    [ -creation_user creation_user ] [ -item_id item_id ] \
    [ -state state ] wf

get_wf_instances: return the workflow instances

Switches:
-initialize
(defaults to "false") (optional)
-orderby
(optional)
-creation_user
(optional)
-item_id
(optional)
-state
(optional)
Parameters:
wf

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc get_wf_instances xowf::test_item::Answer_manager instproc get_wf_instances test_create_test_items->xowf::test_item::Answer_manager instproc get_wf_instances

Testcases:
create_test_items

xowf::test_item::Answer_manager method grading_dialog_setup (public)

 <instance of xowf::test_item::Answer_manager[i]> grading_dialog_setup \
    examWf

Define the modal dialog and everything necessary for reusing this dialog for multiple occasions. This method registers the pop-up and dismiss handlers for JavaScript and returns the HTML markup of the modal dialog.

Parameters:
examWf
Returns:
HTML block for the modal dialog

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc grading_dialog_setup xowf::test_item::Answer_manager instproc grading_dialog_setup test_create_test_items->xowf::test_item::Answer_manager instproc grading_dialog_setup _ _ (public) xowf::test_item::Answer_manager instproc grading_dialog_setup->_ template::add_body_script template::add_body_script (public) xowf::test_item::Answer_manager instproc grading_dialog_setup->template::add_body_script xowiki::bootstrap::modal_dialog xowiki::bootstrap::modal_dialog (public) xowf::test_item::Answer_manager instproc grading_dialog_setup->xowiki::bootstrap::modal_dialog

Testcases:
create_test_items

xowf::test_item::Answer_manager method grading_scheme (public)

 <instance of xowf::test_item::Answer_manager[i]> grading_scheme \
    [ -examWf examWf ] [ -grading grading ] \
    [ -total_points total_points ]

Return the grading scheme object based on the provided short name. In case the grading scheme belongs to the predefined grading schemes, the object can be directly loaded. When the name refers to a user-defined grading object, this might have to be loaded. We could consider some hints about the usefulness of the chosen grading scheme, E.g., when an exam has 40 points or less, rounding has the potential effect that a high percentage of the grade is just due to rounding. So, in such cases a non-rounding scheme should be preferred.

Switches:
-examWf
(optional)
-grading
(optional)
-total_points
(defaults to "100") (optional)
Returns:
fully qualified grading scheme object

Partial Call Graph (max 5 caller/called nodes):
%3 xowf::test_item::grading::load_grading_schemes xowf::test_item::grading::load_grading_schemes (public) xowf::test_item::Answer_manager instproc grading_scheme xowf::test_item::Answer_manager instproc grading_scheme xowf::test_item::Answer_manager instproc grading_scheme->xowf::test_item::grading::load_grading_schemes

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method grading_table (public)

 <instance of xowf::test_item::Answer_manager[i]> grading_table \
    [ -csv csv ] grade_dict

Produce HTML markup based on a dict with grades as keys and counts as values.

Switches:
-csv
(optional)
Parameters:
grade_dict

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc grading_table xowf::test_item::Answer_manager instproc grading_table test_create_test_items->xowf::test_item::Answer_manager instproc grading_table _ _ (public) xowf::test_item::Answer_manager instproc grading_table->_ template::add_body_script template::add_body_script (public) xowf::test_item::Answer_manager instproc grading_table->template::add_body_script template::head::can_resolve_urn template::head::can_resolve_urn (public) xowf::test_item::Answer_manager instproc grading_table->template::head::can_resolve_urn

Testcases:
create_test_items

xowf::test_item::Answer_manager method last_time_in_state (public)

 <instance of xowf::test_item::Answer_manager[i]> last_time_in_state \
    -state state  revision_sets

Loops through revision sets and retrieves the latest date where state is equal the specified value.

Switches:
-state
(required)
Parameters:
revision_sets - a list of ns_sets containing revision data. List is assumed to be sorted in descending creation_date order (as retrieved by get_revision_sets)
Returns:
a date

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc last_time_in_state xowf::test_item::Answer_manager instproc last_time_in_state test_create_test_items->xowf::test_item::Answer_manager instproc last_time_in_state

Testcases:
create_test_items

xowf::test_item::Answer_manager method last_time_switched_to_state (public)

 <instance of xowf::test_item::Answer_manager[i]> last_time_switched_to_state \
    -state state  [ -before before ] revision_sets

Loops through revision sets and retrieves the latest date where state is equal the specified value.

Switches:
-state
(required)
-before
(optional)
Parameters:
revision_sets - a list of ns_sets containing revision data. List is assumed to be sorted in descending creation_date order (as retrieved by get_revision_sets)
Returns:
a date

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc last_time_switched_to_state xowf::test_item::Answer_manager instproc last_time_switched_to_state test_create_test_items->xowf::test_item::Answer_manager instproc last_time_switched_to_state xo::db::tcl_date xo::db::tcl_date (public) xowf::test_item::Answer_manager instproc last_time_switched_to_state->xo::db::tcl_date

Testcases:
create_test_items

xowf::test_item::Answer_manager method marked_results (public)

 <instance of xowf::test_item::Answer_manager[i]> marked_results \
    [ -obj obj ] [ -wf wf ] form_info

Return for every participant the individual results for an exam

Switches:
-obj
(optional)
-wf
(optional)
Parameters:
form_info

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc marked_results xowf::test_item::Answer_manager instproc marked_results test_create_test_items->xowf::test_item::Answer_manager instproc marked_results

Testcases:
create_test_items

xowf::test_item::Answer_manager method participants_table (public)

 <instance of xowf::test_item::Answer_manager[i]> participants_table \
    [ -package_id package_id ] [ -items items ] \
    [ -view_all_method view_all_method ] [ -state state ] wf

This method returns an HTML table containing a row for every participant with Name and short summary information. This table provides as well an interface for sending messages to this student.

Switches:
-package_id
(optional)
-items
(optional)
-view_all_method
(defaults to "print-answers") (optional)
-state
(defaults to "done") (optional)
Parameters:
wf

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc participants_table xowf::test_item::Answer_manager instproc participants_table test_create_test_items->xowf::test_item::Answer_manager instproc participants_table _ _ (public) xowf::test_item::Answer_manager instproc participants_table->_ ad_return_url ad_return_url (public) xowf::test_item::Answer_manager instproc participants_table->ad_return_url

Testcases:
create_test_items

xowf::test_item::Answer_manager method prevent_multiple_tabs (public)

 <instance of xowf::test_item::Answer_manager[i]> prevent_multiple_tabs \
    [ -cookie_name cookie_name ]

Prevent answering the same survey from multiple, concurrently open tabs.

Switches:
-cookie_name
(defaults to "multiple_tabs") (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc prevent_multiple_tabs xowf::test_item::Answer_manager instproc prevent_multiple_tabs test_create_test_items->xowf::test_item::Answer_manager instproc prevent_multiple_tabs template::add_body_script template::add_body_script (public) xowf::test_item::Answer_manager instproc prevent_multiple_tabs->template::add_body_script

Testcases:
create_test_items

xowf::test_item::Answer_manager method recutil_create (public)

 <instance of xowf::test_item::Answer_manager[i]> recutil_create \
    [ -exam_id exam_id ] [ -fn fn ] [ -clear ]

Create recfile

Switches:
-exam_id
(optional)
-fn
(defaults to "answers.rec") (optional)
-clear
(optional)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method render_answers (public)

 <instance of xowf::test_item::Answer_manager[i]> render_answers \
    [ -as_student on|off ] \
    [ -filter_submission_id filter_submission_id ] \
    [ -creation_user creation_user ] [ -revision_id revision_id ] \
    [ -filter_form_ids filter_form_ids ] [ -export on|off ] \
    [ -orderby orderby ] [ -grading grading ] \
    [ -with_grading_table on|off ] examWf

Return the answers in HTML format in a somewhat printer friendly way, e.g. as the exam protocol.

Switches:
-as_student
(boolean) (defaults to "false") (optional)
-filter_submission_id
(optional)
-creation_user
(optional)
-revision_id
(optional)
-filter_form_ids
(optional)
-export
(boolean) (defaults to "false") (optional)
-orderby
(defaults to "online-exam-userName") (optional)
-grading
(optional)
-with_grading_table
(boolean) (defaults to "false") (optional)
Parameters:
examWf
Returns:
dict containing "do_stream" and "HTML" ns_log notice "RENDER ANSWERS 0"

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc render_answers xowf::test_item::Answer_manager instproc render_answers test_create_test_items->xowf::test_item::Answer_manager instproc render_answers _ _ (public) xowf::test_item::Answer_manager instproc render_answers->_ acs_user::get_element acs_user::get_element (public) xowf::test_item::Answer_manager instproc render_answers->acs_user::get_element ad_conn ad_conn (public) xowf::test_item::Answer_manager instproc render_answers->ad_conn ad_parse_template ad_parse_template (public) xowf::test_item::Answer_manager instproc render_answers->ad_parse_template ad_return_top_of_page ad_return_top_of_page (public) xowf::test_item::Answer_manager instproc render_answers->ad_return_top_of_page

Testcases:
create_test_items

xowf::test_item::Answer_manager method render_answers_with_edit_history (public)

 <instance of xowf::test_item::Answer_manager[i]> render_answers_with_edit_history \
    examWf

Analyze the student submissions an find situations, where input is "cleared" between revisions and return the HTML rendering. TODO: we should resolve this, move the exam protocol rendering (www-print-answers) also into the answer manager and make it configurable to provide this as an alternate item renderer. The current result is provided for all submission,s, but in general, this could be as well made available per question or per-student.

Parameters:
examWf
Returns:
HTML

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method results_table (public)

 <instance of xowf::test_item::Answer_manager[i]> results_table \
    [ -package_id package_id ] [ -items items ] \
    [ -view_all_method view_all_method ] [ -with_answers on|off ] \
    [ -state state ] [ -grading_scheme grading_scheme ] wf

Render the results in format of a table and return HTML. Currently mostly deactivated (but potentially called by online-exam.wf and topic-assignment.wf).

Switches:
-package_id
(optional)
-items
(optional)
-view_all_method
(defaults to "print-answers") (optional)
-with_answers
(boolean) (defaults to "true") (optional)
-state
(defaults to "done") (optional)
-grading_scheme
(defaults to "::xowf::test_item::grading::none") (optional)
Parameters:
wf

Partial Call Graph (max 5 caller/called nodes):
%3 ad_return_url ad_return_url (public) xowf::test_item::Answer_manager instproc results_table xowf::test_item::Answer_manager instproc results_table xowf::test_item::Answer_manager instproc results_table->ad_return_url

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method revisions_up_to (public)

 <instance of xowf::test_item::Answer_manager[i]> revisions_up_to \
    revision_sets revision_id

Return the revisions of the provided revision set up the provided revision_id. If this revision_id does not exist, return the full set.

Parameters:
revision_sets
revision_id

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc revisions_up_to xowf::test_item::Answer_manager instproc revisions_up_to test_create_test_items->xowf::test_item::Answer_manager instproc revisions_up_to

Testcases:
create_test_items

xowf::test_item::Answer_manager method runtime_panel (public)

 <instance of xowf::test_item::Answer_manager[i]> runtime_panel \
    [ -revision_id revision_id ] [ -view view ] \
    [ -grading_info grading_info ] answerObj

Return statistics for the provided object in the form of HTML: - minimal statistics: when view default - statistics with clickable revisions: when view = revision_overview - per-revision statistics: when view = revision_overview and revision_id is provided

Switches:
-revision_id
(optional)
-view
(defaults to "default") (optional)
-grading_info
(optional)
Parameters:
answerObj
Returns:
HTML block

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc runtime_panel xowf::test_item::Answer_manager instproc runtime_panel test_create_test_items->xowf::test_item::Answer_manager instproc runtime_panel ad_return_url ad_return_url (public) xowf::test_item::Answer_manager instproc runtime_panel->ad_return_url xo::db::tcl_date xo::db::tcl_date (public) xowf::test_item::Answer_manager instproc runtime_panel->xo::db::tcl_date xo::update_query xo::update_query (private) xowf::test_item::Answer_manager instproc runtime_panel->xo::update_query

Testcases:
create_test_items

xowf::test_item::Answer_manager method set_exam_results (public)

 <instance of xowf::test_item::Answer_manager[i]> set_exam_results \
    [ -obj obj ] property value

ns_log notice "SES '$property' bytes [string length $value]"

Switches:
-obj
(optional)
Parameters:
property
value

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc set_exam_results xowf::test_item::Answer_manager instproc set_exam_results test_create_test_items->xowf::test_item::Answer_manager instproc set_exam_results

Testcases:
create_test_items

xowf::test_item::Answer_manager method state_periods (public)

 <instance of xowf::test_item::Answer_manager[i]> state_periods \
    -state state  revision_sets

Return for the provided revision_sets the time ranges the workflow was in the provided state.

Switches:
-state
(required)
Parameters:
revision_sets

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc state_periods xowf::test_item::Answer_manager instproc state_periods test_create_test_items->xowf::test_item::Answer_manager instproc state_periods

Testcases:
create_test_items

xowf::test_item::Answer_manager method student_submissions_exist (public)

 <instance of xowf::test_item::Answer_manager[i]> student_submissions_exist \
    wf

Returns 1 if there are student submissions. The method returns already true, when a student has started to work on this exam. This method could be optimized if necessary via caching the wf_instances or a more specific database query.

Parameters:
wf

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Answer_manager instproc student_submissions_exist xowf::test_item::Answer_manager instproc student_submissions_exist test_create_test_items->xowf::test_item::Answer_manager instproc student_submissions_exist

Testcases:
create_test_items

xowf::test_item::Answer_manager method time_window_setup (public)

 <instance of xowf::test_item::Answer_manager[i]> time_window_setup \
    -time_window time_window  parentObj

Check the provided time_window values, adjust it if necessary, and make sure, according atjobs are provided. This method was made public, since there configuration window update in inclass-exam.wf requires this for the update via update_attribute_from_slot. Probably, we should move the core of this function to this file, and make it protected again.

Switches:
-time_window
(required)
Parameters:
parentObj

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method waiting_room_message (public)

 <instance of xowf::test_item::Answer_manager[i]> waiting_room_message \
    obj

Renders the waiting room message, including the JavaScript reacting to actions from the backend.

Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) template::add_body_script template::add_body_script (public) xowiki::bootstrap::card xowiki::bootstrap::card (public) xowf::test_item::Answer_manager instproc waiting_room_message xowf::test_item::Answer_manager instproc waiting_room_message xowf::test_item::Answer_manager instproc waiting_room_message->_ xowf::test_item::Answer_manager instproc waiting_room_message->template::add_body_script xowf::test_item::Answer_manager instproc waiting_room_message->xowiki::bootstrap::card

Testcases:
No testcase defined.

xowf::test_item::AssessmentInterface method render_feedback_files (public)

 <instance of xowf::test_item::AssessmentInterface[i]> render_feedback_files \
    -question_name question_name  [ -feedbackFiles feedbackFiles ]

Render feedback files which are children of the submit instances. Note that one submit instances contains the feedback files for all questions. For associating the files with the right quesitions, the content repository name has to start with "file:${questions_name}/*

Switches:
-question_name
(required)
name (prefix) for selecting files to be shown
-feedbackFiles
(optional)
is of pairs containing "item_id" and "name"
Returns:
HTML rendering

Partial Call Graph (max 5 caller/called nodes):
%3 ad_return_url ad_return_url (public) template::adp_parse_tags template::adp_parse_tags (public) xowf::test_item::AssessmentInterface instproc render_feedback_files xowf::test_item::AssessmentInterface instproc render_feedback_files xowf::test_item::AssessmentInterface instproc render_feedback_files->ad_return_url xowf::test_item::AssessmentInterface instproc render_feedback_files->template::adp_parse_tags

Testcases:
No testcase defined.

xowf::test_item::Question_manager method add_seeds (public)

 <instance of xowf::test_item::Question_manager[i]> add_seeds \
    [ -obj obj ] [ -seed seed ] [ -number number ]

Add property "seed" to the provided object, consisting of a list of the specified number of random values starting with a base seed. This can be used to use e.g. per user different random seeds depending on the position of an item.

Switches:
-obj
(optional)
-seed
(optional)
-number
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc add_seeds xowf::test_item::Question_manager instproc add_seeds test_create_test_items->xowf::test_item::Question_manager instproc add_seeds

Testcases:
create_test_items

xowf::test_item::Question_manager method aggregated_form (public)

 <instance of xowf::test_item::Question_manager[i]> aggregated_form \
    [ -titleless_form ] [ -with_feedback ] [ -with_correction_notes ] \
    [ -with_grading_box with_grading_box ] question_infos

Compute an aggregated form (containing potentially multiple questions) based on the chunks available in question_infos.

Switches:
-titleless_form
(defaults to "false") (optional)
-with_feedback
(defaults to "false") (optional)
-with_correction_notes
(defaults to "false") (optional)
-with_grading_box
(optional)
might be: "hidden" (but included), "true", "" (omitted)
Parameters:
question_infos
Returns:
HTML form content

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_composite_test_item create_composite_test_item (test xowf) xowf::test_item::Question_manager instproc aggregated_form xowf::test_item::Question_manager instproc aggregated_form test_create_composite_test_item->xowf::test_item::Question_manager instproc aggregated_form xowiki::bootstrap::icon xowiki::bootstrap::icon (public) xowf::test_item::Question_manager instproc aggregated_form->xowiki::bootstrap::icon

Testcases:
create_composite_test_item

xowf::test_item::Question_manager method combined_question_form (public)

 <instance of xowf::test_item::Question_manager[i]> combined_question_form \
    [ -with_numbers ] [ -with_title ] [ -with_minutes ] \
    [ -with_points ] [ -user_specific ] [ -shuffle_id shuffle_id ] \
    [ -user_answers user_answers ] [ -form_objs form_objs ] obj

For the provided assessment, return a combined question_form as a single (combined) form, containing the content of all question forms. The result is a dict, containing also title information etc. depending on the provided parameters.

Switches:
-with_numbers
(defaults to "false") (optional)
-with_title
(defaults to "false") (optional)
-with_minutes
(defaults to "false") (optional)
-with_points
(defaults to "false") (optional)
-user_specific
(defaults to "false") (optional)
-shuffle_id
(defaults to "-1") (optional)
used only for selecting form_objs
-user_answers
(optional)
instance of the answer-wf. Needed for user-specific percent substitutions.
-form_objs
(optional)
Parameters:
obj - is the exam

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc combined_question_form xowf::test_item::Question_manager instproc combined_question_form test_create_test_items->xowf::test_item::Question_manager instproc combined_question_form

Testcases:
create_test_items

xowf::test_item::Question_manager method current_question_form (public)

 <instance of xowf::test_item::Question_manager[i]> current_question_form \
    [ -with_numbers ] [ -with_title ] obj

Return the current form object of the provided assessment.

Switches:
-with_numbers
(defaults to "false") (optional)
-with_title
(defaults to "false") (optional)
Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Question_manager method current_question_number (public)

 <instance of xowf::test_item::Question_manager[i]> current_question_number \
    obj

Translate the position of an object into its question number (as e.g. used by current_question_title).

Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Question_manager method current_question_obj (public)

 <instance of xowf::test_item::Question_manager[i]> current_question_obj \
    obj

Load the current question obj based on the current question name.

Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Question_manager method current_question_title (public)

 <instance of xowf::test_item::Question_manager[i]> current_question_title \
    [ -with_numbers ] obj

In case, with_numbers is provided, return a internationalized title for the question, such as "Question 1".

Switches:
-with_numbers
(defaults to "false") (optional)
Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Question_manager method describe_form (public)

 <instance of xowf::test_item::Question_manager[i]> describe_form \
    [ -asHTML ] [ -field_name field_name ] form_obj

Call for every form field of the form_obj the "describe" method and return these infos in a form of a list.

Switches:
-asHTML
(optional)
-field_name
(optional)
Parameters:
form_obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_composite_test_item create_composite_test_item (test xowf) xowf::test_item::Question_manager instproc describe_form xowf::test_item::Question_manager instproc describe_form test_create_composite_test_item->xowf::test_item::Question_manager instproc describe_form

Testcases:
create_composite_test_item

xowf::test_item::Question_manager method disallow_paste (public)

 <instance of xowf::test_item::Question_manager[i]> disallow_paste \
    form_obj

This function changes the form_constraints of the provided form object by adding "paste=false" properties to textarea or text_fields entries.

Parameters:
form_obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc disallow_paste xowf::test_item::Question_manager instproc disallow_paste test_create_test_items->xowf::test_item::Question_manager instproc disallow_paste

Testcases:
create_test_items

xowf::test_item::Question_manager method disallow_spellcheck (public)

 <instance of xowf::test_item::Question_manager[i]> disallow_spellcheck \
    form_obj

This function changes the form_constraints of the provided form object by adding "spellcheck=false" properties to textarea or text_fields entries.

Parameters:
form_obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc disallow_spellcheck xowf::test_item::Question_manager instproc disallow_spellcheck test_create_test_items->xowf::test_item::Question_manager instproc disallow_spellcheck

Testcases:
create_test_items

xowf::test_item::Question_manager method disallow_translation (public)

 <instance of xowf::test_item::Question_manager[i]> disallow_translation \
    form_obj

This function disallows translation of the full page by setting the HTML5 "translate" attribute of the body to "no".

Parameters:
form_obj

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Question_manager method exam_base_time (public)

 <instance of xowf::test_item::Question_manager[i]> exam_base_time \
    [ -manager manager ] [ -answer_obj answer_obj ]

Calculate the exam base time for a student. This is the time reference, when the timer starts. Depending on whether the exam is synchronous, the time start is either the time when the exam is opened, or when the student starts the exam.

Switches:
-manager
(optional)
-answer_obj
(optional)
Returns:
time string as returned from the database

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc exam_base_time xowf::test_item::Question_manager instproc exam_base_time test_create_test_items->xowf::test_item::Question_manager instproc exam_base_time

Testcases:
create_test_items

xowf::test_item::Question_manager method exam_configuration_modifiable_field_names (public)

 <instance of xowf::test_item::Question_manager[i]> exam_configuration_modifiable_field_names \
    obj

Return the names of the modifiable field names in the current state. The state is in essence defined on whether or not students have started to work on this exam. This method can be used to correct small things, even when the students are already working on the exam.

Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc exam_configuration_modifiable_field_names xowf::test_item::Question_manager instproc exam_configuration_modifiable_field_names test_create_test_items->xowf::test_item::Question_manager instproc exam_configuration_modifiable_field_names

Testcases:
create_test_items

xowf::test_item::Question_manager method exam_configuration_popup (public)

 <instance of xowf::test_item::Question_manager[i]> exam_configuration_popup \
    obj

Render the exam configuration popup, add it as a content_header (to avoid putting it to the main workflow form, since nested FORMS are not allowed) and return the rendering of the button for popping-ip the configuration modal.

Parameters:
obj
Returns:
HTML

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc exam_configuration_popup xowf::test_item::Question_manager instproc exam_configuration_popup test_create_test_items->xowf::test_item::Question_manager instproc exam_configuration_popup template::add_body_script template::add_body_script (public) xowf::test_item::Question_manager instproc exam_configuration_popup->template::add_body_script xowiki::bootstrap::icon xowiki::bootstrap::icon (public) xowf::test_item::Question_manager instproc exam_configuration_popup->xowiki::bootstrap::icon xowiki::bootstrap::modal_dialog xowiki::bootstrap::modal_dialog (public) xowf::test_item::Question_manager instproc exam_configuration_popup->xowiki::bootstrap::modal_dialog xowiki::bootstrap::modal_dialog_popup_button xowiki::bootstrap::modal_dialog_popup_button (public) xowf::test_item::Question_manager instproc exam_configuration_popup->xowiki::bootstrap::modal_dialog_popup_button

Testcases:
create_test_items

xowf::test_item::Question_manager method exam_info_block (public)

 <instance of xowf::test_item::Question_manager[i]> exam_info_block \
    [ -combined_form_info combined_form_info ] obj

Provide a summative overview of an exam.

Switches:
-combined_form_info
(optional)
Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc exam_info_block xowf::test_item::Question_manager instproc exam_info_block test_create_test_items->xowf::test_item::Question_manager instproc exam_info_block _ _ (public) xowf::test_item::Question_manager instproc exam_info_block->_

Testcases:
create_test_items

xowf::test_item::Question_manager method exam_target_time (public)

 <instance of xowf::test_item::Question_manager[i]> exam_target_time \
    [ -manager manager ] [ -base_time base_time ]

Calculate the exam target time (finishing time) based on the duration of the exam plus the provided base_time (which is in the format returned by SQL)

Switches:
-manager
(optional)
exam workflow
-base_time
(optional)
time in SQL format

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc exam_target_time xowf::test_item::Question_manager instproc exam_target_time test_create_test_items->xowf::test_item::Question_manager instproc exam_target_time xo::db::tcl_date xo::db::tcl_date (public) xowf::test_item::Question_manager instproc exam_target_time->xo::db::tcl_date

Testcases:
create_test_items

xowf::test_item::Question_manager method get_pool_questions (public)

 <instance of xowf::test_item::Question_manager[i]> get_pool_questions \
    [ -allowed_forms allowed_forms ] [ -field_name field_name ] \
    pool_question_obj exam_question_names

Obtain for the specs in the pool_question_obj potential replacement items in form of a replacement dict. For raw forms (i.e., not obtained via the renaming form-loader), we have just the plain "answer", which can be provided via the "field_name" attribute.

Switches:
-allowed_forms
(defaults to "en:edit-interaction.wf") (optional)
-field_name
(optional)
Parameters:
pool_question_obj
exam_question_names

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Question_manager method goto_page (public)

 <instance of xowf::test_item::Question_manager[i]> goto_page obj \
    position

ns_log notice "===== goto_page $position" Set the position (test item number) of the workflow (exam). This sets the question number shown to the user.

Parameters:
obj
position

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Question_manager method hint_boxes (public)

 <instance of xowf::test_item::Question_manager[i]> hint_boxes \
    [ -question_obj question_obj ] [ -with_feedback ] \
    [ -with_correction_notes ]

Render the hint boxes (feedback and correction notes) for a question object.

Switches:
-question_obj
(optional)
-with_feedback
(optional)
-with_correction_notes
(optional)
Returns:
HTML

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Question_manager method initialize (public)

 <instance of xowf::test_item::Question_manager[i]> initialize \
    [ -wfi wfi ]

Initialize the question manager for a certain workflow instance. This is needed for per-answer-workflow questions (as for pool questions, where different questions are taken for different users).

Switches:
-wfi
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc initialize xowf::test_item::Question_manager instproc initialize test_create_test_items->xowf::test_item::Question_manager instproc initialize

Testcases:
create_test_items

xowf::test_item::Question_manager method item_substitute_markup (public)

 <instance of xowf::test_item::Question_manager[i]> item_substitute_markup \
    [ -obj obj ] [ -form_obj form_obj ] [ -position position ] \
    [ -do_substitutions ]

Substitute everything item-specific in the text, including markup (handling e.g. images resolving in the context of the original question) and also percent-substitutions (if desired). ns_log notice "=== item_substitute_markup [$form_obj name] do percent subst (have pos [info exists position])"

Switches:
-obj
(optional)
-form_obj
(optional)
-position
(optional)
-do_substitutions
(defaults to "1") (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc item_substitute_markup xowf::test_item::Question_manager instproc item_substitute_markup test_create_test_items->xowf::test_item::Question_manager instproc item_substitute_markup

Testcases:
create_test_items

xowf::test_item::Question_manager method load_question_objs (public)

 <instance of xowf::test_item::Question_manager[i]> load_question_objs \
    obj names

Load the question objects for the provided question names and return the question objs.

Parameters:
obj
names

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc load_question_objs xowf::test_item::Question_manager instproc load_question_objs test_create_test_items->xowf::test_item::Question_manager instproc load_question_objs

Testcases:
create_test_items

xowf::test_item::Question_manager method minutes_string (public)

 <instance of xowf::test_item::Question_manager[i]> minutes_string \
    form_obj

Get an attribute of the original question

Parameters:
form_obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc minutes_string xowf::test_item::Question_manager instproc minutes_string test_create_test_items->xowf::test_item::Question_manager instproc minutes_string _ _ (public) xowf::test_item::Question_manager instproc minutes_string->_

Testcases:
create_test_items

xowf::test_item::Question_manager method more_ahead (public)

 <instance of xowf::test_item::Question_manager[i]> more_ahead \
    [ -position position ] obj

Return true, when this is for the current user not the last question.

Switches:
-position
(optional)
Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc more_ahead xowf::test_item::Question_manager instproc more_ahead test_create_test_items->xowf::test_item::Question_manager instproc more_ahead

Testcases:
create_test_items

xowf::test_item::Question_manager method nth_question_form (public)

 <instance of xowf::test_item::Question_manager[i]> nth_question_form \
    [ -position position ] [ -item_nr item_nr ] [ -with_numbers ] \
    [ -with_title ] [ -titleless_form ] [ -with_minutes ] obj

Return the question_info of the nth form (question) of the assessment. The information added to the title can be optionally included as expressed by the non-positional parameters.

Switches:
-position
(optional)
-item_nr
(optional)
-with_numbers
(defaults to "false") (optional)
-with_title
(defaults to "false") (optional)
-titleless_form
(defaults to "false") (optional)
-with_minutes
(defaults to "false") (optional)
Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc nth_question_form xowf::test_item::Question_manager instproc nth_question_form test_create_test_items->xowf::test_item::Question_manager instproc nth_question_form

Testcases:
create_test_items

xowf::test_item::Question_manager method nth_question_obj (public)

 <instance of xowf::test_item::Question_manager[i]> nth_question_obj \
    obj position

Return the nth question object of an assessment (based on position).

Parameters:
obj
position

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc nth_question_obj xowf::test_item::Question_manager instproc nth_question_obj test_create_test_items->xowf::test_item::Question_manager instproc nth_question_obj

Testcases:
create_test_items

xowf::test_item::Question_manager method pagination_actions (public)

 <instance of xowf::test_item::Question_manager[i]> pagination_actions \
    [ -container container ] [ -question_count question_count ] \
    [ -visited visited ] [ -flagged flagged ] \
    [ -current_position current_position ] [ -CSSclass CSSclass ]

Create actions used for pagination.

Switches:
-container
(optional)
-question_count
(optional)
-visited
(optional)
-flagged
(optional)
-current_position
(optional)
-CSSclass
(defaults to "btn-sm") (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc pagination_actions xowf::test_item::Question_manager instproc pagination_actions test_create_test_items->xowf::test_item::Question_manager instproc pagination_actions xowiki::bootstrap::icon xowiki::bootstrap::icon (public) xowf::test_item::Question_manager instproc pagination_actions->xowiki::bootstrap::icon

Testcases:
create_test_items

xowf::test_item::Question_manager method percent_substitute_in_form (public)

 <instance of xowf::test_item::Question_manager[i]> percent_substitute_in_form \
    [ -obj obj ] [ -form_obj form_obj ] [ -position position ] html

Perform percent substitution in the provided HTML, form_constraints and disabled_form_constraints and return the result as a dict.

Switches:
-obj
(optional)
-form_obj
(optional)
-position
(optional)
Parameters:
html

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_composite_test_item create_composite_test_item (test xowf) xowf::test_item::Question_manager instproc percent_substitute_in_form xowf::test_item::Question_manager instproc percent_substitute_in_form test_create_composite_test_item->xowf::test_item::Question_manager instproc percent_substitute_in_form

Testcases:
create_composite_test_item

xowf::test_item::Question_manager method points_string (public)

 <instance of xowf::test_item::Question_manager[i]> points_string \
    form_obj

Get an attribute of the original question

Parameters:
form_obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc points_string xowf::test_item::Question_manager instproc points_string test_create_test_items->xowf::test_item::Question_manager instproc points_string _ _ (public) xowf::test_item::Question_manager instproc points_string->_

Testcases:
create_test_items

xowf::test_item::Question_manager method question_count (public)

 <instance of xowf::test_item::Question_manager[i]> question_count \
    [ -all ] obj

Return the number questions in an exam. It is either the number of defined questions, or it might be restricted by the property max_items (if defined for "obj").

Switches:
-all
(defaults to "false") (optional)
Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc question_count xowf::test_item::Question_manager instproc question_count test_create_test_items->xowf::test_item::Question_manager instproc question_count

Testcases:
create_test_items

xowf::test_item::Question_manager method question_info (public)

 <instance of xowf::test_item::Question_manager[i]> question_info \
    [ -numbers numbers ] [ -with_title ] [ -with_minutes ] \
    [ -with_points ] [ -titleless_form ] [ -obj obj ] \
    [ -user_answers user_answers ] [ -no_position ] \
    [ -question_number_label question_number_label ] \
    [ -positions positions ] [ -with_question_count_in_title on|off ] \
    form_objs

Returns a dict containing "form", "title_infos", "form_constraints" "disabled_form_constraints" "randomization_for_exam" "autograde" and "question_objs". This information is obtained from the provided "form_objs".

Switches:
-numbers
(optional)
-with_title
(defaults to "false") (optional)
-with_minutes
(defaults to "false") (optional)
-with_points
(defaults to "false") (optional)
-titleless_form
(defaults to "false") (optional)
-obj
(optional)
-user_answers
(optional)
-no_position
(defaults to "false") (optional)
-question_number_label
(defaults to "Question") (optional)
-positions
(optional)
-with_question_count_in_title
(boolean) (defaults to "false") (optional)
Parameters:
form_objs
Returns:
dict containing "title_infos", "form_constraints", "disabled_form_constraints", "randomization_for_exam", "autograde", "question_forms", "question_objs"

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc question_info xowf::test_item::Question_manager instproc question_info test_create_test_items->xowf::test_item::Question_manager instproc question_info

Testcases:
create_test_items

xowf::test_item::Question_manager method question_info_block (public)

 <instance of xowf::test_item::Question_manager[i]> question_info_block \
    obj

Provide question info block.

Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Question_manager method question_names (public)

 <instance of xowf::test_item::Question_manager[i]> question_names \
    obj

Return the names of the questions of an assessment.

Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc question_names xowf::test_item::Question_manager instproc question_names test_create_test_items->xowf::test_item::Question_manager instproc question_names

Testcases:
create_test_items

xowf::test_item::Question_manager method question_objs (public)

 <instance of xowf::test_item::Question_manager[i]> question_objs \
    [ -shuffle_id shuffle_id ] obj

For the provided assessment object, return the question objects in the right order, depending on the shuffle_id.

Switches:
-shuffle_id
(defaults to "-1") (optional)
Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc question_objs xowf::test_item::Question_manager instproc question_objs test_create_test_items->xowf::test_item::Question_manager instproc question_objs xowiki::randomized_indices xowiki::randomized_indices (public) xowf::test_item::Question_manager instproc question_objs->xowiki::randomized_indices

Testcases:
create_test_items

xowf::test_item::Question_manager method question_property (public)

 <instance of xowf::test_item::Question_manager[i]> question_property \
    form_obj attribute [ default ]

Get an attribute of the original question

Parameters:
form_obj
attribute
default (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc question_property xowf::test_item::Question_manager instproc question_property test_create_test_items->xowf::test_item::Question_manager instproc question_property

Testcases:
create_test_items

xowf::test_item::Question_manager method question_statistics_block (public)

 <instance of xowf::test_item::Question_manager[i]> question_statistics_block \
    obj

When we have results, we can provide statistics

Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3 template::adp_variable_regexp template::adp_variable_regexp (public) template::head::add_link template::head::add_link (public) xowf::test_item::Question_manager instproc question_statistics_block xowf::test_item::Question_manager instproc question_statistics_block xowf::test_item::Question_manager instproc question_statistics_block->template::adp_variable_regexp xowf::test_item::Question_manager instproc question_statistics_block->template::head::add_link

Testcases:
No testcase defined.

xowf::test_item::Question_manager method question_summary (public)

 <instance of xowf::test_item::Question_manager[i]> question_summary \
    obj

Provide a summary of all questions of an exam.

Parameters:
obj

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Question_manager method questions_without_minutes (public)

 <instance of xowf::test_item::Question_manager[i]> questions_without_minutes \
    [ -max_items max_items ] form_info

Compute the number of questions without provided time

Switches:
-max_items
(optional)
Parameters:
form_info

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Question_manager method replace_pool_question (public)

 <instance of xowf::test_item::Question_manager[i]> replace_pool_question \
    [ -position position ] [ -seed seed ] \
    [ -allowed_forms allowed_forms ] [ -field_name field_name ] \
    [ -pool_question_obj pool_question_obj ] \
    [ -exam_question_names exam_question_names ]
Switches:
-position
(optional)
-seed
(optional)
-allowed_forms
(defaults to "en:edit-interaction.wf") (optional)
-field_name
(optional)
-pool_question_obj
(optional)
-exam_question_names
(optional)
Returns:
an initialized replacement form obj if this is possible

Partial Call Graph (max 5 caller/called nodes):
%3 ad_returnredirect ad_returnredirect (public) ad_script_abort ad_script_abort (public) util_user_message util_user_message (public) xowf::test_item::Question_manager instproc replace_pool_question xowf::test_item::Question_manager instproc replace_pool_question xowf::test_item::Question_manager instproc replace_pool_question->ad_returnredirect xowf::test_item::Question_manager instproc replace_pool_question->ad_script_abort xowf::test_item::Question_manager instproc replace_pool_question->util_user_message

Testcases:
No testcase defined.

xowf::test_item::Question_manager method replace_pool_questions (public)

 <instance of xowf::test_item::Question_manager[i]> replace_pool_questions \
    [ -answer_obj answer_obj ] [ -exam_obj exam_obj ]

Replaces all pool questions for the exam by random items. In case there were replacement items, set/update the property "question" for the individual answer_obj.

Switches:
-answer_obj
(optional)
the workflow instance of the answer workflow
-exam_obj
(optional)
the exam objject to which the answer_object belongs to

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc replace_pool_questions xowf::test_item::Question_manager instproc replace_pool_questions test_create_test_items->xowf::test_item::Question_manager instproc replace_pool_questions

Testcases:
create_test_items

xowf::test_item::Question_manager method shuffled_index (public)

 <instance of xowf::test_item::Question_manager[i]> shuffled_index \
    [ -shuffle_id shuffle_id ] obj position

Return the shuffled index position, in case shuffling is turned on.

Switches:
-shuffle_id
(defaults to "-1") (optional)
Parameters:
obj
position

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc shuffled_index xowf::test_item::Question_manager instproc shuffled_index test_create_test_items->xowf::test_item::Question_manager instproc shuffled_index xowiki::randomized_indices xowiki::randomized_indices (public) xowf::test_item::Question_manager instproc shuffled_index->xowiki::randomized_indices

Testcases:
create_test_items

xowf::test_item::Question_manager method total_minutes (public)

 <instance of xowf::test_item::Question_manager[i]> total_minutes \
    [ -max_items max_items ] form_info

Compute the duration of an exam based on the form_info dict.

Switches:
-max_items
(optional)
Parameters:
form_info

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc total_minutes xowf::test_item::Question_manager instproc total_minutes test_create_test_items->xowf::test_item::Question_manager instproc total_minutes

Testcases:
create_test_items

xowf::test_item::Question_manager method total_minutes_for_exam (public)

 <instance of xowf::test_item::Question_manager[i]> total_minutes_for_exam \
    [ -manager manager ]

Compute the total time of an exam, based on the minutes provided by the single questions.

Switches:
-manager
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc total_minutes_for_exam xowf::test_item::Question_manager instproc total_minutes_for_exam test_create_test_items->xowf::test_item::Question_manager instproc total_minutes_for_exam

Testcases:
create_test_items

xowf::test_item::Question_manager method total_points (public)

 <instance of xowf::test_item::Question_manager[i]> total_points \
    [ -max_items max_items ] form_info

Compute the maximum achievable points of an exam based on the form_info dict.

Switches:
-max_items
(optional)
Parameters:
form_info

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Question_manager instproc total_points xowf::test_item::Question_manager instproc total_points test_create_test_items->xowf::test_item::Question_manager instproc total_points

Testcases:
create_test_items

xowf::test_item::Renaming_form_loader method answer_attributes (public)

 <instance of xowf::test_item::Renaming_form_loader[i]> answer_attributes \
    instance_attributes

Return all form-loader specific attributes from instance_attributes.

Parameters:
instance_attributes

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Renaming_form_loader instproc answer_attributes xowf::test_item::Renaming_form_loader instproc answer_attributes test_create_test_items->xowf::test_item::Renaming_form_loader instproc answer_attributes

Testcases:
create_test_items

xowf::test_item::Renaming_form_loader method answer_for_form (public)

 <instance of xowf::test_item::Renaming_form_loader[i]> answer_for_form \
    formName instance_attributes

Return answer for the provided formName from instance_attributes of a single object.

Parameters:
formName
instance_attributes

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Renaming_form_loader method answers_for_form (public)

 <instance of xowf::test_item::Renaming_form_loader[i]> answers_for_form \
    formName answers

Return a list of dicts for the provided formName from the answers (as returned from [answer_manager get_answer_attributes ...]).

Parameters:
formName
answers

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::Renaming_form_loader method form_name_based_attribute_stem (public)

 <instance of xowf::test_item::Renaming_form_loader[i]> form_name_based_attribute_stem \
    formName

Produce from the provided 'formName' an attribute stem for the input fields of this form.

Parameters:
formName

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Renaming_form_loader instproc form_name_based_attribute_stem xowf::test_item::Renaming_form_loader instproc form_name_based_attribute_stem test_create_test_items->xowf::test_item::Renaming_form_loader instproc form_name_based_attribute_stem

Testcases:
create_test_items

xowf::test_item::Renaming_form_loader method name_to_question_obj_dict (public)

 <instance of xowf::test_item::Renaming_form_loader[i]> name_to_question_obj_dict \
    question_objs

Produce a dict for attribute name to question_obj

Parameters:
question_objs

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Renaming_form_loader instproc name_to_question_obj_dict xowf::test_item::Renaming_form_loader instproc name_to_question_obj_dict test_create_test_items->xowf::test_item::Renaming_form_loader instproc name_to_question_obj_dict

Testcases:
create_test_items

xowf::test_item::Renaming_form_loader method rename_attributes (public)

 <instance of xowf::test_item::Renaming_form_loader[i]> rename_attributes \
    form_obj

Perform attribute renaming in the provided form_obj and return this form_obj. In essence, this changes the generic "@answer@" value in the form and in the form constraints to a name based on the form name.

Parameters:
form_obj

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::Renaming_form_loader instproc rename_attributes xowf::test_item::Renaming_form_loader instproc rename_attributes test_create_test_items->xowf::test_item::Renaming_form_loader instproc rename_attributes

Testcases:
create_test_items
[ show source ]