Strange issue with "Make comment or override grade" option

Strange issue with "Make comment or override grade" option

by Cristina Berisso -
Number of replies: 7

Hello everyone,

There is a strange issue I have encountered when trying to add comments and change grade of some questions on quizzes created in one of my Moodle 1.6 courses.

I have had no problem so far inserting comments for feedback to students in all the homework quizzes for a particular course, but last week I gave a midterm test that consisted of all questions selected at random from a number of questions distributed in categories of my question bank for the course. I did this in an effort to have different questions delivered to each student. The strange thing I found when looking at the submissions and trying to override grades to give partial o total credit and to leave comments to the students, was that the comment and/or new grade would not be written in the submission as it used to happen with the non-random question quizzes. I go in all cases through the process of saving the changes in another window, but the comments or overridden grade will not be shown. Curiously, the final grading for the test which appears at the top of the submission, will be modified according to the "saved" new grading I requested, but no change in the grading of the individual question is shown, and no comment appears.

As you imagine, the students are a little confused about what is going on, why the total grade does not match the point addition shown in the individual questions, and can not received the instructor's comments to guide them with the errors they made. I ended also quite frustrated after spending time writing comments that would never show. Again, this only seems to happen in quizzes that use random questions.

Has anyone experienced this? Is there something I am doing wrong in my ignorance? Any comment or guidance will be greatly appreciated. Thanks in advance.

Cristina

Average of ratings: -
In reply to Cristina Berisso

Re: Strange issue with "Make comment or override grade" option

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
This was a bug, but I thought it was fixed ages ago. Are you really running 1.6, or 1.6.5? Is it possible for you to upgrade?
In reply to Tim Hunt

Re: Strange issue with "Make comment or override grade" option

by Cristina Berisso -

Hello Tim,

I am running Moodle 1.6.3. We have a bunch of modified code for the Moodle site so I doubt they will be willing to upgrade just like that. Do you remember which files needed to be modified and what the changes were? Could you please point me to the right discussion?

Thank you very much!

Cristina

In reply to Cristina Berisso

Re: Strange issue with "Make comment or override grade" option

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I fear that this is all so long ago, that it was before the tracker started recording the change that fixed each bug. I am thinking of bugs like some of the ones in this search result.

(For more recently fixed bugs, this information is recorded. e.g. http://tracker.moodle.org/browse/MDL-11881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel)

If you are really desparate, you could try searching through CVS history, looking at the commit comments. The changes might well be in http://moodle.cvs.sourceforge.net/moodle/moodle/lib/questionlib.php. There aer certainly plenty of occurrences of the word 'manual' there.
In reply to Tim Hunt

Re: Strange issue with "Make comment or override grade" option also in moodle 1.8.3

by Thomas Eibel -
I guess, this is NOT a problem of former versions - I do get the same behaviour in moodle 1.8.3:
I don't get useful results, if I "regrade" answers given on questions that are randomly taken from a pool of questions - the calculated points are not as expected. As soon as I use this, the sum of the points shown for a question are not the same as shown as sum on top of the page.

I overcome this with offline-assignements and extra-points; at least a possible work-around.
best regards, thomas
In reply to Thomas Eibel

Re: Strange issue with "Make comment or override grade" option also in moodle 1.8.3

by Ken Burres -
I have had this issue with random questions in Moodle 1.8.2. Another annoyance is that after using the 'regrade' feature, the overrided grade is not included in the sum of points. After many hours of trying to find a solution, I think I've come up with something.

Problem:
Random questions are assigned their own question number. However, the link provided for making a comment or overriding the grade is based on a different question number (the one the random question is based on). This works well for the 'edit' question link that is provided, for you can edit the actual question. However, this is not good for the leaving of comments and overriding of grades.

Solution:
PREFACE: I have not fully tested this, but have found it to solves my issues well. The following of this procedure is done at your own risk. I recommend backing up entire moodle site (esp databases, and files mentioned below) before attempting.

1. Edit {moodle_dir}/mod/quiz/review.php
Above line 255 ('print_question(....') add the following lines:
// Sets an new option if the question type is random
if(trim($questions[$i]->qtype) == 'random')
$options->randomquestionid = $questions[$i]->id;

This will set a new print option that is equal to the random question's id.

2. Edit {moodle_dir}/question/type/questiontype.php
Find the following code around line 623:
$commentlink = '<div class="commentlink">'.link_to_popup_window ($options->questioncommentlink.'?attempt='.$state->attempt.'&amp;question='.$question->id, 'commentquestion', $strcomment, 450, 650, $strcomment, 'none', true).'</div>';

a. Before the code, insert the following line:
$question_to_comment = (isset($options->randomquestionid)) ? $options->randomquestionid : $question->id;

b. Change the following section of the found code '$question->id' to '$question_to_comment'

This will instruct the function that prints your question to use the random question's id to comment or override a grade, rather than the master question's id.


Save both files and give it a whirl. Please let me know if this helps.
In reply to Ken Burres

Re: Strange issue with "Make comment or override grade" option also in moodle 1.8.3

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That looks like about the right solution, only a better place to do 1. is in the random_qtype->print_question method.

I have filed this as MDL-13110. I have been busy with other things since Christmas, and so am falling behind on bugs reported to the tracker. However, rest assured I will make time to work on them as soon as possible. Hopefully next week.
In reply to Tim Hunt

Re: Strange issue with "Make comment or override grade" option also in moodle 1.8.3

by Ken Burres -
Ah...yes. You are correct. That would be a better place. Thanks for pointing that out.