diff --git a/enrol/authorize/locallib.php b/enrol/authorize/locallib.php index 6dc069e162c..058b1b08d15 100644 --- a/enrol/authorize/locallib.php +++ b/enrol/authorize/locallib.php @@ -54,7 +54,7 @@ function authorize_print_orders($courseid, $userid) { $searchtype = optional_param('searchtype', 'orderid', PARAM_ALPHA); $status = optional_param('status', AN_STATUS_NONE, PARAM_INT); - $coursecontext = get_context_instance(CONTEXT_USER, $USER->id); + $coursecontext = get_context_instance(CONTEXT_COURSE, $courseid); $searchmenu = array('orderid' => $authstrs->orderid, 'transid' => $authstrs->transid, 'cclastfour' => $authstrs->cclastfour); $buttons = "
"; - if (has_capability('enrol/authorize:uploadcsv', $coursecontext)) { + if (has_capability('enrol/authorize:uploadcsv', get_context_instance(CONTEXT_USER, $USER->id))) { $buttons .= ""; } diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index eaa12d32129..85b4afb0eec 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -6698,7 +6698,7 @@ FROM if ($oldversion < 2011090800) { // Increase the length of the of the course shortname field as it is now going - // to be consistently filtered and 100 characters if practically useless for + // to be consistently filtered and 100 characters is practically useless for // things like the multilang filter. $table = new xmldb_table('course'); diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index 6f17416f5f4..881137093cc 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -122,7 +122,7 @@ class assignment_base { print_error('invalidid', 'assignment'); } $this->coursecontext = get_context_instance(CONTEXT_COURSE, $this->course->id); - $courseshortname = format_text($this->course->shortname, true, array('context' => $coursecontext)); + $courseshortname = format_text($this->course->shortname, true, array('context' => $this->coursecontext)); if ($assignment) { $this->assignment = $assignment; diff --git a/mod/chat/gui_header_js/index.php b/mod/chat/gui_header_js/index.php index 5c298ba6f50..43d0f0b56d4 100644 --- a/mod/chat/gui_header_js/index.php +++ b/mod/chat/gui_header_js/index.php @@ -67,7 +67,7 @@ $courseshortname = format_string($course->shortname, true, array('context' => ge