Skip to content

Conversation

@disururathnayake
Copy link

@disururathnayake disururathnayake commented Sep 13, 2025

Description

This feature will allow staff to enable the "Tutorial self enrolment" feature for a designated task. Staff will select which tutorial stream(s) to fetch the tutorials from, and students will be prompted with the list of tutorials they must choose from to complete the task.

To test this feature setup this PR as the backend -thoth-tech/doubtfire-api#64

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

  1. Login as aadmin
  2. Select any unit and any task to edit
  3. Scroll to the "Tutorial enrolment form" and enable it
image
  1. Select a tutorial stream that has a atleast a few tutorials
  2. If there are no tutorial streams to choose from or the stream has no tutorials, manually add them in the in the tutorials tab.
  3. Save the changes to the task after enabling the self enrolment form.
  4. Now login as student_1, and navigate to the same unit and task you enabled the form for.
  5. Click on "Begin enrolment", and confirm the list of tutorials show up. Do note that some tutorials may not show up for a student based on their campus. Eg. if a student is based on campus X, but the tutorial is only available for campus Y, the student will not see it.
image
  1. Select a tutorial and click enrol.
image
  1. If it says you have already been enrolled, you can navigate to the Tutorial List and withdraw yourself from the unit, then go back to the task to begin tutorial enrolment, and select a tutorial

Testing Checklist:

  • Tested in latest Chrome
  • Tested in latest Safari
  • Tested in latest Firefox

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have requested a review from @macite and @jakerenzella on the Pull Request

@disururathnayake disururathnayake marked this pull request as ready for review September 13, 2025 12:39
Copy link

@Triet-coder Triet-coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2025-09-21 145544 Screenshot 2025-09-21 145636 Looks good! Tutorial self-enrolment flow works smoothy — I enabled it as admin, picked a stream, then as student saw the correct tutorial list (campus filtering behaved). No regressions in task editor or modal; buttons/disable states are solid. Tiny nit: maybe add a debounce on options load + a test for “no tutorials available”.

Copy link

@ibi420 ibi420 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,

After reviewing this, I can confirm your code is well-written. The UI components align with OnTrack’s design guidelines and maintain consistency with its color scheme. The feature also functions as expected. Good work on this.

Copy link

@WaelAlahamdi WaelAlahamdi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @disururathnayake, I have reviewed the PR and everything works as expected. The implementation is clear and consistent, approved.
Thank you for the work.

Copy link

@Pasindufdo98 Pasindufdo98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@disururathnayake
I tested this with the linked API backend and the tutorial self-enrolment flow worked as expected. The enrolment form displayed correctly, and I was able to complete the workflow without errors. Everything looks good - approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants