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

Fix UX issue with submit capability in kaltura assignment #380

Open
wants to merge 1 commit into
base: MOODLE_311_DEV
Choose a base branch
from

Conversation

estevebadia
Copy link

The mod/kalvidassign:submit capability allows students to submit videos in assignments (kalvidassign module). By default, students have this capability and teachers don't. This permission is enforced in mod/kalvidassign/lti_launch.php. However, the mod/kalvidassign/view.php file renders the submission preview and submit buttons regardless of the user permissions. Thus, a user without the permission (eg. a teacher) sees the submit buttons but when clicking on them the LTI popup window shows an error requiring the permission.

This PR improves the module usability for users without this permission by not showing the submit buttons if they don't have the capabaility that will anyway be enforced later.

Diff note:
The PR is just two lines of code (the if and the closing brace), but all lines within the if block are also affected due to the indent.

History note:
Digging in the source history, the initial code came with a similar (but not equal!) check: it only showed the submit buttons if the user did NOT have the permission mod/gradesubmission. That resulted in a bug for users with both submit and gradesubmission permissions because they could not submit their video. Then in commit cace68e the check was removed in order to fix the bug, but introducing this UX issue. With this PR, the case of students but locally teachers works fine since they see both submit and grade buttons.

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

Successfully merging this pull request may close these issues.

1 participant