Browse Source

Merge pull request #1290 from jloguercio/1.11.x

Fix advance parameters on thread response that shows empty - Refs #8325
José Loguercio 8 years ago
parent
commit
5c13d45737
1 changed files with 4 additions and 5 deletions
  1. 4 5
      main/forum/forumfunction.inc.php

+ 4 - 5
main/forum/forumfunction.inc.php

@@ -2862,11 +2862,12 @@ function show_add_post_form($current_forum, $forum_setting, $action, $id = '', $
     if (!empty($iframe)) {
         $form->addElement('label', get_lang('Thread'), $iframe);
     }
-    $form->addElement('advanced_settings', 'advanced_params', get_lang('AdvancedParameters'));
-    $form->addElement('html', '<div id="advanced_params_options" style="display:none">');
 
     if ((api_is_course_admin() || api_is_course_coach() || api_is_course_tutor()) && !($myThread)) {
 
+        $form->addElement('advanced_settings', 'advanced_params', get_lang('AdvancedParameters'));
+        $form->addElement('html', '<div id="advanced_params_options" style="display:none">');
+
         // Thread qualify
         if (Gradebook::is_active()) {
             //Loading gradebook select
@@ -2910,7 +2911,7 @@ function show_add_post_form($current_forum, $forum_setting, $action, $id = '', $
             ],
             ' '
         );
-
+        $form->addElement('html', '</div>');
         $form->addElement('html', '</div>');
     }
 
@@ -2918,8 +2919,6 @@ function show_add_post_form($current_forum, $forum_setting, $action, $id = '', $
         $form->addElement('checkbox', 'thread_sticky', '', get_lang('StickyPost'));
     }
 
-    $form->addElement('html', '</div>');
-
     if (in_array($action, ['quote', 'replymessage'])) {
         $form->addFile('user_upload[]', get_lang('Attachment'));
         $form->addButton(