mirror of
https://github.com/moodle/moodle.git
synced 2025-07-13 18:36:34 +02:00
MDL-68826 mod_h5pactivity: fix content bank link
This commit is contained in:
@ -74,8 +74,10 @@ class mod_h5pactivity_mod_form extends moodleform_mod {
|
|||||||
$mform->addHelpButton('packagefile', 'package', 'mod_h5pactivity');
|
$mform->addHelpButton('packagefile', 'package', 'mod_h5pactivity');
|
||||||
|
|
||||||
// Add a link to the Content Bank if the user can access.
|
// Add a link to the Content Bank if the user can access.
|
||||||
if (has_capability('moodle/contentbank:access', $this->context)) {
|
$course = $this->get_course();
|
||||||
$url = new moodle_url('/contentbank/index.php', ['contextid' => $this->context->id]);
|
$context = context_course::instance($course->id);
|
||||||
|
if (has_capability('moodle/contentbank:access', $context)) {
|
||||||
|
$url = new moodle_url('/contentbank/index.php', ['contextid' => $context->id]);
|
||||||
$msg = get_string('usecontentbank', 'mod_h5pactivity', $url->out());
|
$msg = get_string('usecontentbank', 'mod_h5pactivity', $url->out());
|
||||||
$msg .= ' '.$OUTPUT->help_icon('contentbank', 'mod_h5pactivity');
|
$msg .= ' '.$OUTPUT->help_icon('contentbank', 'mod_h5pactivity');
|
||||||
$mform->addElement('static', 'contentbank', '', $msg);
|
$mform->addElement('static', 'contentbank', '', $msg);
|
||||||
|
Reference in New Issue
Block a user