Moodle

Change cloze problem, lost response

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4
  • Fix Version/s: None
  • Component/s: Questions
  • Labels:
    None
  • Environment:
    Moodle 1.9.4
  • Database:
    PostgreSQL
  • Affected Branches:
    MOODLE_19_STABLE

Description

Hello.

Introduccion:
We have a course with an exam that includes questions Cloze. The exam has attempted of student

Location:
Change the question and save the changes. When I go back to review the responses of students are lost.

Regards

  1. 1.jpg
    91 kB
    07/May/09 12:36 AM
  2. 2.jpg
    55 kB
    07/May/09 12:36 AM
  3. 3.jpg
    92 kB
    07/May/09 12:36 AM

Activity

Hide
Jesús Rincón added a comment -

New data:

If the question is edited and saved without changing the wording of the question has the same problem.

When the question is saved, modified or not, reference to the response mdl_question_answers change

Show
Jesús Rincón added a comment - New data: If the question is edited and saved without changing the wording of the question has the same problem. When the question is saved, modified or not, reference to the response mdl_question_answers change
Hide
Tim Hunt added a comment -

Pierre, are you able to work on this? If not please feel free to assign it back to me.

Show
Tim Hunt added a comment - Pierre, are you able to work on this? If not please feel free to assign it back to me.
Hide
Pierre Pichet added a comment -

Jesus,
could you specify which version of 1.9.4 you have like 1.9.4+ BUILD (20090427).
This info can be accessed at notifications.

Show
Pierre Pichet added a comment - Jesus, could you specify which version of 1.9.4 you have like 1.9.4+ BUILD (20090427). This info can be accessed at notifications.
Hide
Pierre Pichet added a comment -

Could you look if the subquestions id were changed.
These can be found in the mdl_questions where the parent is the main question id.
The main question contain the text and the sub contain the {....} code

Show
Pierre Pichet added a comment - Could you look if the subquestions id were changed. These can be found in the mdl_questions where the parent is the main question id. The main question contain the text and the sub contain the {....} code
Hide
Jesús Rincón added a comment -

The version

Moodle: 1.9.4 (Build: 20090128)

Show
Jesús Rincón added a comment - The version Moodle: 1.9.4 (Build: 20090128)
Hide
Pierre Pichet added a comment -

Cannot reproduce on a MYSQL database 1.9 BUILD (20090427).
There was not so many changes from 20090128.
As you have access to mdl_question_answers data, take a look on mdl_questions if the subquestions id were also changed.
Did you move the questions from one category to a another one after creating them?

Show
Pierre Pichet added a comment - Cannot reproduce on a MYSQL database 1.9 BUILD (20090427). There was not so many changes from 20090128. As you have access to mdl_question_answers data, take a look on mdl_questions if the subquestions id were also changed. Did you move the questions from one category to a another one after creating them?
Hide
Jesús Rincón added a comment -

To trace the problem in the tables:

mdl_quiz -> are the questions -> does not change
mdl_question -> multianswers type -> no change
mdl_question_multianswer -> sequence of option -> Change, new sequence
mdl_question -> text of Cloze response (Sequence) -> Changes, delete the previous references and creating new reference.
mdl_question_answers -> answer -> Change, delete the previous references and creating new reference

-----------------------
Student response
mdl_question_states -> answers answered by students -> no change id kept the old Tabal mdl_question_answers

Show
Jesús Rincón added a comment - To trace the problem in the tables: mdl_quiz -> are the questions -> does not change mdl_question -> multianswers type -> no change mdl_question_multianswer -> sequence of option -> Change, new sequence mdl_question -> text of Cloze response (Sequence) -> Changes, delete the previous references and creating new reference. mdl_question_answers -> answer -> Change, delete the previous references and creating new reference ----------------------- Student response mdl_question_states -> answers answered by students -> no change id kept the old Tabal mdl_question_answers
Hide
Jesús Rincón added a comment -

In version 1.9.4 + is not the problem.

Your comment that there are not many changes, know what?

Show
Jesús Rincón added a comment - In version 1.9.4 + is not the problem. Your comment that there are not many changes, know what?
Hide
Pierre Pichet added a comment -

mdl_question_multianswer -> sequence of option -> Change, new sequence
This is what I suspect, new subquestions are generated, the old ones are not reused.
this is probaly related to the code around line 80
// First we get all the existing wrapped questions
if (!$oldwrappedids = get_field('question_multianswer', 'sequence', 'question', $question->id)) { $oldwrappedquestions = array(); } else { $oldwrappedquestions = get_records_list('question', 'id', $oldwrappedids, 'id ASC'); }
$sequence = array();
foreach($question->options->questions as $wrapped) {
if (!empty($wrapped)){
// if we still have some old wrapped question ids, reuse the next of them

if (is_array($oldwrappedquestions) && $oldwrappedquestion = array_shift($oldwrappedquestions)) {
$wrapped->id = $oldwrappedquestion->id;
so the best thing is to migrate to a new 1.9 version as this problem is solved in later versions.
You can test on my installation at
http://132.208.141.198/moodle_19/mod
log as user:moodle pw:moodle
If you look at the mdl_question table,
locate the main question which as an id given by the or preview edit link like
http://132.208.141.198/moodle_19/question/question.php?id=1484
then locat the subquestions which are questions with the parent set to the main question id (here 1484)
they should be in succession and should not change if you just edit the cloze question the way you do it.
They could change if you add or displace the subuestions order.

Show
Pierre Pichet added a comment - mdl_question_multianswer -> sequence of option -> Change, new sequence This is what I suspect, new subquestions are generated, the old ones are not reused. this is probaly related to the code around line 80 // First we get all the existing wrapped questions if (!$oldwrappedids = get_field('question_multianswer', 'sequence', 'question', $question->id)) { $oldwrappedquestions = array(); } else { $oldwrappedquestions = get_records_list('question', 'id', $oldwrappedids, 'id ASC'); } $sequence = array(); foreach($question->options->questions as $wrapped) { if (!empty($wrapped)){ // if we still have some old wrapped question ids, reuse the next of them if (is_array($oldwrappedquestions) && $oldwrappedquestion = array_shift($oldwrappedquestions)) { $wrapped->id = $oldwrappedquestion->id; so the best thing is to migrate to a new 1.9 version as this problem is solved in later versions. You can test on my installation at http://132.208.141.198/moodle_19/mod log as user:moodle pw:moodle If you look at the mdl_question table, locate the main question which as an id given by the or preview edit link like http://132.208.141.198/moodle_19/question/question.php?id=1484 then locat the subquestions which are questions with the parent set to the main question id (here 1484) they should be in succession and should not change if you just edit the cloze question the way you do it. They could change if you add or displace the subuestions order.
Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Michael de Raadt added a comment -

I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Show
Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: