Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-26263 Standardise use of the cm_info object and fix type hinting where stdClass is still being used.
  3. MDL-26265

moodle_page::set_cm should require a cm_info object and convert a stdClass $cm into a cm_info if required

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: Libraries
    • Labels:
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      moodle_page::set_cm currently gets a cm_info object if it is being called from a require_login function, however code manually setting a cm is going to be passing in a stdClass object from the db.
      This should be tidied up and moodle_page::set_cm should really convert the stdClass object to a cm_info instance if required.

      Cheers
      Sam

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  21/Feb/11