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

Can not edit calendarevent

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.5.1
    • Fix Version/s: 3.4.6, 3.5.3
    • Component/s: Calendar
    • Labels:
    • Testing Instructions:
      Hide
      1. Log in as an admin
      2. Go to "Site administration / Appearance / Calendar"
      3. Tick "Admins see all"
      4. Save changes
      5. Go to "Site administration / Users / Permissions / Assign system roles"
      6. Assign a user t1 as a "Manager"
      7. Create a course
      8. Enrol t1 as a non-editing teacher of that course.
      9. Go to the course homepage.
      10. Click on the cog and click "More..."
      11. Click on the "Users" tab and click on the "Permissions" link.
      12. On the filter field, enter "calendar:manageentries"
      13. On the results below, remove the "Non-editing teacher" role under the "Roles with permission column"
      14. Log in as t1.
      15. Click on "Calendar" on the nav panel.
      16. Click on a cell to create a new calendar event.
      17. Confirm that the form loads successfully.
      18. Create an event of any type from the available event type options.
      19. Confirm that you can successfully create the event.
      20. Edit the event (e.g. its type, name, description, etc).
      21. Confirm that the form loads successfully.
      22. Confirm that you can successfully save the event.
      Show
      Log in as an admin Go to " Site administration / Appearance / Calendar " Tick " Admins see all " Save changes Go to " Site administration / Users / Permissions / Assign system roles " Assign a user t1 as a " Manager " Create a course Enrol t1 as a non-editing teacher of that course. Go to the course homepage. Click on the cog and click " More... " Click on the " Users " tab and click on the " Permissions " link. On the filter field, enter " calendar:manageentries " On the results below, remove the " Non-editing teacher " role under the " Roles with permission column " Log in as t1. Click on " Calendar " on the nav panel. Click on a cell to create a new calendar event. Confirm that the form loads successfully. Create an event of any type from the available event type options. Confirm that you can successfully create the event. Edit the event (e.g. its type, name, description, etc). Confirm that the form loads successfully. Confirm that you can successfully save the event.
    • Affected Branches:
      MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
      MDL-63241-35-take2
    • Pull Master Branch:
      MDL-63241-master-take2

      Description

      Error in

      File: /calendar/lib.php

      Line: 3799

      Content: FROM {course}

      BugFix: FROM {course} c

      Errormessage befor fixed:

      Unknown column 'c.id' in 'field list'
      SELECT
                                  c.id, c.visible, ctx.id AS ctxid, ctx.path AS ctxpath, ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel, ctx.instanceid AS ctxinstance
                              FROM mdl_course
                              JOIN mdl_context ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = ?)
      [array (
        0 => 50,
      )]
      Error code: dmlreadexception

      • line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
      • line 1184 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 3804 of /calendar/lib.php: call to mysqli_native_moodle_database->get_recordset_sql()
      • line 71 of /calendar/classes/local/event/forms/create.php: call to calendar_get_allowed_event_types()
      • line 204 of /lib/formslib.php: call to core_calendar\local\event\forms\create->definition()
      • line 3607 of /calendar/lib.php: call to moodleform->__construct()
      • line 7698 of /lib/moodlelib.php: call to calendar_output_fragment_event_form()
      • line 415 of /lib/external/externallib.php: call to component_callback()
      • line 228 of /lib/externallib.php: call to core_external::get_fragment()
      • line 59 of /lib/ajax/service.php: call to external_api::call_external_function()
        Unknown column 'c.id' in 'field list'
        SELECT
                                    c.id, c.visible, ctx.id AS ctxid, ctx.path AS ctxpath, ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel, ctx.instanceid AS ctxinstance
                                FROM mdl_course
                                JOIN mdl_context ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = ?)
        [array (
          0 => 50,
        )]
        Error code: dmlreadexception
      • line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
      • line 1184 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 3804 of /calendar/lib.php: call to mysqli_native_moodle_database->get_recordset_sql()
      • line 71 of /calendar/classes/local/event/forms/create.php: call to calendar_get_allowed_event_types()
      • line 204 of /lib/formslib.php: call to core_calendar\local\event\forms\create->definition()
      • line 3607 of /calendar/lib.php: call to moodleform->__construct()
      • line 7698 of /lib/moodlelib.php: call to calendar_output_fragment_event_form()
      • line 415 of /lib/external/externallib.php: call to component_callback()
      • line 228 of /lib/externallib.php: call to core_external::get_fragment()
      • line 59 of /lib/ajax/service.php: call to external_api::call_external_function()
        Unknown column 'c.id' in 'field list'
        SELECT
                                    c.id, c.visible, ctx.id AS ctxid, ctx.path AS ctxpath, ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel, ctx.instanceid AS ctxinstance
                                FROM mdl_course
                                JOIN mdl_context ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = ?)
        [array (
          0 => 50,
        )]
        Error code: dmlreadexception
      • line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
      • line 1184 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 3804 of /calendar/lib.php: call to mysqli_native_moodle_database->get_recordset_sql()
      • line 71 of /calendar/classes/local/event/forms/create.php: call to calendar_get_allowed_event_types()
      • line 204 of /lib/formslib.php: call to core_calendar\local\event\forms\create->definition()
      • line 3607 of /calendar/lib.php: call to moodleform->__construct()
      • line 7698 of /lib/moodlelib.php: call to calendar_output_fragment_event_form()
      • line 415 of /lib/external/externallib.php: call to component_callback()
      • line 228 of /lib/externallib.php: call to core_external::get_fragment()
      • line 59 of /lib/ajax/service.php: call to external_api::call_external_function()
        Unknown column 'c.id' in 'field list'
        SELECT
                                    c.id, c.visible, ctx.id AS ctxid, ctx.path AS ctxpath, ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel, ctx.instanceid AS ctxinstance
                                FROM mdl_course
                                JOIN mdl_context ctx ON (ctx.instanceid = c.id AND ctx.contextlevel = ?)
        [array (
          0 => 50,
        )]
        Error code: dmlreadexception
      • line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
      • line 1184 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 3804 of /calendar/lib.php: call to mysqli_native_moodle_database->get_recordset_sql()
      • line 71 of /calendar/classes/local/event/forms/create.php: call to calendar_get_allowed_event_types()
      • line 204 of /lib/formslib.php: call to core_calendar\local\event\forms\create->definition()
      • line 3607 of /calendar/lib.php: call to moodleform->__construct()
      • line 7698 of /lib/moodlelib.php: call to calendar_output_fragment_event_form()
      • line 415 of /lib/external/externallib.php: call to component_callback()
      • line 228 of /lib/externallib.php: call to core_external::get_fragment()
      • line 59 of /lib/ajax/service.php: call to external_api::call_external_function()

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Nov/18

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m