Moodle

Calendar: Add Category event type

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 2.0
  • Fix Version/s: None
  • Component/s: Calendar
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE

Description

In response to http://moodle.org/mod/forum/discuss.php?d=112159, I like the idea of creating a category event type. I think this would be useful for posting department level events (for example, an event for the Math Department or a particular school at a University like the School of Counseling). This idea makes sense to me when looking at the various available contexts in /lib/accesslib.php. We have the global type for the system context, the user type for the user context, the course type for the course context, and the group type for the group context. Since Calendars do not make sense on the module and block level, it makes sense to me that we add a course category event type. Peace - Anthony

  1. calendar event blocks.bmml
    12/Jan/10 5:56 PM
    2 kB
    JHJ Gubbels
  2. MDL-17689_partial.diff
    09/Mar/09 12:58 PM
    20 kB
    Anthony Borrow
  3. MDL-17689_partial.diff
    09/Mar/09 10:39 AM
    18 kB
    Anthony Borrow
  1. calendar event blocks.png
    60 kB
    12/Jan/10 5:56 PM

Activity

Hide
Anthony Borrow added a comment -

I'm just taking a quick look at code and the tables. I'm wondering whether it would be best to look up the category id based on the existing course id in the event table or to add a categoryid field to the event table. I suspect it would be more efficient to add the categoryid field; however, if a course gets moved to a new category, we would want to ensure that the categoryid field gets updated.

Show
Anthony Borrow added a comment - I'm just taking a quick look at code and the tables. I'm wondering whether it would be best to look up the category id based on the existing course id in the event table or to add a categoryid field to the event table. I suspect it would be more efficient to add the categoryid field; however, if a course gets moved to a new category, we would want to ensure that the categoryid field gets updated.
Hide
lesley beasant added a comment -

The ability to be able to update calendars at category level (ie curriculum level for us) would be really useful as the LRC or Heads of Curriculum would like to be able to add subject/curriculum events to all calendars in a category.

Show
lesley beasant added a comment - The ability to be able to update calendars at category level (ie curriculum level for us) would be really useful as the LRC or Heads of Curriculum would like to be able to add subject/curriculum events to all calendars in a category.
Hide
Anthony Borrow added a comment -

Attached is a partial diff file in preparation for creating a category event type in the calendar. It introduces the possibility of category events by creating an event_category style type, modifying the calendar filters and generators to allow for filtering of categories, etc. It does not implement actually creating category events nor have I worked out the logic. I see this patch as a preliminary patch to help get things started. It is not functional and only intended to serve as an aid toward developing a functional more complete patch. Peace - Anthony

Show
Anthony Borrow added a comment - Attached is a partial diff file in preparation for creating a category event type in the calendar. It introduces the possibility of category events by creating an event_category style type, modifying the calendar filters and generators to allow for filtering of categories, etc. It does not implement actually creating category events nor have I worked out the logic. I see this patch as a preliminary patch to help get things started. It is not functional and only intended to serve as an aid toward developing a functional more complete patch. Peace - Anthony
Hide
Anthony Borrow added a comment -

Watchers - Just thinking about how to determine which categories to show on one's calendar, it would seem to me that someone ought to see all of the categories for courses in which they are enrolled. So the list of categories would take the results of my_courses and create an array of the $COURSE->category for each of those courses and if necessary sort them by the category name alphabetically. Does that sound reasonably? I'm also wondering what capability we should have in order to have someone create a category event. Initially one might think teachers but I would imagine that some department chairs (thinking in terms of a Math department) would only want the department chair to be able to create events. Perhaps course creator for that particular category? Peace - Anthony

Show
Anthony Borrow added a comment - Watchers - Just thinking about how to determine which categories to show on one's calendar, it would seem to me that someone ought to see all of the categories for courses in which they are enrolled. So the list of categories would take the results of my_courses and create an array of the $COURSE->category for each of those courses and if necessary sort them by the category name alphabetically. Does that sound reasonably? I'm also wondering what capability we should have in order to have someone create a category event. Initially one might think teachers but I would imagine that some department chairs (thinking in terms of a Math department) would only want the department chair to be able to create events. Perhaps course creator for that particular category? Peace - Anthony
Hide
Anthony Borrow added a comment -

updated partial diff - I had forgotten to include some changes to /blocks/calendar_month

Show
Anthony Borrow added a comment - updated partial diff - I had forgotten to include some changes to /blocks/calendar_month
Hide
JHJ Gubbels added a comment -

Added UI Mockup: <calendar event blocks>

Show
JHJ Gubbels added a comment - Added UI Mockup: <calendar event blocks>

People

Vote (22)
Watch (9)

Dates

  • Created:
    Updated: