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

Class course_modinfo should cast type in its constructor or validate $course

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.11.12, 4.0.6, 4.1.1
    • Course

      As part of MDL-72991, method build_course_cache now casts $course to be an instance of stdClass, however constructor of course_modinfo is not that strict.  That may cause some issue e.g. https://github.com/catalyst/moodle_tool_blocksmanager/issues/28

      We should either: 

      • cast stdClass for $course in the constructor;
      • validate $course in the constructor and throw and exception;
      • remove casting stdClass for $course in build_course_cache

       

       

            michaelbk Michael Benjamin Kotlyar
            dmitriim Dmitrii Metelkin
            Dmitrii Metelkin Dmitrii Metelkin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.