Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.9.4
-
Fix Version/s: 1.9.5
-
Component/s: Database SQL/XMLDB
-
Labels:None
-
Environment:Windows server 2008, IIS 7, SQL server 2008
-
Database:Microsoft SQL
-
Affected Branches:MOODLE_19_STABLE
-
Fixed Branches:MOODLE_19_STABLE
Description
Queries looking for a users courses are ambiguous as there is no prefix on the sort order in one routine(Datalib.php -> function get_my_courses($userid, $sort='visible DESC,sortorder ASC', $fields=NULL, $doanything=false,$limit=0) {
) and in another they strip off any order by prefixes (accesslib.php -> get_user_courses_bycap). This causes the code to error and no courses to be displayed for user.
Please answer without criticising the environment I'm using (Which is required by my employer) as this is not only unhelpful but pointless.
Issue Links
| This issue is duplicated by: | ||||
| MDL-17109 | get_user_courses_bycap SQL error with asterisk in fields list |
|
|
|
NP Anon. I won't make any joke, relax!
It should be fixed now both in 19_STABLE and HEAD (no more ambiguous columns) in get_user_courses_bycap() caused by '*' wildcard in query.
Resolving as fixed. Thanks for the report and ciao