Project

General

Profile

Bug #7237

Hidden exercises appear in lessons in session report chart

Added by Yannick Warnier almost 5 years ago. Updated almost 5 years ago.

Status:
Bug resolved
Priority:
Urgent
Assignee:
Category:
Sessions
Target version:
Start date:
21/08/2014
Due date:
% Done:

100%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

To reproduce (quite complex case):
  • 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).

Associated revisions

Revision 0358044b (diff)
Added by Yoselyn Castillo almost 5 years ago

adding option for hidding private exercises course -refs #7237

Revision b8cd7887 (diff)
Added by Julio Montoya almost 5 years ago

Only active exercise see #7237

Revision 74ce6a86 (diff)
Added by Julio Montoya almost 5 years ago

Only active exercise see #7237

History

#1

Updated by Yoselyn Castillo almost 5 years ago

  • % Done changed from 0 to 70
#3

Updated by Yannick Warnier almost 5 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.

#4

Updated by Julio Montoya almost 5 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) {

#5

Updated by Julio Montoya almost 5 years ago

  • Assignee changed from Yoselyn Castillo to Julio Montoya
#7

Updated by Yoselyn Castillo almost 5 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.

#8

Updated by Yannick Warnier almost 5 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

Also available in: Atom PDF