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

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

Defined in packages/xowf/tcl/test-item-procs.tcl

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

Parameters:
obj
Returns:
HTML

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

Testcases:
create_test_items
Source code:
set modifiable [:exam_configuration_modifiable_field_names $obj]
#ns_log notice "exam_configuration_popup modifiable '$modifiable'"

set fcrepo [$obj get_fc_repository]
set content ""
append content  [:exam_configuration_block  -modifiable $modifiable  -label #xowf.Question_management#  -id config-question  -form_constraints $fcrepo  -obj $obj {
           shuffle_items max_items
           allow_paste allow_spellcheck allow_translation
           show_minutes show_points show_ip
         }]  [:exam_configuration_block  -modifiable $modifiable  -label #xowf.Time_management#  -id config-time  -form_constraints $fcrepo  -obj $obj {
           time_budget synchronized time_window countdown_audio_alarm
         }]  [:exam_configuration_block  -modifiable $modifiable  -label #xowf.Security#  -id config-security  -form_constraints $fcrepo  -obj $obj {
           proctoring proctoring_options proctoring_record signature iprange
         }]  [:exam_configuration_render_fields -modifiable $modifiable  [$obj create_form_fields_from_names -lookup -set_values  -form_constraints $fcrepo  {grading}]]

::template::add_body_script -script [ns_trim -delimiter | [subst -novariables {
  |$(document).ready(function() {
  |  $('.modal .confirm').on('click', function(ev) {
  |    //
  |    // Submit button of the configuration dialog was pressed.
  |    //
  |    var data = new FormData(document.getElementById('configuration-form'));
  |    console.log(data);
  |    var xhttp = new XMLHttpRequest();
  |    xhttp.open('POST', '[$obj pretty_link -query m=update-config]', true);
  |    xhttp.onload = function () {
  |      if (this.readyState == 4) {
  |        if (this.status == 200) {
  |          var text = this.responseText;
  |          console.log('sent OK ok ' + text);
  |          //window.location.reload(true);
  |        } else {
  |          console.log('sent NOT ok');
  |        }
  |      }
  |    };
  |    xhttp.send(data);
  |  });
  |});
}]]


$obj content_header_append  [::xowiki::bootstrap::modal_dialog  -id configuration-modal  -title "#xowf.Configuration#: <span id='configuration-participant'></span>"  -body $content]

return  [::xowiki::bootstrap::modal_dialog_popup_button  -target configuration-modal  -label [::xowiki::bootstrap::icon -name cog -style "float: right;"]  -title #xowf.Configuration_button_title#  -CSSclass configuration-button]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: