mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
get_my_courses() if the parameters passed are identical to the defaults... MDL-7416
We are using the defaults then ;-) Credits for spotting it go to Yu! Blames for the thinko to MartinL
This commit is contained in:
parent
c1f7441a05
commit
6c146b7d7f
@ -689,12 +689,12 @@ function get_my_courses($userid, $sort=NULL, $fields=NULL, $doanything=false,$li
|
||||
$d_fields = 'id, category, sortorder, shortname, fullname, idnumber, newsitems, teacher, teachers, student, students, guest, startdate, visible, cost, enrol, summary, groupmode, groupmodeforce';
|
||||
|
||||
$usingdefaults = true;
|
||||
if (is_null($sort)) {
|
||||
if (is_null($sort) || $sort === $d_sort) {
|
||||
$sort = $d_sort;
|
||||
} else {
|
||||
$usingdefaults = false;
|
||||
}
|
||||
if (is_null($fields)) {
|
||||
if (is_null($fields) || $fields === $d_fields) {
|
||||
$fields = $d_fields;
|
||||
} else {
|
||||
$usingdefaults = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user