Skip to content

Commit

Permalink
Hide button if gradebook not available see BT#12916
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Jun 12, 2017
1 parent 919a80b commit 956e89f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main/forum/forumfunction.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2878,7 +2878,9 @@ function show_add_post_form($current_forum, $forum_setting, $action, $id = '', $
$form->addElement('label', get_lang('Thread'), $iframe);
}

if ((api_is_course_admin() || api_is_course_coach() || api_is_course_tutor()) && !($myThread)) {
if (Gradebook::is_active() &&
(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">');

Expand Down

0 comments on commit 956e89f

Please sign in to comment.