mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 02:46:40 +02:00
MDL-34463 - lib - Alteration of the get_context_instance function to utilize the new function context_XXXX::instance().
This commit is contained in:
parent
3294034b80
commit
d40604724b
61 changed files with 95 additions and 100 deletions
|
@ -161,13 +161,13 @@ function grade_import_commit($courseid, $importcode, $importfeedback=true, $verb
|
|||
*/
|
||||
function get_unenrolled_users_in_import($importcode, $courseid) {
|
||||
global $CFG, $DB;
|
||||
$relatedctxcondition = get_related_contexts_string(get_context_instance(CONTEXT_COURSE, $courseid));
|
||||
$relatedctxcondition = get_related_contexts_string(context_course::instance($courseid));
|
||||
|
||||
//users with a gradeable role
|
||||
list($gradebookrolessql, $gradebookrolesparams) = $DB->get_in_or_equal(explode(',', $CFG->gradebookroles), SQL_PARAMS_NAMED, 'grbr');
|
||||
|
||||
//enrolled users
|
||||
$context = get_context_instance(CONTEXT_COURSE, $courseid);
|
||||
$context = context_course::instance($courseid);
|
||||
list($enrolledsql, $enrolledparams) = get_enrolled_sql($context);
|
||||
|
||||
$sql = "SELECT giv.id, u.firstname, u.lastname, u.idnumber AS useridnumber,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue