Applied removal of gradebook options when gradebook is disabled, to survey tool - refs #5034

skala
Yannick Warnier 13 years ago
parent 98e6047119
commit 30159d60c0
  1. 14
      main/survey/create_new_survey.php

@ -169,12 +169,14 @@ $form->addElement('advanced_settings','<a href="javascript: void(0);" onclick="j
$form -> addElement('html', '<div id="options" style="display: none;">'); $form -> addElement('html', '<div id="options" style="display: none;">');
// An option: Qualify the fact that survey has been answered in the gradebook if (Gradebook::is_active()) {
$form->addElement('checkbox', 'survey_qualify_gradebook', null, get_lang('QualifyInGradebook'), 'onclick="javascript: if (this.checked) { document.getElementById(\'gradebook_options\').style.display = \'block\'; } else { document.getElementById(\'gradebook_options\').style.display = \'none\'; }"'); // An option: Qualify the fact that survey has been answered in the gradebook
$form->addElement('html', '<div id="gradebook_options"'.($gradebook_link_id ? '' : ' style="display:none"').'>'); $form->addElement('checkbox', 'survey_qualify_gradebook', null, get_lang('QualifyInGradebook'), 'onclick="javascript: if (this.checked) { document.getElementById(\'gradebook_options\').style.display = \'block\'; } else { document.getElementById(\'gradebook_options\').style.display = \'none\'; }"');
$form->addElement('text', 'survey_weight', get_lang('QualifyWeight'), 'value="0.00" style="width: 40px;" onfocus="javascript: this.select();"'); $form->addElement('html', '<div id="gradebook_options"'.($gradebook_link_id ? '' : ' style="display:none"').'>');
$form->applyFilter('survey_weight', 'html_filter'); $form->addElement('text', 'survey_weight', get_lang('QualifyWeight'), 'value="0.00" style="width: 40px;" onfocus="javascript: this.select();"');
$form->addElement('html', '</div>'); $form->applyFilter('survey_weight', 'html_filter');
$form->addElement('html', '</div>');
}
// Personality/Conditional Test Options // Personality/Conditional Test Options
$surveytypes[0] = get_lang('Normal'); $surveytypes[0] = get_lang('Normal');

Loading…
Cancel
Save