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

Multiple stack traces when a students views a course with UploadPDF activity

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.1.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Ubuntu Debian 6.0.2 'Squeeze', Apache 2.2.16, MySQL 5.1.49, PHP 5.3.3
    • Database:
      MySQL
    • Workaround:
      Hide

      None found.

      Show
      None found.
    • Affected Branches:
      MOODLE_21_STABLE

      Description

      (Note: I believe this is more of an UploadPDF issue than any other Moodle module or core issue, but I'm happy to be corrected and re-report elsewhere.)

      When a student attempts to access a specific course (not any course), Moodle execution halts with the following stack trace:

      Invalid course module ID
      Stack trace:
      line 429 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 924 of /lib/blocklib.php: call to block_base->get_content_for_output()
      line 976 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 7 of /theme/sdctwo/layout/general.php: call to block_manager->region_has_content()
      line 654 of /lib/outputrenderers.php: call to include()
      line 612 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
      line ? of unknownfile: call to core_renderer->header()
      line 1291 of /lib/setuplib.php: call to call_user_func_array()
      line 196 of /course/view.php: call to bootstrap_renderer->__call()
      line 196 of /course/view.php: call to bootstrap_renderer->header()

      Looking at Apache's error log, the following 3 are shown (sanitised and reduced for clarity):

      PHP Notice: Undefined variable: cm in /srv/moodle2/releases/20110920070146/calendar/lib.php on line 494, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP Stack trace:, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 1.

      {main}() /srv/moodle2/releases/20110920070146/course/view.php:0, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 2. bootstrap_renderer->header() /srv/moodle2/releases/20110920070146/course/view.php:196, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 3. bootstrap_renderer->__call() /srv/moodle2/releases/20110920070146/lib/setuplib.php:0, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 4. call_user_func_array() /srv/moodle2/releases/20110920070146/lib/setuplib.php:1291, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 5. core_renderer->header() /srv/moodle2/releases/20110920070146/lib/setuplib.php:0, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 6. core_renderer->render_page_layout() /srv/moodle2/releases/20110920070146/lib/outputrenderers.php:612, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 7. include() /srv/moodle2/releases/20110920070146/lib/outputrenderers.php:654, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 8. block_manager->region_has_content() /srv/moodle2/releases/20110920070146/theme/sdctwo/layout/general.php:7, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 9. block_manager->ensure_content_created() /srv/moodle2/releases/20110920070146/lib/blocklib.php:349, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 10. block_manager->create_block_contents() /srv/moodle2/releases/20110920070146/lib/blocklib.php:976, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 11. block_base->get_content_for_output() /srv/moodle2/releases/20110920070146/lib/blocklib.php:924, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 12. block_base->formatted_contents() /srv/moodle2/releases/20110920070146/blocks/moodleblock.class.php:232, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 13. block_calendar_upcoming->get_content() /srv/moodle2/releases/20110920070146/blocks/moodleblock.class.php:280, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 14. calendar_get_upcoming() /srv/moodle2/releases/20110920070146/blocks/calendar_upcoming/block_calendar_upcoming.php:60, referer: http://moodle.domain.com/enrol/index.php?id=322

      PHP Notice: Trying to get property of non-object in /srv/moodle2/releases/20110920070146/calendar/lib.php on line 494, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP Stack trace:, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 1. {main}

      () /srv/moodle2/releases/20110920070146/course/view.php:0, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 2. bootstrap_renderer->header() /srv/moodle2/releases/20110920070146/course/view.php:196, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 3. bootstrap_renderer->__call() /srv/moodle2/releases/20110920070146/lib/setuplib.php:0, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 4. call_user_func_array() /srv/moodle2/releases/20110920070146/lib/setuplib.php:1291, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 5. core_renderer->header() /srv/moodle2/releases/20110920070146/lib/setuplib.php:0, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 6. core_renderer->render_page_layout() /srv/moodle2/releases/20110920070146/lib/outputrenderers.php:612, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 7. include() /srv/moodle2/releases/20110920070146/lib/outputrenderers.php:654, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 8. block_manager->region_has_content() /srv/moodle2/releases/20110920070146/theme/sdctwo/layout/general.php:7, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 9. block_manager->ensure_content_created() /srv/moodle2/releases/20110920070146/lib/blocklib.php:349, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 10. block_manager->create_block_contents() /srv/moodle2/releases/20110920070146/lib/blocklib.php:976, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 11. block_base->get_content_for_output() /srv/moodle2/releases/20110920070146/lib/blocklib.php:924, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 12. block_base->formatted_contents() /srv/moodle2/releases/20110920070146/blocks/moodleblock.class.php:232, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 13. block_calendar_upcoming->get_content() /srv/moodle2/releases/20110920070146/blocks/moodleblock.class.php:280, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 14. calendar_get_upcoming() /srv/moodle2/releases/20110920070146/blocks/calendar_upcoming/block_calendar_upcoming.php:60, referer: http://moodle.domain.com/enrol/index.php?id=322

      PHP Notice: Undefined variable: cm in /srv/moodle2/releases/20110920070146/calendar/lib.php on line 494, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP Stack trace:, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 1.

      {main}

      () /srv/moodle2/releases/20110920070146/course/view.php:0, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 2. bootstrap_renderer->header() /srv/moodle2/releases/20110920070146/course/view.php:196, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 3. bootstrap_renderer->__call() /srv/moodle2/releases/20110920070146/lib/setuplib.php:0, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 4. call_user_func_array() /srv/moodle2/releases/20110920070146/lib/setuplib.php:1291, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 5. core_renderer->header() /srv/moodle2/releases/20110920070146/lib/setuplib.php:0, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 6. core_renderer->render_page_layout() /srv/moodle2/releases/20110920070146/lib/outputrenderers.php:612, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 7. include() /srv/moodle2/releases/20110920070146/lib/outputrenderers.php:654, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 8. block_manager->region_has_content() /srv/moodle2/releases/20110920070146/theme/sdctwo/layout/general.php:7, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 9. block_manager->ensure_content_created() /srv/moodle2/releases/20110920070146/lib/blocklib.php:349, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 10. block_manager->create_block_contents() /srv/moodle2/releases/20110920070146/lib/blocklib.php:976, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 11. block_base->get_content_for_output() /srv/moodle2/releases/20110920070146/lib/blocklib.php:924, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 12. block_base->formatted_contents() /srv/moodle2/releases/20110920070146/blocks/moodleblock.class.php:232, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 13. block_calendar_upcoming->get_content() /srv/moodle2/releases/20110920070146/blocks/moodleblock.class.php:280, referer: http://moodle.domain.com/enrol/index.php?id=322
      PHP 14. calendar_get_upcoming() /srv/moodle2/releases/20110920070146/blocks/calendar_upcoming/block_calendar_upcoming.php:60, referer: http://moodle.domain.com/enrol/index.php?id=322

      Default exception handler: Invalid course module ID Debug: \n* line 429 of /lib/setuplib.php: moodle_exception thrown\n* line 112 of /mod/assignment/lib.php: call to print_error()\n* line 21 of /mod/assignment/type/uploadpdf/assignment.class.php: call to assignment_base->assignment_base()\n* line 494 of /calendar/lib.php: call to assignment_uploadpdf->assignment_uploadpdf()\n* line 60 of /blocks/calendar_upcoming/block_calendar_upcoming.php: call to calendar_get_upcoming()\n* line 280 of /blocks/moodleblock.class.php: call to block_calendar_upcoming->get_content()\n* line 232 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()\n* line 924 of /lib/blocklib.php: call to block_base->get_content_for_output()\n* line 976 of /lib/blocklib.php: call to block_manager->create_block_contents()\n* line 349 of /lib/blocklib.php: call to block_manager->ensure_content_created()\n* line 7 of /theme/sdctwo/layout/general.php: call to block_manager->region_has_content()\n* line 654 of /lib/outputrenderers.php: call to include()\n* line 612 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()\n* line ? of unknownfile: call to core_renderer->header()\n* line 1291 of /lib/setuplib.php: call to call_user_func_array()\n* line 196 of /course/view.php: call to bootstrap_renderer->__call()\n* line 196 of /course/view.php: call to bootstrap_renderer->header()\n, referer: http://moodle.domain.com/enrol/index.php?id=322

      This seems to affect students only: admins and teachers who have switched their role to student do not receive this error. Also, this is the only course where we receive this error, and other courses running UploadPDF activities appear to be unaffected.

        Attachments

          Activity

            People

            • Assignee:
              davosmith Davo Smith
              Reporter:
              vaughany Paul Vaughan
              Participants:
              Component watchers:
              Davo Smith
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: