Moodle
  1. Moodle
  2. MDL-14488

get_my_remotecourses() don't load all remote courses assignments

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.9
    • Fix Version/s: 1.8.7, 1.9.3, 2.0
    • Component/s: MNet
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE
    • Rank:
      30997

      Description

      The query of get_my_remotecourses() starts with c.remoteid, when get_records_sql creates the objects array, if the user have remote course assignments to courses of diferent hosts with the same remoteid get_my_remotecourses() don't load all the remote course assignments.

      I have attached the patch with c.id field added to the query.

        Activity

        Hide
        Eloy Lafuente (stronk7) added a comment -

        Assigning to Peter. Thanks for report!

        Show
        Eloy Lafuente (stronk7) added a comment - Assigning to Peter. Thanks for report!
        Hide
        Peter Bulmer added a comment -

        Thanks for the bug report David, (and patch too!)

        Patch has been applied to head, MOODLE_19_STABLE, and MOODLE_18_STABLE.

        For the future; it's always a good idea for a diff to list files relative to the moodle root directory - in this case, your diff would refer to 'lib/datalib.php', rather than 'datalib.php'.

        Thanks,
        Pete.

        Show
        Peter Bulmer added a comment - Thanks for the bug report David, (and patch too!) Patch has been applied to head, MOODLE_19_STABLE, and MOODLE_18_STABLE. For the future; it's always a good idea for a diff to list files relative to the moodle root directory - in this case, your diff would refer to 'lib/datalib.php', rather than 'datalib.php'. Thanks, Pete.
        Hide
        David Monllaó added a comment -

        sorry pete, next time i'll do diff from moodle root

        Show
        David Monllaó added a comment - sorry pete, next time i'll do diff from moodle root

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: