Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-3748

"Invalid Course Module ID" error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Not a bug
    • Affects Version/s: 2.2.2
    • Fix Version/s: None
    • Labels:
      None
    • Database:
      MySQL
    • Workaround:
      Hide

      Delete the 'Upcoming Events' block.

      Show
      Delete the 'Upcoming Events' block.
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      Hi Davo. An odd bug to report here, as UploadPDF seems to be the culprit but has been working without problems for a long time.

      A user (student role) could not access a course, and was instead receiving an 'invalid course module ID' error. Teachers and site admins could access the course without errors. Upon locating the stack trace (below) it seems that the 'upcoming events' block was calling the UploadPDF class and failing.

      As a test I accessed the course as site admin and deleted the 'upcoming events' block, at which point the user who previously could not access the course, could. Upon adding the block back in to the course, the user again received the error.

      Stack trace:
      line 435 of /lib/setuplib.php: moodle_exception thrown
      line 112 of /mod/assignment/lib.php: call to print_error()
      line 21 of /mod/assignment/type/uploadpdf/assignment.class.php: call to assignment_base->assignment_base()
      line 494 of /calendar/lib.php: call to assignment_uploadpdf->assignment_uploadpdf()
      line 60 of /blocks/calendar_upcoming/block_calendar_upcoming.php: call to calendar_get_upcoming()
      line 280 of /blocks/moodleblock.class.php: call to block_calendar_upcoming->get_content()
      line 232 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
      line 926 of /lib/blocklib.php: call to block_base->get_content_for_output()
      line 978 of /lib/blocklib.php: call to block_manager->create_block_contents()
      line 349 of /lib/blocklib.php: call to block_manager->ensure_content_created()
      line 6 of /theme/sdctwo/layout/general.php: call to block_manager->region_has_content()
      line 685 of /lib/outputrenderers.php: call to include()
      line 637 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
      line ? of unknownfile: call to core_renderer->header()
      line 1363 of /lib/setuplib.php: call to call_user_func_array()
      line 211 of /course/view.php: call to bootstrap_renderer->__call()
      line 211 of /course/view.php: call to bootstrap_renderer->header()

      The course has just two UploadPDF assignments, one of which has a due date.

      Thought I'd better report it as I can't immediately think how to progress, but can supply any other information you may need.

      Cheers.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: