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

Component that created the calendar event needs to supply action details

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: None
    • Component/s: Calendar
    • Labels:
    • Testing Instructions:
      Hide
      1. Create an assignment in a course
      2. Verify an event was created in the mdl_event table
      3. Modify the event in the database, setting the 'type' column to 1
      4. Place the attached test.php file in the calendar directory
      5. Add the following to mod/assign/lib.php:

        function mod_assign_core_calendar_provide_event_action(
            \core_calendar\event $event,
            \core_calendar\action_factory $factory
        ) {
            return $factory->create_instance(
                'chef',
                new \moodle_url('http://example.com'),
                3
            );
        }

        (If there is already a function with this name just comment it out and replace it with this one)

      6. Browse to yourmoodleinstance/calendar/test.php
      7. Verify the information you see matches what is in the database
      8. Verify the information added by the mod_assign callback is also present
      Show
      Create an assignment in a course Verify an event was created in the mdl_event table Modify the event in the database, setting the 'type' column to 1 Place the attached test.php file in the calendar directory Add the following to mod/assign/lib.php: function mod_assign_core_calendar_provide_event_action( \core_calendar\event $event , \core_calendar\action_factory $factory ) { return $factory ->create_instance( 'chef' , new \moodle_url( 'http://example.com' ), 3 ); } (If there is already a function with this name just comment it out and replace it with this one) Browse to yourmoodleinstance/calendar/test.php Verify the information you see matches what is in the database Verify the information added by the mod_assign callback is also present
    • Affected Branches:
      MOODLE_33_STABLE
    • Pull Master Branch:
      MDL-57442-master-2
    • Sprint:
      3.3 Project Team Sprint 1, 3.3 Project Team Sprint 2

      Description

      1. How to phrase, link, count ...
      2. Is there a visibility override (e.g. can the user see this event?)
      3. Is the action completed by the user?

      Will most likely use component_callback(). Possibly multiple callbacks will be responsible for this (callback, closure, etc...).

      See https://docs.moodle.org/dev/My_course_overview_improvements#Todo_API

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cameron1729 cameron1729
              Reporter:
              markn Mark Nelson
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: