Skip to content

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

Closed
juancp-contidosdixitais wants to merge 1 commit intochamilo:1.11.xfrom
contidos-dixitais:1.11.x_contidos-dixitais_exercises-no-show-course-exercise-hidden
Closed

Exercise list actions: Restrict Actions for Hidden Exercises in Base Course#5557
juancp-contidosdixitais wants to merge 1 commit intochamilo:1.11.xfrom
contidos-dixitais:1.11.x_contidos-dixitais_exercises-no-show-course-exercise-hidden

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

ywarnier added a commit to ywarnier/chamilo-lms that referenced this pull request Feb 20, 2026
ywarnier added a commit to ywarnier/chamilo-lms that referenced this pull request Feb 22, 2026
@ywarnier
Copy link
Member

The PR has been updated and merged into 751175a

@ywarnier ywarnier closed this Feb 22, 2026
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