Project

General

Profile

Bug #5567

Number of questions in survey list

Added by Jose Manuel Abuin Mosquera over 8 years ago. Updated about 8 years ago.

Status:
Bug resolved
Priority:
Normal
Assignee:
Yoselyn Castillo
Category:
Survey
Target version:
Start date:
01/10/2012
Due date:
% Done:

100%

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

Description

Hello,

when listing surveys from a course, the number of questions per survey is wrong, it is showing incredible numbers. This is because the sql query at function get_survey_data in file /main/survey/survey.lib.php

The solution here is in the string variable $sql , line ON survey.survey_id = survey_question.survey_id, $table_user user
should be: ON (survey.survey_id = survey_question.survey_id AND survey.c_id=survey_question.c_id), $table_user user

Please correct me if I am wrong, but I think in this way it is working fine :)

Kind regards


Files

survey-list.gif (20.1 KB) survey-list.gif Yoselyn Castillo, 05/10/2012 17:15
survey-questions.gif (25.3 KB) survey-questions.gif Yoselyn Castillo, 05/10/2012 17:15

Associated revisions

Revision c9419f91 (diff)
Added by Jose Manuel Abuin Mosquera over 8 years ago

Possibly fixed survey questions count error - refs #5567

History

#1

Updated by Yannick Warnier over 8 years ago

  • Target version set to 1.9.4
#2

Updated by Yoselyn Castillo over 8 years ago

  • Assignee changed from Jose Manuel Abuin Mosquera to Yoselyn Castillo

Verifying...

#3

Updated by Yoselyn Castillo over 8 years ago

There is still some bug. With some surveys it works fine, but
I have created 1 survey.
It has 3 question(see survey-question.gif)
The list shows 4 questions(See the survey-list.gif in attachment)
verifying...

#4

Updated by Yoselyn Castillo over 8 years ago

  • Status changed from Assigned to Needs testing
  • Assignee deleted (Yoselyn Castillo)

I have made some changes, but i really couldn't detect why sometimes the number of questions wrong. Please if somebody else could test it...

#5

Updated by Yannick Warnier over 8 years ago

Hi Yoselyn,

You didn't send any file with your latest comment...

#6

Updated by Yannick Warnier over 8 years ago

  • Target version changed from 1.9.4 to 1.9.6
  • % Done changed from 60 to 80

I guess you (José) meant line 4376. I have added your patch as it doesn't seem to work in any wrong way, but I haven't been able to reproduce the bug. I'm postponing this to 1.9.6 to get a chance to reproduce it, but I suppose this could already be considered fixed as you provided a patch and I couldn't reproduce the error. The only reason why I'm leaving it open is Yoselyn's report.

#7

Updated by Julio Montoya over 8 years ago

  • Assignee set to Julio Bonifacio Aliaga

Hi Julio, Can you check this one?

#8

Updated by Julio Bonifacio Aliaga over 8 years ago

  • Status changed from Needs testing to Assigned
  • Assignee changed from Julio Bonifacio Aliaga to Julio Montoya

I tried creating several surveys and several questions, and if I show the right amount of questions.
I haven't been able to reproduce the bug

#9

Updated by Yannick Warnier about 8 years ago

  • Status changed from Assigned to Bug resolved
  • Assignee changed from Julio Montoya to Yoselyn Castillo
  • % Done changed from 80 to 100

Closing as for Julio B's comment. Feel free to re-open with a more complete test case.

Also available in: Atom PDF