Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-10570

modinfo not set in My Moodle

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      I found this while trying to get overview information to print for a lesson.

      In the my/index.php page, the method get_my_courses() is used to get an array of course objects. These course objects do not get their modinfo field set.

      Later, the course objects are eventually passed to get_all_instances_in_courses() in the modules modname_print_overview(). This method (get_all_instances_in_courses) requires modinfo to be set otherwise it will skip that course resulting in an empty array being returned.

      There are several ways to fix this, I leave that solution up to the developer assigned to the ticket.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              bushido Mark Nielsen
              Tester:
              Stephen Bourget
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Mar/08