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

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.1
    • 2.0.2
    • Libraries
    • MOODLE_20_STABLE
    • 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

      Attachments

        Activity

          People

            samhemelryk Sam Hemelryk
            samhemelryk Sam Hemelryk
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              21/Feb/11