Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for fetching more details for Moodle events #49

Open
fabiodrg opened this issue Feb 2, 2019 · 0 comments
Open

Option for fetching more details for Moodle events #49

fabiodrg opened this issue Feb 2, 2019 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@fabiodrg
Copy link
Collaborator

fabiodrg commented Feb 2, 2019

Not every events information is embedded in HTML page, which is unfortunate for us. However, there are some calls that we can make for fetching more details regarding the event. An example is the course name, which in the HTML is an ugly course identifier and academic year, e.g. FEUP-EIC0085_EBE0235-2018/2019-META-2S 🤢. If you use the calls we could fetch the course name, e.g. Laboratório de Bases de Dados e Aplicações Web 😄. Other things like a more detailed description are available in the response.

There are at least two APIs we can use (both using POST methods)

  • https://moodle.up.pt/lib/ajax/service.php?sesskey=?&info=core_calendar_get_calendar_monthly_view
  • https://moodle.up.pt/lib/ajax/service.php?sesskey=?&info=core_calendar_get_calendar_event_by_id

How can we get the session key?

Well, there's a global JavaScript variable, which is an object and has the property sesskey which holds the session key value. It's as simple as this: M.cfg.sesskey

How to use core_calendar_get_calendar_monthly_view ?

Still investigating... 👀

How to use core_calendar_get_calendar_event_by_id ?

Still investigating... 👀

@fabiodrg fabiodrg added the enhancement New feature or request label Feb 2, 2019
@fabiodrg fabiodrg added the help wanted Extra attention is needed label Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant