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

Error message on resource page of site level

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.7, 2.5.2, 2.6
    • Fix Version/s: 2.4.8, 2.5.4
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide

      For 2.5 and 2.6 the whole test is basically covered by included behat test but you need to pull it from MDL-42731

      For 2.4 create activities and resources on the frontpage, add "Activities" block and make sure all links from the block do not have any warnings on them

      Show
      For 2.5 and 2.6 the whole test is basically covered by included behat test but you need to pull it from MDL-42731 For 2.4 create activities and resources on the frontpage, add "Activities" block and make sure all links from the block do not have any warnings on them
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      wip-MDL-42672-master

      Description

      When visiting the resource overview page for site level you get an error message with debugging mode on.

      THis is due to not checking the course format for site level in the course/format/lib.php

      Invalid get_string() identifier: 'sectionname' or component 'format_site'. Perhaps you are missing $string['sectionname'] = ''; in /opt/moodle/course/format/site/lang/en/format_site.php?
      line 6923 of /lib/moodlelib.php: call to debugging()
      line 7615 of /lib/moodlelib.php: call to core_string_manager->get_string()
      line 55 of /course/resources.php: call to get_string()

      A fix for this would be to change line 55 to:
      if ($course->format == 'site')

      { $strsectionname = $SITE->shortname; }

      else

      { $strsectionname = get_string('sectionname', 'format_'.$course->format); }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Jan/14