[AMOS commit] MDL-69225 h5pactivity: Review when and which banners display Committed into Git: 2024-01-11 15:23 UTC

[AMOS commit] MDL-69225 h5pactivity: Review when and which banners display Committed into Git: 2024-01-11 15:23 UTC

by AMOS bot -
Number of replies: 0
Author: Sara Arjona
MDL-69225 h5pactivity: Review when and which banners display
The UX team proposal is to display two different notifications, to avoid confusion:

1. When the user is in preview mode:
Message: 'You are in preview mode.'
Notification Type: Information (blue), with the information permanently visible and not dismissible,
ensuring continuous awareness.

2. When activity tracking is disabled:
Message: 'Attempt tracking is not enabled for this activity. You can enable it in Settings.'
Notification Type: Warning (yellow) with a close icon for dismissal if tracking is intentionally disabled.

These notifications should only be visible to teachers and content creators, not students.
If a teacher also has a student role, this information should not appear when logged in as a student.

That's why the pre-existing is_tracking_enabled() function has been updated to only check if tracking
is on for an activity, without considering user capabilities (that's why the $user parameter has been
removed from this function too). Besides, a new function called can_submit() has been created to find
out if users are allowed to submit an activity.


http://git.moodle.org/gw?p=moodle.git;a=commit;h=734c027367012a6ea50b61c7c89515649ce3a865
http://github.com/moodle/moodle/commit/734c027367012a6ea50b61c7c89515649ce3a865

+ 4.2 en [previewmode,mod_h5pactivity]
+ 4.2 en [trackingdisabled,mod_h5pactivity]
+ 4.2 en [trackingdisabled_enable,mod_h5pactivity]