test-item-procs.tcl

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

This file defines the following Objects and Classes: ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::renaming_form_loader[i], ::xowf::test_item::question_manager[i], ::xowf::test_item::answer_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::Answer_manager[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::AssessmentInterface[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Question_manager[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[i], ::xowf::test_item::Renaming_form_loader[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

Testcases:
No testcase defined.

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

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

Abstract class for common functionality

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

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

Testcases:
No testcase defined.

Object ::xowf::test_item::answer_manager (public)

 ::xowf::test_item::Answer_manager ::xowf::test_item::answer_manager[i]

Interface object to Answer manager for the test items as used in inclass exam and similar learning workflows. It is used for general answer management of the submitted test items, including answer workflow creation and deletion of submissions.

See Also:

Testcases:
No testcase defined.

Object ::xowf::test_item::question_manager (public)

 ::xowf::test_item::Question_manager ::xowf::test_item::question_manager[i]

Interface object to Question manager for the test items as used in inclass exam and similar learning workflows. It is used for general question (test item) management of quizzes and exams. It is used, e.g., for navigation between test-items, obtaining information about test items, including achievable and achieved points, and for providing statistics across test items.

See Also:

Testcases:
No testcase defined.

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 (required, object)

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 (optional, boolean, defaults to "false")
-reply (optional, defaults to "false")
when false, csv will be returned as text, when true, it will be returned as response to the browser.
-format (optional, defaults to "csv")
-orderby (optional, defaults to "participant,desc")
Parameters:
results_dict (required)
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

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 (required, object)
-submission (optional, object)

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method export_file_submission (protected)

 <instance of xowf::test_item::Answer_manager[i]> export_file_submission \
    [ -submission submission ] [ -zipFile zipFile ] \
    [ -check_for_file_submission_exists on|off ]

Get all nonempty file form-fields and add these to a zip file. The filename is composed of the user, the exercise and the provided file-name.

Switches:
-submission (optional, object)
-zipFile (optional, object)
-check_for_file_submission_exists (optional, boolean, defaults to "false")

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method get_label_from_options (protected)

 <instance of xowf::test_item::Answer_manager[i]> get_label_from_options \
    value options
Parameters:
value (required)
options (required)

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method get_non_empty_file_formfields (protected)

 <instance of xowf::test_item::Answer_manager[i]> get_non_empty_file_formfields \
    [ -submission submission ]
Switches:
-submission (optional, object)

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method participant_result (protected)

 <instance of xowf::test_item::Answer_manager[i]> participant_result \
    [ -obj obj ] answerObj form_info form_field_objs
Switches:
-obj (optional, object)
Parameters:
answerObj (required, object)
form_info (required)
form_field_objs (required)

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method postprocess_question_html (protected)

 <instance of xowf::test_item::Answer_manager[i]> postprocess_question_html \
    -question_form question_form  -achieved_points achieved_points  \
    -manual_grading manual_grading  -submission submission  \
    -runtime_panel_view runtime_panel_view  -exam_state exam_state  \
    [ -feedbackFiles feedbackFiles ]

Post-process the HTML of a question by adding information of the student as data attributes, such as achieved and achievable points, setting CSS classes, mangling names of composite questions to match with the data in achieved_points,

Switches:
-question_form (required)
-achieved_points (required)
-manual_grading (required)
-submission (required, object)
-runtime_panel_view (required)
-exam_state (required)
-feedbackFiles (optional)
Returns:
HTML block

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method pretty_formfield_name (protected)

 <instance of xowf::test_item::Answer_manager[i]> pretty_formfield_name \
    f_obj
Parameters:
f_obj (required)

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method pretty_period (protected)

 <instance of xowf::test_item::Answer_manager[i]> pretty_period \
    [ -dayfmt dayfmt ] [ -timefmt timefmt ] from to
Switches:
-dayfmt (optional, defaults to "%q")
-timefmt (optional, defaults to "%H:%M")
Parameters:
from (required)
to (required)

Testcases:
No testcase defined.

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, integer)
-fn (optional, defaults to "answers.rec")
-clear (optional)
See Also:

Testcases:
No testcase defined.

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 (required, object)
Returns:
HTML

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method render_filter_bar (protected)

 <instance of xowf::test_item::Answer_manager[i]> render_filter_bar \
    [ -examWf examWf ] [ -filter_form_ids filter_form_ids ] \
    [ -revision_id revision_id ] \
    [ -filter_submission_id filter_submission_id ] \
    [ -orderby orderby ]

Render a bar to filter, sort and export exam submissions.

Switches:
-examWf (optional, object)
-filter_form_ids (optional, integer)
-revision_id (optional, integer, accept empty)
-filter_submission_id (optional, integer, accept empty)
-orderby (optional, defaults to "online-exam-userName")
Returns:
HTML

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method render_full_submission_form (protected)

 <instance of xowf::test_item::Answer_manager[i]> render_full_submission_form \
    [ -wf wf ] [ -submission submission ] \
    [ -filter_form_ids filter_form_ids ] [ -with_feedback ] \
    [ -with_correction_notes ]

Compute the HTML of the full submission of the user with all form fields instantiated according to randomization.

Switches:
-wf (optional, object)
-submission (optional, object)
-filter_form_ids (optional, integer)
used for filtering questions
-with_feedback (optional)
-with_correction_notes (optional)
Returns:
HTML of question form object containing all (wanted) questions

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method render_print_button (protected)

 <instance of xowf::test_item::Answer_manager[i]> render_print_button

Render a simple print button for the unaware that makes it easy to print the exam protocol to PDF and use e.g. a pdf-tool to annotate free text answers. The function is designed to work with streaming HTML output.

Returns:
HTML rendering

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method render_proctor_images (protected)

 <instance of xowf::test_item::Answer_manager[i]> render_proctor_images \
    [ -submission submission ] [ -revisions revisions ] \
    [ -examWf examWf ] [ -revision_id revision_id ]

Render proctor images the provided submission.

Switches:
-submission (optional, object)
-revisions (optional)
-examWf (optional, object)
-revision_id (optional)
Returns:
HTML

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method render_submission=edit_history (protected)

 <instance of xowf::test_item::Answer_manager[i]> render_submission=edit_history \
    [ -submission submission ] [ -examWf examWf ] \
    [ -nameToQuestionObj nameToQuestionObj ]
Switches:
-submission (optional, object)
-examWf (optional, object)
-nameToQuestionObj (optional)

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method render_submission=exam_protocol (protected)

 <instance of xowf::test_item::Answer_manager[i]> render_submission=exam_protocol \
    [ -autograde on|off ] [ -combined_form_info combined_form_info ] \
    [ -examWf examWf ] [ -exam_question_dict exam_question_dict ] \
    [ -filter_submission_id filter_submission_id ] \
    [ -filter_form_ids filter_form_ids ] \
    [ -grading_scheme grading_scheme ] [ -recutil recutil ] \
    [ -zipFile zipFile ] [ -revision_id revision_id ] \
    [ -submission submission ] [ -totalPoints totalPoints ] \
    [ -runtime_panel_view runtime_panel_view ] [ -wf wf ] \
    [ -with_signature on|off ] [ -with_exam_heading on|off ]
Switches:
-autograde (optional, boolean, defaults to "false")
-combined_form_info (optional)
-examWf (optional, object)
-exam_question_dict (optional)
-filter_submission_id (optional, integer, accept empty)
-filter_form_ids (optional, integer)
-grading_scheme (optional, object)
-recutil (optional, object, accept empty)
-zipFile (optional, object, accept empty)
-revision_id (optional, integer, accept empty)
-submission (optional, object)
-totalPoints (optional)
-runtime_panel_view (optional, defaults to "default")
-wf (optional, object)
-with_signature (optional, boolean, defaults to "false")
-with_exam_heading (optional, boolean, defaults to "true")

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method render_submissions=edit_history (protected)

 <instance of xowf::test_item::Answer_manager[i]> render_submissions=edit_history \
    [ -examWf examWf ] [ -submissions submissions ]
Switches:
-examWf (optional, object)
-submissions (optional, object)

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, integer)
-items (required, object)
-view_all_method (optional, defaults to "print-answers")
-with_answers (optional, boolean, defaults to "true")
-state (optional, defaults to "done")
-grading_scheme (optional, defaults to "::xowf::test_item::grading::none")
Parameters:
wf (required, object)

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method submissions (protected)

 <instance of xowf::test_item::Answer_manager[i]> submissions \
    [ -creation_user creation_user ] \
    [ -filter_submission_id filter_submission_id ] \
    [ -revision_id revision_id ] [ -wf wf ]

Return an ordered composite built form all student submission, potentially filtered via the provided values.

Switches:
-creation_user (optional, integer, accept empty)
-filter_submission_id (optional, integer, accept empty)
-revision_id (optional, integer, accept empty)
-wf (optional, object)

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 (required, object)

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method dom class add (protected)

 <instance of xowf::test_item::Answer_manager[i]> dom class add \
    domNode xquery class
Parameters:
domNode (required)
xquery (required)
class (required)

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method dom class remove (protected)

 <instance of xowf::test_item::Answer_manager[i]> dom class remove \
    domNode xquery class
Parameters:
domNode (required)
xquery (required)
class (required)

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method dom node appendXML (protected)

 <instance of xowf::test_item::Answer_manager[i]> dom node appendXML \
    domNode xquery XML
Parameters:
domNode (required)
xquery (required)
XML (required)

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method dom node delete (protected)

 <instance of xowf::test_item::Answer_manager[i]> dom node delete \
    domNode xquery
Parameters:
domNode (required)
xquery (required)

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method dom node replaceXML (protected)

 <instance of xowf::test_item::Answer_manager[i]> dom node replaceXML \
    domNode xquery XML
Parameters:
domNode (required)
xquery (required)
XML (required)

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method dom node replace (protected)

 <instance of xowf::test_item::Answer_manager[i]> dom node replace \
    domNode xquery script
Parameters:
domNode (required)
xquery (required)
script (required)

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method result_table per_participant (protected)

 <instance of xowf::test_item::Answer_manager[i]> result_table per_participant \
    [ -manual_gradings manual_gradings ] \
    [ -gradingScheme gradingScheme ] [ -only_grades on|off ] \
    results_dict
Switches:
-manual_gradings (optional)
-gradingScheme (optional)
-only_grades (optional, boolean, defaults to "false")
Parameters:
results_dict (required)

Testcases:
No testcase defined.

xowf::test_item::Answer_manager method result_table per_question (protected)

 <instance of xowf::test_item::Answer_manager[i]> result_table per_question \
    [ -manual_gradings manual_gradings ] results_dict
Switches:
-manual_gradings (optional)
Parameters:
results_dict (required)

Testcases:
No testcase defined.

xowf::test_item::AssessmentInterface method add_to_fc (protected)

 <instance of xowf::test_item::AssessmentInterface[i]> add_to_fc \
    -fc fc  [ -position position ] [ -minutes minutes ] \
    [ -points points ]
Switches:
-fc (required)
-position (optional)
-minutes (optional)
-points (optional)

Testcases:
No testcase defined.

xowf::test_item::AssessmentInterface method assert_answer_instance (protected)

 <instance of xowf::test_item::AssessmentInterface[i]> assert_answer_instance \
    o

we could include as well {[$o property answer] ne ""} in case we initialize it

Parameters:
o (required, object)

Testcases:
No testcase defined.

xowf::test_item::AssessmentInterface method assert_assessment (protected)

 <instance of xowf::test_item::AssessmentInterface[i]> assert_assessment \
    o
Parameters:
o (required, object)

Testcases:
No testcase defined.

xowf::test_item::AssessmentInterface method assert_assessment_container (protected)

 <instance of xowf::test_item::AssessmentInterface[i]> assert_assessment_container \
    o
Parameters:
o (required, object)

Testcases:
No testcase defined.

xowf::test_item::AssessmentInterface method export_links (protected)

 <instance of xowf::test_item::AssessmentInterface[i]> export_links \
    [ -examWf examWf ] [ -filter_form_ids filter_form_ids ] \
    [ -b_aggregate on|off ]

Creates export links and markup

Switches:
-examWf (optional, object)
-filter_form_ids (optional, integer)
-b_aggregate (optional, boolean, defaults to "false")
Returns:
HTML

Testcases:
No testcase defined.

xowf::test_item::AssessmentInterface method list_equal (protected)

 <instance of xowf::test_item::AssessmentInterface[i]> list_equal l1 \
    l2

Compare two lists for equality. This function has to be used, when lists contain the same elements in the same order, but these are not literally equal due to, e.g., line breaks between list elements, etc.

Parameters:
l1 (required)
l2 (required)

Testcases:
No testcase defined.

xowf::test_item::AssessmentInterface method replace_in_fc (protected)

 <instance of xowf::test_item::AssessmentInterface[i]> replace_in_fc \
    -fc fc  property value
Switches:
-fc (required)
Parameters:
property (required)
value (required)

Testcases:
No testcase defined.

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 (optional, defaults to "false")
-with_title (optional, defaults to "false")
Parameters:
obj (required, object)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method current_question_name (protected)

 <instance of xowf::test_item::Question_manager[i]> current_question_name \
    obj
Parameters:
obj (required, object)

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 (required, object)

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 (required, object)

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 (optional, defaults to "false")
Parameters:
obj (required, object)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method disable_text_field_feature (protected)

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

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

Parameters:
form_obj (required, object)
feature (required)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method exam_configuration_block (protected)

 <instance of xowf::test_item::Question_manager[i]> exam_configuration_block \
    [ -modifiable modifiable ] [ -label label ] [ -id id ] \
    [ -obj obj ] [ -form_constraints form_constraints ] field_names
Switches:
-modifiable (optional)
-label (optional)
-id (optional)
-obj (optional)
-form_constraints (optional)
Parameters:
field_names (required)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method exam_configuration_render_fields (protected)

 <instance of xowf::test_item::Question_manager[i]> exam_configuration_render_fields \
    [ -modifiable modifiable ] fields

Render the provided fields via tDOM. Non-modifiable form-fields are disabled.

Switches:
-modifiable (optional)
list of field names which are modifiable
Parameters:
fields (required)
Returns:
HTML

Testcases:
No testcase defined.

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 (optional, defaults to "en:edit-interaction.wf")
-field_name (optional)
Parameters:
pool_question_obj (required)
exam_question_names (required)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method get_pool_replacement_candidates (protected)

 <instance of xowf::test_item::Question_manager[i]> get_pool_replacement_candidates \
    [ -allowed_forms allowed_forms ] [ -minutes minutes ] \
    [ -points points ] [ -fc_dict fc_dict ] [ -lang lang ] \
    pool_question_obj

When fc_dict contains no item_types, return empty and signal in the logfile.

Switches:
-allowed_forms (optional, defaults to "en:edit-interaction.wf")
-minutes (optional)
-points (optional)
-fc_dict (optional)
-lang (optional)
Parameters:
pool_question_obj (required)

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 (required, object)
position (required)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method hint_box (protected)

 <instance of xowf::test_item::Question_manager[i]> hint_box \
    [ -title title ] [ -body body ] [ -CSSclass CSSclass ]
Switches:
-title (optional)
-body (optional)
-CSSclass (optional)
Returns:
HTML

Testcases:
No testcase defined.

xowf::test_item::Question_manager method max_items (protected)

 <instance of xowf::test_item::Question_manager[i]> max_items max \
    list
Parameters:
max (required, integer, accept empty)
list (required)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method pagination_button_css_class (protected)

 <instance of xowf::test_item::Question_manager[i]> pagination_button_css_class \
    [ -CSSclass CSSclass ] -cond on|off  [ -extra extra ]
Switches:
-CSSclass (optional, defaults to "btn-sm")
-cond (required, boolean)
-extra (optional)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method percent_substitute (protected)

 <instance of xowf::test_item::Question_manager[i]> percent_substitute \
    [ -verbose ] [ -substvalues substvalues ] [ -seed seed ] text
Switches:
-verbose (optional)
-substvalues (optional)
-seed (optional)
Parameters:
text (required)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method pretty_ncorrect (protected)

 <instance of xowf::test_item::Question_manager[i]> pretty_ncorrect \
    m
Parameters:
m (required)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method pretty_nr_alternatives (protected)

 <instance of xowf::test_item::Question_manager[i]> pretty_nr_alternatives \
    question_infos
Parameters:
question_infos (required)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method pretty_shuffle (protected)

 <instance of xowf::test_item::Question_manager[i]> pretty_shuffle m
Parameters:
m (required)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method qualified_question_names (protected)

 <instance of xowf::test_item::Question_manager[i]> qualified_question_names \
    question_objs

Return the question names with parent folder in form of an item-ref. We assume here, all question_objs are from the same xowf instance. We will need item-refs pointing to other instances in the future.

Parameters:
question_objs (required)

Testcases:
No testcase defined.

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 (required)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method question_is_autograded (protected)

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

Return boolean information whether this question is autograded.

Parameters:
form_obj (required)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method question_overview_block (protected)

 <instance of xowf::test_item::Question_manager[i]> question_overview_block \
    obj
Parameters:
obj (required)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method question_randomization_ok (protected)

 <instance of xowf::test_item::Question_manager[i]> question_randomization_ok \
    form_obj
Parameters:
form_obj (required)

Testcases:
No testcase defined.

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 (required)

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 (required)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method render_describe_infos (protected)

 <instance of xowf::test_item::Question_manager[i]> render_describe_infos \
    describe_infos
Parameters:
describe_infos (required)

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 (optional, defaults to "en:edit-interaction.wf")
-field_name (optional)
-pool_question_obj (optional)
-exam_question_names (optional)
Returns:
an initialized replacement form obj if this is possible

Testcases:
No testcase defined.

xowf::test_item::Question_manager method title_infos (protected)

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

When max_items is nonempty, return the title infos of all items. Otherwise, just the specified number of items.

Switches:
-max_items (optional, integer, accept empty)
Parameters:
form_info (required)

Testcases:
No testcase defined.

xowf::test_item::Question_manager method total (protected)

 <instance of xowf::test_item::Question_manager[i]> total \
    -property property  title_infos

Sum up the values of the provided property from title_infos

Switches:
-property (required)
Parameters:
title_infos (required)

Testcases:
No testcase defined.

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 (required)
instance_attributes (required)

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 (required)
answers (required)

Testcases:
No testcase defined.

xowf::test_item::Renaming_form_loader method map_form_constraints (protected)

 <instance of xowf::test_item::Renaming_form_loader[i]> map_form_constraints \
    form_constraints oldName newName

Rename form constraints starting with $oldName into $newName. Handle as well "answer=$oldName" form constraint properties.

Parameters:
form_constraints (required)
oldName (required)
newName (required)

Testcases:
No testcase defined.

xowf::test_item::tdom_render (private)

 xowf::test_item::tdom_render script
Parameters:
script (required)

Partial Call Graph (max 5 caller/called nodes):
%3 dom dom xowf::test_item::tdom_render xowf::test_item::tdom_render xowf::test_item::tdom_render->dom

Testcases:
No testcase defined.
[ show source ]