Moodle

Number of responses in choice wrong

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.7
  • Fix Version/s: 1.9, 2.0
  • Component/s: Choice
  • Labels:
    None
  • Environment:
    Lamp Red hat Enterprise 3, php 4.3.9 mysql 4.1.12 (ISO-8859-1 languages only)
  • Affected Branches:
    MOODLE_17_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE

Description

Using moodle version Moodle 1.7+ (2006101009)

I created a new course. Set it as a Metacourse, added about 50 courses.

As admin user I added a "Choice" activity with just Yes and No options.

From the admin account I logged in as two different students and answered the Choice question for them. logged out of admin

Logged in as a teacher from one of the metacourses to check the reporting for the question. Everything OK. logged out

I realised that some of the courses I had enrolled on this metacourse should not have been so I logged in as admin and removed the metacourses.

When I checked the response for the choice option one of the students has disappeared from the results. I had expected this as I knew that one of the students had been in one of the courses I had removed.

The problem is that the link shows "View 2 responses" despite only showing one. I do need this link to be correct, though on my live server I will make sure that I do not add unnecessary courses in the first place.

Issue Links

Activity

Hide
Dan Marsden added a comment -

thanks for the details - I keep meaning to fix this up, but haven't yet had the chance! - maybe sometime soon!

Dan

Show
Dan Marsden added a comment - thanks for the details - I keep meaning to fix this up, but haven't yet had the chance! - maybe sometime soon! Dan
Hide
John Isner added a comment -

You see this behavior in a much simpler case. Start with an empty Choice. As admin, make a choice. Click the link "View 1 responses" and it takes you to a page with zero responses.

Now log in as student and make a choice. Log back in as admin and click the link "View 2 responses." You will now see a page with only one response (the student's).

The error seems to be that the admin's choice is counted by not shown. It should not be counted.

Show
John Isner added a comment - You see this behavior in a much simpler case. Start with an empty Choice. As admin, make a choice. Click the link "View 1 responses" and it takes you to a page with zero responses. Now log in as student and make a choice. Log back in as admin and click the link "View 2 responses." You will now see a page with only one response (the student's). The error seems to be that the admin's choice is counted by not shown. It should not be counted.
Hide
Dan Marsden added a comment -

patch now in 1.9Stable and HEAD

thanks!

Dan

Show
Dan Marsden added a comment - patch now in 1.9Stable and HEAD thanks! Dan

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: