core_calendar/repository

A javascript module to handle calendar ajax actions.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Members

(static, constant) deleteSubscription

Source:

Delete calendar subscription by id.

(static, constant) getCourseGroupsData

Source:

Get the groups by course id.

(static, constant) updateEventStartDay

Source:

Change the start day for the given event id. The day timestamp only has to be any time during the target day because only the date information is extracted, the time of the day is ignored.

Methods

(inner) deleteEvent(eventId, deleteSeries) → {promise}

Source:

Delete a calendar event.

Parameters:
Name Type Description
eventId number

The event id.

deleteSeries boolean

Whether to delete all events in the series

Returns:

Resolved with requested calendar event

Type
promise

(inner) getCalendarDayData(year, month, day, courseId, categoryId) → {promise}

Source:

Get calendar data for the day view.

Parameters:
Name Type Description
year number

Year

month number

Month

day number

Day

courseId number

The course id.

categoryId number

The id of the category whose events are shown

Returns:

Resolved with the day view data.

Type
promise

(inner) getCalendarMonthData(year, month, courseId, categoryId, includeNavigation, mini, day, view) → {promise}

Source:

Get calendar data for the month view.

Parameters:
Name Type Description
year number

Year

month number

Month

courseId number

The course id.

categoryId number

The category id.

includeNavigation boolean

Whether to include navigation.

mini boolean

Whether the month is in mini view.

day number

Day (optional)

view string

The calendar view mode.

Returns:

Resolved with the month view data.

Type
promise

(inner) getCalendarUpcomingData(courseId, categoryId) → {promise}

Source:

Get calendar upcoming data.

Parameters:
Name Type Description
courseId number

The course id.

categoryId number

The category id.

Returns:

Resolved with the month view data.

Type
promise

(inner) getEventById(eventId) → {promise}

Source:

Get a calendar event by id.

Parameters:
Name Type Description
eventId number

The event id.

Returns:

Resolved with requested calendar event

Type
promise

(inner) submitCreateUpdateForm(formData) → {promise}

Source:

Submit the form data for the event form.

Parameters:
Name Type Description
formData string

The URL encoded values from the form

Returns:

Resolved with the new or edited event

Type
promise