Skip to content

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