project: Moodle
summary: Calendar Improvements
description: An epic to bring together all of the components of the Moodle User Association project to make improvements to the Moodle calendar.

1.summary: Create Prototype site for project
description: Create a prototype site for the Calendar project Add some pseud-realistic data and/or a some way to update and generate additional data Track the relevant development branch
2.summary: Create calendar event quick-add
description: Create a way to quickly add new calendar events. This can be opened from the New event button and will default to the next immediate time slot. The time slot period is 1 hour. The dialogue takes the title of the calendar event, and a select box containing the list of calendars available to the current context. The date is also displayed.
3.summary: Create calendar event Summary dialogue
description: Create a new summary dialogue to show the: title description time/date type button to delete the calendar event button to edit the event
4.summary: Move calendar delete button to a modal dialogue
description: Convert the calendar deletion to a modal dialogue.
5.summary: Move the calendar event edit form to a modal dialogue
description: Move the existing form for editing a calendar event to exist in a modal dialogue instead.
6.summary: Add support for AJAX navigation of the calendar
description: Previous + Next month support for the calendar created in .
7.summary: Creating a new event while viewing a course calendar should default to the course event type
description: When clicking the "new event" button while viewing a specific course calendar the form should default to the event type being "course" and the current course selected.
8.summary: The calendar should update in place after drag and drop rather than reload the page
description: The work in reloads the page to update the UI but once is completed we should do a similar thing for drag and drop.
9.summary: I should be able to upload images or media files and use them in the description of the event
description: I should be able to upload images or media files and use them in the description of the event.
10.summary: If this event is a repeating event I should be able to delete a single event, or all the events in the series
description: If this event is a repeating event I should be able to delete a single event, or all the events in the series
11.summary: Change start date for new event form when creating for non-current month
description: When viewing a month other than the current month in the calendar monthly view, if you click the "new event" button it should default the start date to the first of that month rather than today.
12.summary: Add a new event type for course categories
description: Add a new event type for course categories
13.summary: Add link to activity in summary modal for activity events
description: As part of I had to stop activity events from being editable (because they shouldnt be) but that also means that the edit button that was perviously linking to the module is no longer shown. I think it might make more sense to actually show a link in the footer that says something like "go to activity" instead of an edit button anyway since it it clearer for the user. Also, please remember to add this behat scenario back: code Scenario: Module events editing Given I log in as "admin" And I am on "Course 1" course homepage with editing mode on And the following "activities" exist: | activity | course | idnumber | name | intro | timeopen | timeclose | | choice | C1 | choice1 | Test choice 1 | Test choice description | yesterday | tomorrow | When I follow "This month" Then I should see "Choice Test choice 1 open" And I should see "Choice Test choice 1 close" When I click on "Choice Test choice 1 open" "link" Then "Delete" "button" should not exist And I should see "Open event" And "Edit" "button" should exist When I click on "Edit" "button" And I wait to be redirected Then I should see "Updating: Choice" And I am on "Course 1" course homepage And I follow "This month" When I click on "Choice Test choice 1 close" "link" Then "Delete" "button" should not exist And I should see "Close event" And "Edit" "button" should exist When I click on "Edit" "button" And I wait to be redirected Then I should see "Updating: Choice" code Might be necessary to adjust this to click on the new link and not on the edit button
14.summary: Make use of the new calendar view in the calendar block
description: The calendar block should pick up the new calendar view wholesale if possible.
15.summary: Update fake calendar block on event changes
description: When adding, editing and deleting events the fake calendar block that displays the previous, current and next month should be updated using AJAX. See
16.summary: Improve styling of summary modal
description: Improve the styling for displaying the summary info in the modal when you click on an event in the calendar view. Probably need to speak to Barbs and/or Al for help.
17.summary: Add support for drag/drop of assign activity action events
description: Allow the action events created by the assign activity to be dragged and dropped in the calendar UI.
18.summary: Add support for drag/drop of quiz activity action events
description: Allow the action events created by the quiz activity to be dragged and dropped in the calendar UI.
19.summary: Add support for drag/drop of feedback activity action events
description: Allow the action events created by the feedback activity to be dragged and dropped in the calendar UI.
20.summary: Add support for drag/drop of calendar events between different months
description: Add support for drag/drop of calendar events between different months in the wide view of the calendar.
21.summary: Allow the modal edit dialogue to add new events
description: Modify the dialogue created in to be fed unsaved data from the quick add forms More link (). This may be merged into .
22.summary: Convert existing calendar view to templates
description: Convert the existing monthly main calendar view to a template
23.summary: Add support for AJAX CRUD events to be reflected in the calendar view
description: Combine the work from , , , and
24.summary: Add support for drag/drop of calendar events within the same month
description: Add support for drag/drop of calendar events within the same month in the wide view of the calendar.
25.summary: Calendar event modal: Dont show Description header if there is no description
description: A lot of events will be created without descriptions. They look odd with an empty "Description" header. Just dont show this header if there is no description in the template.
26.summary: Add event source to summary modal
description: Discuss and decide with the UX team if event source information is really relevant and implement it. Remember to add And I should see "Event source: Test Import" to calendar_import.feature back.
27.summary: Add unit tests for submit_create_update_form
description: Need to add some unit tests for the external function introduced in .
28.summary: Update calendar UI after add an event
description: At the moment after add an event, the calendar page is reloaded in order to see the changes on the UI. We need to do it properly, adding and removing the content without reloading.
29.summary: Update calendar UI after edit an event
description: At the moment after edit an event, the calendar page is reloaded in order to see the changes on the UI. We need to do it properly, editing the content without trigger a page reloading.
30.summary: Update calendar UI after delete an event
description: At the moment after delete an event, the calendar page is reload in order to see the changes on the UI. We need to do it properly deleting the content without page reloading.
31.summary: Make the calendar template compatible with narrow views
description: Make the template created in work for the narrow views used in: responsive versions the calendar block the three-month calendar view (pretend block)
32.summary: i_create_a_calendar_event behat step needs to assert the modal is fully loaded
description: For , I have added \\$this->execute("behat_general::i_wait_seconds", 1); for the time being, but we might have to create some custom step to make sure the modal is loaded.
33.summary: Add course name link to summary modal
description: On stables, the UI displays a link to the course that events belongs to. The summary modal needs to display the course name as a link on summary modal for course events. REMEMBER: Add behat steps to check that.
34.summary: Clicking the empty section of a day in the calendar should open the new event modal
description: When the user clicks on the empty space of the day in the calendar it should open the new event modal to allow them to quickly add an event. The time start for the event should default to the day that was clicked and the next whole hour from the current time.
35.summary: Convert upcoming view to templates
description: The calendar upcoming view needs to be converted to template and exporters
36.summary: Create data generator for prototype site
description: We need to fill the prototype site with pseudo-realistic data.
37.summary: Convert day view to template
description: The calendar day view needs to be converted to template and AJAX, the navigation between days should not reload the page.
38.summary: Confirm delete modal should use "delete" and "cancel"
description: The modal that shows up to confirm that you want to delete an event should say "delete" and "cancel" for the buttons instead of "yes" and "no".
39.summary: Convert calendar course selector to AJAX
description: We could potentially use the existing course auto complete from core, the goal is to select the course and apply the filter without reload the page.
40.summary: Add course search/filter
description: I should be able to quickly find and select any other calendar I can create events in by searching.
41.summary: Add support for drag/drop of action events and implement dd for choice activity
description: As a user who can edit an activity I should be able to drag and drop an activity calendar event to a new date in order to quickly change the date settings for the activity
42.summary: Make use of calendar_mini template in fake block
description: The fake calendar block can now use the calendar_mini template and exporters to display.
43.summary: Use new event type filter in calendar view
description: introduced a new event filter region which updates via AJAX. This needs to be used in the main calendar block and anywhere else which uses it.
44.summary: Look into removing the iCal icon + feed
description: This is accessible from the Export page already.
45.summary: Improve error when not possible to move events
description: Improve the error when you try to drag a start event to after its end event, etc. These are currently standard exceptions. Is this what we want?
46.summary: Add icon to month view
description: Add icon to month view
47.summary: Update upcoming block
description: Upcoming block - may need to be based on upcoming view.
48.summary: Add AJAX navigation on day view
description: On we have converted existing calendar view to use exporters and templates. Now we need to make use of it and add ajax navigation on the calendar day view.
49.summary: Changing month should use year + month instead of timestamp
description: There are a few potential issues with trying to change month and navigate using just a timestamp. In many situations it will be better to use a fixed year, month day.
50.summary: Random behat fails after navigating month
description: Adding an "And I wait for the page to be ready" fixes it, but thats not the right fix. We probably need to add calls to M.util.js_penidng etc.
51.summary: Create template for add_event_button
description: There are a couple of places still using the add_event_button in the calendar renderer. We should: 1) Replace the existing uses in the exporters with templates which do this properly 2) Make the existing renderer function use the template until we remove it entirely

Below is an instruction that describes a task, paired with an input that provides an epic with this format: 
"project": "Name of the project" 
"summary": "Summary of the epic user story" 
"description": "Description of the epic user story". Write a response that appropriately completes the request.### Instruction:
Break this epic user story into smaller tasks to help the developers understand the epic better, you can divide this epic into as much as you want depending on the complexity of the epic.
### Input:
project: Moodle
summary: Calendar Improvements
description: An epic to bring together all of the components of the Moodle User Association project to make improvements to the Moodle calendar.

### Response:
1.summary: Create Prototype site for project
description: Create a prototype site for the Calendar project Add some pseud-realistic data and/or a some way to update and generate additional data Track the relevant development branch
2.summary: Create calendar event quick-add
description: Create a way to quickly add new calendar events. This can be opened from the New event button and will default to the next immediate time slot. The time slot period is 1 hour. The dialogue takes the title of the calendar event, and a select box containing the list of calendars available to the current context. The date is also displayed.
3.summary: Create calendar event Summary dialogue
description: Create a new summary dialogue to show the: title description time/date type button to delete the calendar event button to edit the event
4.summary: Move calendar delete button to a modal dialogue
description: Convert the calendar deletion to a modal dialogue.
5.summary: Move the calendar event edit form to a modal dialogue
description: Move the existing form for editing a calendar event to exist in a modal dialogue instead.
6.summary: Add support for AJAX navigation of the calendar
description: Previous + Next month support for the calendar created in .
7.summary: Creating a new event while viewing a course calendar should default to the course event type
description: When clicking the "new event" button while viewing a specific course calendar the form should default to the event type being "course" and the current course selected.
8.summary: The calendar should update in place after drag and drop rather than reload the page
description: The work in reloads the page to update the UI but once is completed we should do a similar thing for drag and drop.
9.summary: I should be able to upload images or media files and use them in the description of the event
description: I should be able to upload images or media files and use them in the description of the event.
10.summary: If this event is a repeating event I should be able to delete a single event, or all the events in the series
description: If this event is a repeating event I should be able to delete a single event, or all the events in the series
11.summary: Change start date for new event form when creating for non-current month
description: When viewing a month other than the current month in the calendar monthly view, if you click the "new event" button it should default the start date to the first of that month rather than today.
12.summary: Add a new event type for course categories
description: Add a new event type for course categories
13.summary: Add link to activity in summary modal for activity events
description: As part of I had to stop activity events from being editable (because they shouldnt be) but that also means that the edit button that was perviously linking to the module is no longer shown. I think it might make more sense to actually show a link in the footer that says something like "go to activity" instead of an edit button anyway since it it clearer for the user. Also, please remember to add this behat scenario back: code Scenario: Module events editing Given I log in as "admin" And I am on "Course 1" course homepage with editing mode on And the following "activities" exist: | activity | course | idnumber | name | intro | timeopen | timeclose | | choice | C1 | choice1 | Test choice 1 | Test choice description | yesterday | tomorrow | When I follow "This month" Then I should see "Choice Test choice 1 open" And I should see "Choice Test choice 1 close" When I click on "Choice Test choice 1 open" "link" Then "Delete" "button" should not exist And I should see "Open event" And "Edit" "button" should exist When I click on "Edit" "button" And I wait to be redirected Then I should see "Updating: Choice" And I am on "Course 1" course homepage And I follow "This month" When I click on "Choice Test choice 1 close" "link" Then "Delete" "button" should not exist And I should see "Close event" And "Edit" "button" should exist When I click on "Edit" "button" And I wait to be redirected Then I should see "Updating: Choice" code Might be necessary to adjust this to click on the new link and not on the edit button
14.summary: Make use of the new calendar view in the calendar block
description: The calendar block should pick up the new calendar view wholesale if possible.
15.summary: Update fake calendar block on event changes
description: When adding, editing and deleting events the fake calendar block that displays the previous, current and next month should be updated using AJAX. See
16.summary: Improve styling of summary modal
description: Improve the styling for displaying the summary info in the modal when you click on an event in the calendar view. Probably need to speak to Barbs and/or Al for help.
17.summary: Add support for drag/drop of assign activity action events
description: Allow the action events created by the assign activity to be dragged and dropped in the calendar UI.
18.summary: Add support for drag/drop of quiz activity action events
description: Allow the action events created by the quiz activity to be dragged and dropped in the calendar UI.
19.summary: Add support for drag/drop of feedback activity action events
description: Allow the action events created by the feedback activity to be dragged and dropped in the calendar UI.
20.summary: Add support for drag/drop of calendar events between different months
description: Add support for drag/drop of calendar events between different months in the wide view of the calendar.
21.summary: Allow the modal edit dialogue to add new events
description: Modify the dialogue created in to be fed unsaved data from the quick add forms More link (). This may be merged into .
22.summary: Convert existing calendar view to templates
description: Convert the existing monthly main calendar view to a template
23.summary: Add support for AJAX CRUD events to be reflected in the calendar view
description: Combine the work from , , , and
24.summary: Add support for drag/drop of calendar events within the same month
description: Add support for drag/drop of calendar events within the same month in the wide view of the calendar.
25.summary: Calendar event modal: Dont show Description header if there is no description
description: A lot of events will be created without descriptions. They look odd with an empty "Description" header. Just dont show this header if there is no description in the template.
26.summary: Add event source to summary modal
description: Discuss and decide with the UX team if event source information is really relevant and implement it. Remember to add And I should see "Event source: Test Import" to calendar_import.feature back.
27.summary: Add unit tests for submit_create_update_form
description: Need to add some unit tests for the external function introduced in .
28.summary: Update calendar UI after add an event
description: At the moment after add an event, the calendar page is reloaded in order to see the changes on the UI. We need to do it properly, adding and removing the content without reloading.
29.summary: Update calendar UI after edit an event
description: At the moment after edit an event, the calendar page is reloaded in order to see the changes on the UI. We need to do it properly, editing the content without trigger a page reloading.
30.summary: Update calendar UI after delete an event
description: At the moment after delete an event, the calendar page is reload in order to see the changes on the UI. We need to do it properly deleting the content without page reloading.
31.summary: Make the calendar template compatible with narrow views
description: Make the template created in work for the narrow views used in: responsive versions the calendar block the three-month calendar view (pretend block)
32.summary: i_create_a_calendar_event behat step needs to assert the modal is fully loaded
description: For , I have added \\$this->execute("behat_general::i_wait_seconds", 1); for the time being, but we might have to create some custom step to make sure the modal is loaded.
33.summary: Add course name link to summary modal
description: On stables, the UI displays a link to the course that events belongs to. The summary modal needs to display the course name as a link on summary modal for course events. REMEMBER: Add behat steps to check that.
34.summary: Clicking the empty section of a day in the calendar should open the new event modal
description: When the user clicks on the empty space of the day in the calendar it should open the new event modal to allow them to quickly add an event. The time start for the event should default to the day that was clicked and the next whole hour from the current time.
35.summary: Convert upcoming view to templates
description: The calendar upcoming view needs to be converted to template and exporters
36.summary: Create data generator for prototype site
description: We need to fill the prototype site with pseudo-realistic data.
37.summary: Convert day view to template
description: The calendar day view needs to be converted to template and AJAX, the navigation between days should not reload the page.
38.summary: Confirm delete modal should use "delete" and "cancel"
description: The modal that shows up to confirm that you want to delete an event should say "delete" and "cancel" for the buttons instead of "yes" and "no".
39.summary: Convert calendar course selector to AJAX
description: We could potentially use the existing course auto complete from core, the goal is to select the course and apply the filter without reload the page.
40.summary: Add course search/filter
description: I should be able to quickly find and select any other calendar I can create events in by searching.
41.summary: Add support for drag/drop of action events and implement dd for choice activity
description: As a user who can edit an activity I should be able to drag and drop an activity calendar event to a new date in order to quickly change the date settings for the activity
42.summary: Make use of calendar_mini template in fake block
description: The fake calendar block can now use the calendar_mini template and exporters to display.
43.summary: Use new event type filter in calendar view
description: introduced a new event filter region which updates via AJAX. This needs to be used in the main calendar block and anywhere else which uses it.
44.summary: Look into removing the iCal icon + feed
description: This is accessible from the Export page already.
45.summary: Improve error when not possible to move events
description: Improve the error when you try to drag a start event to after its end event, etc. These are currently standard exceptions. Is this what we want?
46.summary: Add icon to month view
description: Add icon to month view
47.summary: Update upcoming block
description: Upcoming block - may need to be based on upcoming view.
48.summary: Add AJAX navigation on day view
description: On we have converted existing calendar view to use exporters and templates. Now we need to make use of it and add ajax navigation on the calendar day view.
49.summary: Changing month should use year + month instead of timestamp
description: There are a few potential issues with trying to change month and navigate using just a timestamp. In many situations it will be better to use a fixed year, month day.
50.summary: Random behat fails after navigating month
description: Adding an "And I wait for the page to be ready" fixes it, but thats not the right fix. We probably need to add calls to M.util.js_penidng etc.
51.summary: Create template for add_event_button
description: There are a couple of places still using the add_event_button in the calendar renderer. We should: 1) Replace the existing uses in the exporters with templates which do this properly 2) Make the existing renderer function use the template until we remove it entirely
