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

showfromothers / hidefromothers error shown strings are not present but uses_sections is false

    XMLWordPrintable

Details

    • MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • MDL-43411-master
    • Hide
      • Open a course
      • Set the course format to 'Topics'
      • Toggle show/hide of a topic
        • Confirm that the alt/title text on the show/hide icon changes appropriately
      • Toggle it back
        • Confirm that the alt/title text on the show/hide icon changes appropriately
      • Confirm that drag/drop of activities and sections still works
      • Repeat with Weekly view
      • Edit course/format/weeks/lib.php:
        • Find the uses_sections() function and change it to return false
      • Refresh the course page
      • Toggle the show/hide section again
        • Confirm that the alt/title text is now a placeholder for a missing string
      • Confirm that you can no longer drag/drop move sections or resources*
      Show
      Open a course Set the course format to 'Topics' Toggle show/hide of a topic Confirm that the alt/title text on the show/hide icon changes appropriately Toggle it back Confirm that the alt/title text on the show/hide icon changes appropriately Confirm that drag/drop of activities and sections still works Repeat with Weekly view Edit course/format/weeks/lib.php: Find the uses_sections() function and change it to return false Refresh the course page Toggle the show/hide section again Confirm that the alt/title text is now a placeholder for a missing string Confirm that you can no longer drag/drop move sections or resources*
    • 5
    • FRONTEND Sprint 7

    Description

      I have create a custom course format. In this format my uses_sections functions returns false. However, when I'm in turn on course editing I get the errors listed below.

      It seems that the strings are used by format/renderer.php when creating the icons for hiding and showing sections. However I see no check on this code to see if the format uses sections in the first place before throwing the error.

      Why should I need these strings if my format doesn't use sections.

      String does not exist. Please check your string definition for showfromothers/format_nosm_dashboard

      line 11423 of /lib/moodlelib.php: call to debugging()
      line 1088 of /lib/outputrequirementslib.php: call to lang_string->__construct()
      line 1124 of /lib/outputrequirementslib.php: call to page_requirements_manager->string_for_js()
      line 2998 of /course/lib.php: call to page_requirements_manager->strings_for_js()
      line 285 of /course/view.php: call to include_course_ajax()

      String does not exist. Please check your string definition for hidefromothers/format_nosm_dashboard

      line 11423 of /lib/moodlelib.php: call to debugging()
      line 1088 of /lib/outputrequirementslib.php: call to lang_string->__construct()
      line 1124 of /lib/outputrequirementslib.php: call to page_requirements_manager->string_for_js()
      line 2998 of /course/lib.php: call to page_requirements_manager->strings_for_js()
      line 285 of /course/view.php: call to include_course_ajax()

      Invalid get_string() identifier: 'showfromothers' or component 'format_nosm_dashboard'. Perhaps you are missing $string['showfromothers'] = ''; in /var/development/pge/moodle/mainline/course/format/nosm_dashboard/lang/en/format_nosm_dashboard.php?

      line 6913 of /lib/moodlelib.php: call to debugging()
      line 11451 of /lib/moodlelib.php: call to core_string_manager->get_string()
      line 11476 of /lib/moodlelib.php: call to lang_string->get_string()
      line 1423 of /lib/outputrequirementslib.php: call to lang_string->out()
      line 882 of /lib/outputrenderers.php: call to page_requirements_manager->get_end_code()
      line 287 of /course/view.php: call to core_renderer->footer()
      Invalid get_string() identifier: 'hidefromothers' or component 'format_nosm_dashboard'. Perhaps you are missing $string['hidefromothers'] = ''; in /var/development/pge/moodle/mainline/course/format/nosm_dashboard/lang/en/format_nosm_dashboard.php?

      line 6913 of /lib/moodlelib.php: call to debugging()
      line 11451 of /lib/moodlelib.php: call to core_string_manager->get_string()
      line 11476 of /lib/moodlelib.php: call to lang_string->get_string()
      line 1423 of /lib/outputrequirementslib.php: call to lang_string->out()
      line 882 of /lib/outputrenderers.php: call to page_requirements_manager->get_end_code()
      line 287 of /course/view.php: call to core_renderer->footer()

      Attachments

        Activity

          People

            dobedobedoh Andrew Lyons
            rgirardin Robert Girardin
            Mark Nelson Mark Nelson
            Damyon Wiese Damyon Wiese
            Adrian Greeve Adrian Greeve
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona), Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              13/Jan/14