MDL-41166 assign: don't display portfolio button when no permissions
Thanks to Katja Krüger for the basis of the patch.
This commit is contained in:
@@ -2381,7 +2381,7 @@ class assign {
|
||||
$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();
|
||||
|
||||
Reference in New Issue
Block a user