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

Fatal error in block_glossary_random

XMLWordPrintable

    • MOODLE_27_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-53598-master
    • Easy
    • Hide
      Adding a global glossary from another course
      1. Create a course C1.
      2. Create a glossary activity G1 and mark this glossary as global by ticking Is this glossary global?.
      3. Add at least three entries to the glossary.
      4. Navigate to the Dashboard and click Customise this page.
      5. Add a Random glossary block.
      6. After the block has been added, confirm that:
        • The random glossary entry block is displayed and has Please configure this block using the edit icon. as its content.
      7. Configure the Random glossary entry block and set Take entries from this glossary to G1
      8. Click Save changes
      9. Back on the Dashboard, click Stop customising this page.
      10. Check the Random glossary entry block. Confirm that
        • It is showing an entry.
        • No error is displayed.
      11. Refresh the page several times and check the entry in the Random glossary entry block.
        • Confirm that the a random entry is being shown.
      Changing the global glossary to a non-global one.
      1. Navigate to G1's page.
      2. Edit its settings and untick Is this glossary global? and save the changes.
      3. Go back to the Dashboard.
      4. After the page has loaded, confirm that:
        • A fatal error that prevents from browsing this course is not displayed.
        • The random glossary entry block is displayed and has Please configure this block using the edit icon. as its content.
      Changing the non-global glossary back to global.
      1. Navigate back to G1's page.
      2. Edit its settings and tick Is this glossary global? and save the changes.
      3. Go back to the Dashboard. Confirm that:
        • The random glossary entry block is displayed and has Please configure this block using the edit icon. as its content.
      4. Click Customise this page to turn editing on.
      5. Configure the Random glossary entry block and set Take entries from this glossary to G1
      6. Save the changes.
      7. Back to the Dashboard, click Stop customising this page
      8. Check the Random glossary entry block. Confirm that
        • It is showing an entry.
        • No error is displayed.
      9. Refresh the page several times and check the entry in the Random glossary entry block.
        • Confirm that the a random entry is being shown.
      Deleting the course with the global glossary.
      1. Delete the C1.
      2. Go back to the Dashboard. Confirm that:
        • A fatal error that prevents from browsing this course is not displayed.
        • The random glossary entry block is displayed and has Please configure this block using the edit icon. as its content.
      Backup and restore
      1. Create one global glossary (for example on front page) with entries
      2. Create course and add glossary to it (not global), add entries to the glossary
      3. Add two "glossary_random" blocks to this course that point to each of these two glossaries, change some other settings of these blocks (rename the links, etc)
      4. Backup and restore the course
      5. Make sure in the restored course the blocks point to the correct glossaries (one is global and another in the restored course)
      6. Make sure the other custom settings of the blocks were not erased
      7. Restore the same course backup again, select to restore blocks but do not select to restore the glossary
      8. Make sure the global glossary block is displayed ok and the other one asks to be configured
      Behat
      1. If using MDK, run mdk behat -r --tags @block_glossary_random --selenium ~/path/to/selenium.jar, otherwise, run vendor/bin/behat --tags '@block_glossary_random' --config /path/to/behat.yml
        • Confirm that there are no errors nor failures.
      Show
      Adding a global glossary from another course Create a course C1. Create a glossary activity G1 and mark this glossary as global by ticking Is this glossary global? . Add at least three entries to the glossary. Navigate to the Dashboard and click Customise this page . Add a Random glossary block. After the block has been added, confirm that: The random glossary entry block is displayed and has Please configure this block using the edit icon. as its content. Configure the Random glossary entry block and set Take entries from this glossary to G1 Click Save changes Back on the Dashboard, click Stop customising this page . Check the Random glossary entry block. Confirm that It is showing an entry. No error is displayed. Refresh the page several times and check the entry in the Random glossary entry block. Confirm that the a random entry is being shown. Changing the global glossary to a non-global one. Navigate to G1's page. Edit its settings and untick Is this glossary global? and save the changes. Go back to the Dashboard. After the page has loaded, confirm that: A fatal error that prevents from browsing this course is not displayed. The random glossary entry block is displayed and has Please configure this block using the edit icon. as its content. Changing the non-global glossary back to global. Navigate back to G1's page. Edit its settings and tick Is this glossary global? and save the changes. Go back to the Dashboard. Confirm that: The random glossary entry block is displayed and has Please configure this block using the edit icon. as its content. Click Customise this page to turn editing on. Configure the Random glossary entry block and set Take entries from this glossary to G1 Save the changes. Back to the Dashboard, click Stop customising this page Check the Random glossary entry block. Confirm that It is showing an entry. No error is displayed. Refresh the page several times and check the entry in the Random glossary entry block. Confirm that the a random entry is being shown. Deleting the course with the global glossary. Delete the C1. Go back to the Dashboard. Confirm that: A fatal error that prevents from browsing this course is not displayed. The random glossary entry block is displayed and has Please configure this block using the edit icon. as its content. Backup and restore Create one global glossary (for example on front page) with entries Create course and add glossary to it (not global), add entries to the glossary Add two "glossary_random" blocks to this course that point to each of these two glossaries, change some other settings of these blocks (rename the links, etc) Backup and restore the course Make sure in the restored course the blocks point to the correct glossaries (one is global and another in the restored course) Make sure the other custom settings of the blocks were not erased Restore the same course backup again, select to restore blocks but do not select to restore the glossary Make sure the global glossary block is displayed ok and the other one asks to be configured Behat If using MDK, run mdk behat -r --tags @block_glossary_random --selenium ~/path/to/selenium.jar , otherwise, run vendor/bin/behat --tags '@block_glossary_random' --config /path/to/behat.yml Confirm that there are no errors nor failures.
    • 3.1 Sprint 7, 3.2 Sprint 1
    • Medium

      Hi,

      I am trying to change the course format, and there are two courses in the moodle I cannot change. Whenever I switched to another type of the course formats then save changes, I get this error:
      Debug info: SELECT * FROM

      {course}

      WHERE id = ?
      [array (
      0 => '4',
      )]
      Error code: invalidrecord
      Stack trace:
      line 1451 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
      line 1427 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
      line 588 of /lib/datalib.php: call to moodle_database->get_record()
      line 443 of /lib/modinfolib.php: call to get_course()
      line 412 of /lib/modinfolib.php: call to course_modinfo->__construct()
      line 2062 of /lib/modinfolib.php: call to course_modinfo::instance()
      line 195 of /blocks/glossary_random/block_glossary_random.php: call to get_fast_modinfo()
      line 294 of /blocks/moodleblock.class.php: call to block_glossary_random->get_content()
      line 236 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
      line 1002 of /lib/blocklib.php: call to block_base->get_content_for_output()
      line 1054 of /lib/blocklib.php: call to block_manager->create_block_contents()
      line 369 of /lib/outputrenderers.php: call to block_manager->ensure_content_created()
      line 45 of /theme/clean/layout/columns3.php: call to core_renderer->standard_head_html()
      line 885 of /lib/outputrenderers.php: call to include()
      line 815 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
      line 245 of /course/view.php: call to core_renderer->header()
      Can I get some help with this?

            marina Marina Glancy
            shatami Pingtao Ye
            Jun Pataleta Jun Pataleta
            Andrew Lyons Andrew Lyons
            Frédéric Massart Frédéric Massart
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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