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

Exercise list actions: Restrict Actions for Hidden Exercises in Base Course #5557

Open
wants to merge 1 commit into
base: 1.11.x
Choose a base branch
from

Conversation

juancp-contidosdixitais

When an exercise is deactivated in the base course (indicated by a closed eye icon), Chamilo does not allow its visibility to be changed from a session. Despite this, the system allows clicking on the icon, and although it does not modify the state of the exercise, it gives the impression that it does, even displaying a success message after the action.

image

This pull request ensures that if an exercise is hidden in the base course, its icon is not clickable. Additionally, for bulk actions, it checks if there are hidden exercises in the base course and, if so, indicates that the status of these cannot be changed.

image

@ywarnier
Copy link
Member

ywarnier commented Oct 18, 2024

The message in the screenshot does not match your code (the message does not "include" the exercise title as in your screenshot).
Also... it does not seem to work to show the message because your change alters the "visible" action. In the exercises list, the "eye" icon sends the "choice=disable" param instead of setting the "action=visible" param.

This PR seems incomplete in that respect. I have added the CannotChangeVisibilityOfBaseCourseResourceX to the language files here https://github.com/chamilo/chamilo-lms/compare/1.11.x...ywarnier:chamilo-lms:5557?expand=1. Should be used as Display::return_message(sprintf(get_lang('CannotChangeVisibilityOfBaseCourseResourceX'), $objExerciseTmp->name)

@ywarnier
Copy link
Member

@juancp-contidosdixitais ping

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.

3 participants