minor Show the field numeric_calification, only if you include the item in the grade book see #369

skala
Carlos Vargas 16 years ago
parent 6ab82c7cfe
commit 979c56e921
  1. 4
      main/forum/forumfunction.inc.php

@ -1941,11 +1941,11 @@ function show_add_post_form($action='', $id='', $form_values='') {
// thread qualify // thread qualify
$form->addElement('static','Group', '<br /><strong>'.get_lang('AlterQualifyThread').'</strong>'); $form->addElement('static','Group', '<br /><strong>'.get_lang('AlterQualifyThread').'</strong>');
$form->addElement('text', 'numeric_calification', get_lang('QualifyNumeric'),'Style="width:40px"');
$form->applyFilter('numeric_calification', 'html_filter'); $form->applyFilter('numeric_calification', 'html_filter');
$form->addElement('checkbox', 'thread_qualify_gradebook', '', get_lang('QualifyThreadGradebook'),'onclick="javascript:if(this.checked==true){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"'); $form->addElement('checkbox', 'thread_qualify_gradebook', '', get_lang('QualifyThreadGradebook'),'onclick="javascript:if(this.checked==true){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"');
$form -> addElement('html','<div id="options_field" style="display:none">'); $form -> addElement('html','<div id="options_field" style="display:none">');
$form->addElement('text', 'numeric_calification', get_lang('QualifyNumeric'),'Style="width:40px"');
$form->addElement('text', 'calification_notebook_title', get_lang('TitleColumnGradebook')); $form->addElement('text', 'calification_notebook_title', get_lang('TitleColumnGradebook'));
$form->applyFilter('calification_notebook_title', 'html_filter'); $form->applyFilter('calification_notebook_title', 'html_filter');
$form->addElement('text', 'weight_calification', get_lang('QualifyWeight'),'value="0.00" Style="width:40px" onfocus="this.select();"'); $form->addElement('text', 'weight_calification', get_lang('QualifyWeight'),'value="0.00" Style="width:40px" onfocus="this.select();"');
@ -2372,7 +2372,6 @@ function show_edit_post_form($current_post, $current_thread, $current_forum, $fo
if (!isset($_GET['edit'])) { if (!isset($_GET['edit'])) {
$form->addElement('static','Group','<strong>'.get_lang('AlterQualifyThread').'</strong>'); $form->addElement('static','Group','<strong>'.get_lang('AlterQualifyThread').'</strong>');
$form->addElement('text', 'numeric_calification', get_lang('QualifyNumeric'),'value="'.$current_thread['thread_qualify_max'].'" Style="width:40px"');
$form->applyFilter('numeric_calification', 'html_filter'); $form->applyFilter('numeric_calification', 'html_filter');
$form->addElement('checkbox', 'thread_qualify_gradebook', '', get_lang('QualifyThreadGradebook'),'onclick="javascript:if(this.checked==true){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"'); $form->addElement('checkbox', 'thread_qualify_gradebook', '', get_lang('QualifyThreadGradebook'),'onclick="javascript:if(this.checked==true){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"');
$defaults['thread_qualify_gradebook']=is_resource_in_course_gradebook(api_get_course_id(),5,$_GET['thread'],api_get_session_id()); $defaults['thread_qualify_gradebook']=is_resource_in_course_gradebook(api_get_course_id(),5,$_GET['thread'],api_get_session_id());
@ -2382,6 +2381,7 @@ function show_edit_post_form($current_post, $current_thread, $current_forum, $fo
} else { } else {
$form -> addElement('html','<div id="options_field" style="display:none">'); $form -> addElement('html','<div id="options_field" style="display:none">');
} }
$form->addElement('text', 'numeric_calification', get_lang('QualifyNumeric'),'value="'.$current_thread['thread_qualify_max'].'" Style="width:40px"');
$form->addElement('text', 'calification_notebook_title', get_lang('TitleColumnGradebook'),'value="'.$current_thread['thread_title_qualify'].'"'); $form->addElement('text', 'calification_notebook_title', get_lang('TitleColumnGradebook'),'value="'.$current_thread['thread_title_qualify'].'"');
$form->applyFilter('calification_notebook_title', 'html_filter'); $form->applyFilter('calification_notebook_title', 'html_filter');
$form->addElement('text', 'weight_calification', get_lang('QualifyWeight'),'value="'.$current_thread['thread_weight'].'" Style="width:40px"'); $form->addElement('text', 'weight_calification', get_lang('QualifyWeight'),'value="'.$current_thread['thread_weight'].'" Style="width:40px"');

Loading…
Cancel
Save