Bug #7237
Hidden exercises appear in lessons in session report chart
100%
Description
- create a student
- create a course
- create a session and include the course and the student in it
- go to the session+course and create 3 quizzes with one question each and a publication date (and a publication end date)
- now create a learning path with a publication date (and end date)
- include one of the quizzes in the learning path
Observation: here the quiz that you include in the learning path should be automatically "hidden" in the quizzes list (in exercise tool). This is OK.
Now connect as the student. You should see the session name and the course name in your courses list.- click the session's name
- click the "My stats" tab inside this screen
- you see a chart of all the exercises
- you also see the hidden exercise (the one included in the learning path)
- this is wrong (because as an exercise included in a learning path, the results should not show at the same place)
So, the issue here is to make a change in the code that shows the graphic on that session "My stats" tab to hide all the elements of c_quiz that are included in a learning path ("c_lp.c_id = c_quiz.c_id and c_lp_item.type = 'quiz' and c_lp_item.path = c_quiz.id" or something like that).
History
Updated by Yoselyn Castillo over 6 years ago
- % Done changed from 0 to 70
changes were sent to https://github.com/chamilo/chamilo-lms/pull/341
Updated by Yoselyn Castillo over 6 years ago
The pull was replaced by https://github.com/chamilo/chamilo-lms/pull/346
Updated by Yannick Warnier over 6 years ago
- Priority changed from Normal to Urgent
Yoselyn, estás segura que este cambio no afecta a lo demás en Chamilo (otras listas de ejercicios)? He hecho merge de tu PR un poco rápido, y ahora estoy preocupado de que esto influencie todo lo demás (en particular las listas en los ejercicios, etc).
Podrías por favor añadir un parámetro $includeNonActive = true, a la función get_all_exercises(), que solo active tu condición adicional cuando está en false, y hacer los cambios respectivos solo para esta llamada?
Tienes que ser muy cuidadosa con este tipo de cambios a funciones genéricas.
Updated by Julio Montoya over 6 years ago
La definicion de la funcion "get_all_exercises" ya tiene un filtro de "active" no es necesario agregarle otro mas.
function get_all_exercises($course_info = null, $session_id = 0, $check_publication_dates = false, $search_exercise = '', $search_all_sessions = false, $active = 2) {
Updated by Julio Montoya over 6 years ago
- Assignee changed from Yoselyn Castillo to Julio Montoya
Updated by Julio Montoya over 6 years ago
- Status changed from Assigned to Needs testing
- Assignee changed from Julio Montoya to Yoselyn Castillo
Updated by Yoselyn Castillo over 6 years ago
- Assignee changed from Yoselyn Castillo to Yannick Warnier
After changes applied, i don't see the hidden exercises in report chart. It works ok for me.
Yannick I leave you to close the task because you may want verify something else.
Updated by Yannick Warnier over 6 years ago
- Status changed from Needs testing to Bug resolved
- Assignee changed from Yannick Warnier to Julio Montoya
- % Done changed from 70 to 100
Reviewed, approved and closed
adding option for hidding private exercises course -refs #7237