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

Adding event to Calendar causes "coding error detected"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.2
    • Component/s: Calendar
    • Labels:
    • Environment:
      Apache version 2.2.16
      PHP version 5.2.14
      MySQL version 5.0.91-community
      Architecture x86_64
      Operating system linux
      quad core, 2GB of Ram
      Moodle 2.0 (Build: 20101125)
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Adding and event to a calendar cases "Coding error detected, it must be fixed by a programmer: Invalid context level of parameter."

      Only on the home page adding an event to "ALL" works fine, but selecting a course causes this error. I turned on Deleveloper Level debugging messages and get this.

      Coding error detected, it must be fixed by a programmer: Invalid context level of parameter.

      Stack trace:
      •line 3956 of /lib/accesslib.php: coding_exception thrown
      •line 3089 of /lib/accesslib.php: call to get_course_context()
      •line 77 of /blocks/online_users/block_online_users.php: call to get_enrolled_sql()
      •line 279 of /blocks/moodleblock.class.php: call to block_online_users->get_content()
      •line 232 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
      •line 882 of /lib/blocklib.php: call to block_base->get_content_for_output()
      •line 934 of /lib/blocklib.php: call to block_manager->create_block_contents()
      •line 342 of /lib/blocklib.php: call to block_manager->ensure_content_created()
      •line 7 of /theme/splash/layout/general.php: call to block_manager->region_has_content()
      •line 627 of /lib/outputrenderers.php: call to include()
      •line 585 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
      •line 215 of /calendar/event.php: call to core_renderer->header()

      as admin or a teacher, this error happens. When I switch templates back to stadard, same error occurs.
      My moodle is a fantastico installation.
      I have found a forum entry talking about the same problem.
      http://moodle.org/mod/forum/discuss.php?d=165451#p736608 (in french)

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  21/Feb/11