mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-14460, fix get_context_instance, see tracker
This commit is contained in:
parent
fd968fb1b5
commit
09ee7b0d9e
6 changed files with 8 additions and 8 deletions
|
@ -25,7 +25,7 @@
|
|||
if ($fromcourse) {
|
||||
$fromcontext = get_context_instance(CONTEXT_COURSE, $fromcourse);
|
||||
}
|
||||
$syscontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
|
||||
$syscontext = get_context_instance(CONTEXT_SYSTEM);
|
||||
|
||||
if (!has_capability('moodle/course:manageactivities', $tocontext)) {
|
||||
print_error("You need do not have the required permissions to import activities to this course");
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
require_once($CFG->dirroot.'/course/lib.php');
|
||||
require_once($CFG->dirroot.'/backup/restorelib.php');
|
||||
|
||||
$syscontext = get_context_instance(CONTEXT_SYSTEM, SITEID);
|
||||
$syscontext = get_context_instance(CONTEXT_SYSTEM);
|
||||
|
||||
// if we're not a course creator , we can only import from our own courses.
|
||||
if (has_capability('moodle/course:create', $syscontext)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue