Permalink
Browse files

MDL-41166 assign: don't display portfolio button when no permissions

Thanks to Katja Krüger for the basis of the patch.
  • Loading branch information...
danpoltawski committed Dec 30, 2014
1 parent 56624fa commit 1fdfd7127c8438ccd0ccb45410d66d224f26cd86
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/assign/locallib.php
View
@@ -2381,7 +2381,7 @@ public function render_editor_content($filearea, $submissionid, $plugintype, $ed
$params = array('overflowdiv' => true, 'context' => $this->get_context());
$result .= format_text($finaltext, $format, $params);
if ($CFG->enableportfolios) {
if ($CFG->enableportfolios && has_capability('mod/assign:exportownsubmission', $this->context)) {
require_once($CFG->libdir . '/portfoliolib.php');
$button = new portfolio_add_button();

0 comments on commit 1fdfd71

Please sign in to comment.