Moodle

My Moodle - course list SQL server incompatibility

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical 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

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

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

Show
Eloy Lafuente (stronk7) added a comment - 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
Hide
Jason O'Brien added a comment -

This issue is still present in the latest 1.9 release. Line 1103 in accesslib.php still strips the prefixes in the ORDER BY clause.

Show
Jason O'Brien added a comment - This issue is still present in the latest 1.9 release. Line 1103 in accesslib.php still strips the prefixes in the ORDER BY clause.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: