Moodle
  1. Moodle
  2. MDL-33126

Section availability cache not set on initial course creation

    Details

      Description

      Seems we haven't caught them

      Notice: Undefined property: stdClass::$availableinfo in /Users/danp/git/moodle/course/format/renderer.php on line 294 Call Stack: 0.0025 777720 1.

      {main}

      () /Users/danp/git/moodle/course/view.php:0 0.9525 66767208 2. require('/Users/danp/git/moodle/course/format/weeks/format.php') /Users/danp/git/moodle/course/view.php:245 0.9548 67077768 3. format_section_renderer_base->print_multiple_section_page() /Users/danp/git/moodle/course/format/weeks/format.php:45 1.0567 74009296 4. format_section_renderer_base->section_header() /Users/danp/git/moodle/course/format/renderer.php:575 1.0601 74018880 5. format_section_renderer_base->section_availability_message() /Users/danp/git/moodle/course/format/renderer.php:165

      Replication steps:

      1. Create a new course
      2. Visit course page

      On initial visit there are warnings about missing availableinfo

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Dan Poltawski added a comment -

            I'm guessing you need to set this around line 554 of course/format/renderer.php too

            Show
            Dan Poltawski added a comment - I'm guessing you need to set this around line 554 of course/format/renderer.php too
            Hide
            Dan Poltawski added a comment -

            Do we also need to set showavailability?

            Show
            Dan Poltawski added a comment - Do we also need to set showavailability?
            Hide
            Sam Marshall added a comment -

            Oops. Looking at this issue.

            Show
            Sam Marshall added a comment - Oops. Looking at this issue.
            Hide
            Sam Marshall added a comment -

            I made the change Dan suggested and it appears to have fixed the problem (tested by creating a new course again). Not sure why I missed this before, sorry...

            Submitting directly to integration because this is trivial and pretty much reviewed before the fact anyhow.

            Show
            Sam Marshall added a comment - I made the change Dan suggested and it appears to have fixed the problem (tested by creating a new course again). Not sure why I missed this before, sorry... Submitting directly to integration because this is trivial and pretty much reviewed before the fact anyhow.
            Hide
            Dan Poltawski added a comment -

            Pulling this in because its simple and obvious and I spotted it

            Show
            Dan Poltawski added a comment - Pulling this in because its simple and obvious and I spotted it
            Hide
            Dan Poltawski added a comment -

            Worked for me, thanks Sam

            Show
            Dan Poltawski added a comment - Worked for me, thanks Sam
            Hide
            Eloy Lafuente (stronk7) added a comment -

            This issue has been integrated upstream and is now available both via git and cvs (and in some hours, via mirrors and downloads).

            Thanks!

            Show
            Eloy Lafuente (stronk7) added a comment - This issue has been integrated upstream and is now available both via git and cvs (and in some hours, via mirrors and downloads). Thanks!

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: