- 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, ::xowiki::formfield::test_item_name, ::xowiki::formfield::test_item, ::xowf::test_item::AssessmentInterface, ::xowf::test_item::Renaming_form_loader, ::xowf::test_item::Answer_manager, ::xowf::test_item::Question_manager, ::xowiki::formfield::TestItemField, ::xowiki::formfield::test_item_name, ::xowiki::formfield::test_item, ::xowf::test_item::AssessmentInterface, ::xowf::test_item::Renaming_form_loader, ::xowf::test_item::Answer_manager, ::xowf::test_item::Question_manager
- Location:
- packages/xowf/tcl/test-item-procs.tcl
- Author:
- Gustaf Neumann
Procedures in this file
- Class ::xowf::test_item::Answer_manager (public)
- Class ::xowf::test_item::AssessmentInterface (public)
- Class ::xowf::test_item::Question_manager (public)
- Class ::xowf::test_item::Renaming_form_loader (public)
- Class ::xowiki::formfield::TestItemField (public)
- Class ::xowiki::formfield::test_item (public)
- Class ::xowiki::formfield::test_item_name (public)
- xowf::WorkflowPage instproc render_thumbnails (public)
- xowf::test_item::Answer_manager instproc allow_answering (public)
- xowf::test_item::Answer_manager instproc answer_form_field_objs (public)
- xowf::test_item::Answer_manager instproc answers_panel (public)
- xowf::test_item::Answer_manager instproc countdown_timer (public)
- xowf::test_item::Answer_manager instproc create_workflow (public)
- xowf::test_item::Answer_manager instproc delete_all_answer_data (public)
- xowf::test_item::Answer_manager instproc delete_scheduled_atjobs (public)
- xowf::test_item::Answer_manager instproc exam_results (public)
- xowf::test_item::Answer_manager instproc export_answer (public)
- xowf::test_item::Answer_manager instproc get_IPs (public)
- xowf::test_item::Answer_manager instproc get_answer_attributes (public)
- xowf::test_item::Answer_manager instproc get_answer_wf (public)
- xowf::test_item::Answer_manager instproc get_duration (public)
- xowf::test_item::Answer_manager instproc get_exam_results (public)
- xowf::test_item::Answer_manager instproc get_wf_instances (public)
- xowf::test_item::Answer_manager instproc grading_dialog_setup (public)
- xowf::test_item::Answer_manager instproc grading_scheme (public)
- xowf::test_item::Answer_manager instproc grading_table (public)
- xowf::test_item::Answer_manager instproc last_time_in_state (public)
- xowf::test_item::Answer_manager instproc last_time_switched_to_state (public)
- xowf::test_item::Answer_manager instproc marked_results (public)
- xowf::test_item::Answer_manager instproc participants_table (public)
- xowf::test_item::Answer_manager instproc prevent_multiple_tabs (public)
- xowf::test_item::Answer_manager instproc recutil_create (public)
- xowf::test_item::Answer_manager instproc render_answers (public)
- xowf::test_item::Answer_manager instproc render_answers_with_edit_history (public)
- xowf::test_item::Answer_manager instproc results_table (public)
- xowf::test_item::Answer_manager instproc revisions_up_to (public)
- xowf::test_item::Answer_manager instproc runtime_panel (public)
- xowf::test_item::Answer_manager instproc set_exam_results (public)
- xowf::test_item::Answer_manager instproc state_periods (public)
- xowf::test_item::Answer_manager instproc student_submissions_exist (public)
- xowf::test_item::Answer_manager instproc time_window_setup (public)
- xowf::test_item::Answer_manager instproc waiting_room_message (public)
- xowf::test_item::AssessmentInterface instproc render_feedback_files (public)
- xowf::test_item::Question_manager instproc add_seeds (public)
- xowf::test_item::Question_manager instproc aggregated_form (public)
- xowf::test_item::Question_manager instproc combined_question_form (public)
- xowf::test_item::Question_manager instproc current_question_form (public)
- xowf::test_item::Question_manager instproc current_question_number (public)
- xowf::test_item::Question_manager instproc current_question_obj (public)
- xowf::test_item::Question_manager instproc current_question_title (public)
- xowf::test_item::Question_manager instproc describe_form (public)
- xowf::test_item::Question_manager instproc disallow_paste (public)
- xowf::test_item::Question_manager instproc disallow_spellcheck (public)
- xowf::test_item::Question_manager instproc disallow_translation (public)
- xowf::test_item::Question_manager instproc exam_base_time (public)
- xowf::test_item::Question_manager instproc exam_configuration_modifiable_field_names (public)
- xowf::test_item::Question_manager instproc exam_configuration_popup (public)
- xowf::test_item::Question_manager instproc exam_info_block (public)
- xowf::test_item::Question_manager instproc exam_target_time (public)
- xowf::test_item::Question_manager instproc get_pool_questions (public)
- xowf::test_item::Question_manager instproc goto_page (public)
- xowf::test_item::Question_manager instproc hint_boxes (public)
- xowf::test_item::Question_manager instproc initialize (public)
- xowf::test_item::Question_manager instproc item_substitute_markup (public)
- xowf::test_item::Question_manager instproc load_question_objs (public)
- xowf::test_item::Question_manager instproc minutes_string (public)
- xowf::test_item::Question_manager instproc more_ahead (public)
- xowf::test_item::Question_manager instproc nth_question_form (public)
- xowf::test_item::Question_manager instproc nth_question_obj (public)
- xowf::test_item::Question_manager instproc pagination_actions (public)
- xowf::test_item::Question_manager instproc percent_substitute_in_form (public)
- xowf::test_item::Question_manager instproc points_string (public)
- xowf::test_item::Question_manager instproc question_count (public)
- xowf::test_item::Question_manager instproc question_info (public)
- xowf::test_item::Question_manager instproc question_info_block (public)
- xowf::test_item::Question_manager instproc question_names (public)
- xowf::test_item::Question_manager instproc question_objs (public)
- xowf::test_item::Question_manager instproc question_property (public)
- xowf::test_item::Question_manager instproc question_statistics_block (public)
- xowf::test_item::Question_manager instproc question_summary (public)
- xowf::test_item::Question_manager instproc questions_without_minutes (public)
- xowf::test_item::Question_manager instproc replace_pool_question (public)
- xowf::test_item::Question_manager instproc replace_pool_questions (public)
- xowf::test_item::Question_manager instproc shuffled_index (public)
- xowf::test_item::Question_manager instproc total_minutes (public)
- xowf::test_item::Question_manager instproc total_minutes_for_exam (public)
- xowf::test_item::Question_manager instproc total_points (public)
- xowf::test_item::Renaming_form_loader instproc answer_attributes (public)
- xowf::test_item::Renaming_form_loader instproc answer_for_form (public)
- xowf::test_item::Renaming_form_loader instproc answers_for_form (public)
- xowf::test_item::Renaming_form_loader instproc form_name_based_attribute_stem (public)
- xowf::test_item::Renaming_form_loader instproc name_to_question_obj_dict (public)
- xowf::test_item::Renaming_form_loader instproc rename_attributes (public)
Detailed information
Class ::xowf::test_item::Answer_manager (public)
::nx::Class ::xowf::test_item::Answer_manager
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):
- Testcases:
- No testcase defined.
Class ::xowf::test_item::AssessmentInterface (public)
::nx::Class ::xowf::test_item::AssessmentInterface
Abstract class for common functionality
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Class ::xowf::test_item::Question_manager (public)
::nx::Class ::xowf::test_item::Question_manager
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):
- Testcases:
- No testcase defined.
Class ::xowf::test_item::Renaming_form_loader (public)
::nx::Class ::xowf::test_item::Renaming_form_loader
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):
- Testcases:
- No testcase defined.
Class ::xowiki::formfield::TestItemField (public)
::xotcl::Class ::xowiki::formfield::TestItemField \ [ -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):
- Testcases:
- No testcase defined.
Class ::xowiki::formfield::test_item (public)
::xotcl::Class ::xowiki::formfield::test_item \ [ -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):
- Testcases:
- No testcase defined.
Class ::xowiki::formfield::test_item_name (public)
::xotcl::Class ::xowiki::formfield::test_item_name
Name sanitizer for test items
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xowf::WorkflowPage instproc render_thumbnails (public)
<instance of xowf::WorkflowPage> 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):
- Testcases:
- No testcase defined.
xowf::test_item::Answer_manager method allow_answering (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method answer_form_field_objs (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method answers_panel (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method countdown_timer (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method create_workflow (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method delete_all_answer_data (public)
<instance of xowf::test_item::Answer_manager> delete_all_answer_data \ obj
Delete all instances of the answer workflow
- Parameters:
- obj
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method delete_scheduled_atjobs (public)
<instance of xowf::test_item::Answer_manager> delete_scheduled_atjobs \ obj
Delete previously scheduled atjobs ns_log notice "#### delete_scheduled_atjobs"
- Parameters:
- obj
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xowf::test_item::Answer_manager method exam_results (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- No testcase defined.
xowf::test_item::Answer_manager method export_answer (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- No testcase defined.
xowf::test_item::Answer_manager method get_IPs (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method get_answer_attributes (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method get_answer_wf (public)
<instance of xowf::test_item::Answer_manager> get_answer_wf obj
return the workflow denoted by the property wfName in obj
- Parameters:
- obj
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method get_duration (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method get_exam_results (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method get_wf_instances (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method grading_dialog_setup (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method grading_scheme (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method grading_table (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method last_time_in_state (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method last_time_switched_to_state (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method marked_results (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method participants_table (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method prevent_multiple_tabs (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method recutil_create (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- No testcase defined.
xowf::test_item::Answer_manager method render_answers (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method render_answers_with_edit_history (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- No testcase defined.
xowf::test_item::Answer_manager method results_table (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- No testcase defined.
xowf::test_item::Answer_manager method revisions_up_to (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method runtime_panel (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method set_exam_results (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method state_periods (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method student_submissions_exist (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method time_window_setup (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Answer_manager method waiting_room_message (public)
<instance of xowf::test_item::Answer_manager> 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):
- Testcases:
- No testcase defined.
xowf::test_item::AssessmentInterface method render_feedback_files (public)
<instance of xowf::test_item::AssessmentInterface> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method add_seeds (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method aggregated_form (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_composite_test_item
xowf::test_item::Question_manager method combined_question_form (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method current_question_form (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- No testcase defined.
xowf::test_item::Question_manager method current_question_number (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- No testcase defined.
xowf::test_item::Question_manager method current_question_obj (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- No testcase defined.
xowf::test_item::Question_manager method current_question_title (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- No testcase defined.
xowf::test_item::Question_manager method describe_form (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_composite_test_item
xowf::test_item::Question_manager method disallow_paste (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method disallow_spellcheck (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method disallow_translation (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method exam_base_time (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method exam_configuration_modifiable_field_names (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method exam_configuration_popup (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method exam_info_block (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method exam_target_time (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method get_pool_questions (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- No testcase defined.
xowf::test_item::Question_manager method goto_page (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- No testcase defined.
xowf::test_item::Question_manager method hint_boxes (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method initialize (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method item_substitute_markup (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method load_question_objs (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method minutes_string (public)
<instance of xowf::test_item::Question_manager> minutes_string \ form_obj
Get an attribute of the original question
- Parameters:
- form_obj
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method more_ahead (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method nth_question_form (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method nth_question_obj (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method pagination_actions (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method percent_substitute_in_form (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_composite_test_item
xowf::test_item::Question_manager method points_string (public)
<instance of xowf::test_item::Question_manager> points_string \ form_obj
Get an attribute of the original question
- Parameters:
- form_obj
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method question_count (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method question_info (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method question_info_block (public)
<instance of xowf::test_item::Question_manager> question_info_block \ obj
Provide question info block.
- Parameters:
- obj
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xowf::test_item::Question_manager method question_names (public)
<instance of xowf::test_item::Question_manager> question_names \ obj
Return the names of the questions of an assessment.
- Parameters:
- obj
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method question_objs (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method question_property (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method question_statistics_block (public)
<instance of xowf::test_item::Question_manager> question_statistics_block \ obj
When we have results, we can provide statistics
- Parameters:
- obj
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xowf::test_item::Question_manager method question_summary (public)
<instance of xowf::test_item::Question_manager> question_summary \ obj
Provide a summary of all questions of an exam.
- Parameters:
- obj
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xowf::test_item::Question_manager method questions_without_minutes (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method replace_pool_question (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- No testcase defined.
xowf::test_item::Question_manager method replace_pool_questions (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method shuffled_index (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method total_minutes (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method total_minutes_for_exam (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Question_manager method total_points (public)
<instance of xowf::test_item::Question_manager> 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):
- Testcases:
- create_test_items
xowf::test_item::Renaming_form_loader method answer_attributes (public)
<instance of xowf::test_item::Renaming_form_loader> answer_attributes \ instance_attributes
Return all form-loader specific attributes from instance_attributes.
- Parameters:
- instance_attributes
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- create_test_items
xowf::test_item::Renaming_form_loader method answer_for_form (public)
<instance of xowf::test_item::Renaming_form_loader> 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):
- Testcases:
- No testcase defined.
xowf::test_item::Renaming_form_loader method answers_for_form (public)
<instance of xowf::test_item::Renaming_form_loader> 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):
- 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> 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):
- 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> 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):
- Testcases:
- create_test_items
xowf::test_item::Renaming_form_loader method rename_attributes (public)
<instance of xowf::test_item::Renaming_form_loader> 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):
- Testcases:
- create_test_items