VATUSA / api

VATUSA's RESTful API for facilities
https://api.vatusa.net
MIT License
3 stars 10 forks source link

[FEAT] Enroll users to ZAE RCEs through API #85

Open adesche opened 2 years ago

adesche commented 2 years ago

Contact Details

atm@clevelandcenter.org

Is your feature request related to a problem? If so, please describe.

Not directly related to the purpose of the request (but for the sake of time), in /academy/identifiers/ route, the documentation describes the return from the request as a list of course IDs. However, under the getIdentifiers() function which the route points to the data returned is the "exam" IDs and not the course IDs. This therefore is providing both incorrect data per the intended use and no data of use for the /academy/enroll/{courseId} route also available in API v2. (e.g. S2 exam ID is 9 whereas the course ID is 11... the exam ID is returned in the identifiers route whereas the course ID should be instead)

What is your new feature idea or request?

I would like the /academy/enroll/{courseId} route to be expanded to the use of the Rating Competency Exams available in ZAE. This would allow for ease-of-access when enrolling students in their necessary competency exam through facility websites (and possibly through the USA frontend) instead of having to utilize the unnecessarily sophisticated Moodle interface.

bnahin commented 2 years ago

Steps to implement:

  1. Add RCE Course IDs to the ENV and exams config.
  2. Publish IDs in the identifiers endpoint. https://github.com/VATUSA/api/blob/e6d24105c82c23ad4eca234c75c093c3cda71adb/app/Http/Controllers/API/v2/AcademyController.php#L54
  3. Update enroll endpoint accordingly to allow RCE IDs. https://github.com/VATUSA/api/blob/e6d24105c82c23ad4eca234c75c093c3cda71adb/app/Http/Controllers/API/v2/AcademyController.php#L103
  4. Update assignment emails accordingly. https://github.com/VATUSA/api/blob/e6d24105c82c23ad4eca234c75c093c3cda71adb/app/Console/Commands/SendAcademyRatingExamEmails.php#L80
  5. Future: Update Discord bot messages accordingly, once that is ever implemented.