Quiz

changing from manual grading to any other

 
 
Picture of Monica Bokos
changing from manual grading to any other
 

Hello,

I am on a Moodle 2.3.1+ and for the Quizzes I had manual grading set by default. I didn't notice it and the teachers started using the quiz.

I changed it afterwards but Moodle doesn't do the math, it doesn't want to retroactively automatically grade the attempts.

Is this normal? Is this a bug? Why do we even have this option knowing that we could at all times manually change an automatic grade?

 

Thanks,

Monica

 

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: changing from manual grading to any other
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

For various reasons, that is the way that the code does work. It may not be the best way that it could work.

If you are prepared to mess around in the database, then you can fix this, but don't do this unless you are confident, and have backed everything up first. The prcedure would be:

  1. UPDATE mdl_question_attempts SET behaviour = 'deferredfeedback' WHERE behaviour = 'manualgraded' AND ... put appropriate conditions here  so you only affect the right quiz attempts ...
  2. Re-grade the quiz through the Moodle UI.
 
Average of ratings:Useful (3)
Picture of Debora Weber-Wulff
Re: changing from manual grading to any other
 

Oh dear. Moodle 2 was showing the "check" button so that the students could check their work, I was trying all sorts of things and the button went away with "manual grading". I do NOT want to hand grade all of these multiple choice questions, that is the point of using Moodle! Even klicking "regrade" does nothing. I really have to mess with the database? That is NOT good.... I don't know what you mean by "appropriate conditions". Can you explain?

 

Thanks!

 
Average of ratings: -
Picture of Marcus Green
Re: changing from manual grading to any other
Group Particularly helpful Moodlers

The conditions would be whatever was necessary to ensure only the right quizzes/results were updated i.e. assuming there is a quiz id field in sometable you might have "tablename.quizid=99". I just made that up I don't know off the top of the head what the table and field names are. .

Yes, you would have to mess with the database. If typing in SQL is a new experience to you and you are not a thrill seeker then you probably don't want to do this.

 
Average of ratings: -
Picture of Debora Weber-Wulff
Re: changing from manual grading to any other
 

We tried all of this:

SELECT * FROM `mdl2_question_attempts` WHERE behaviour = 'manualgraded' AND id =
'13890'

and

SELECT * FROM 'mdl2_question_attempts' WHERE behaviour = 'manualgraded' AND
questionid = '13890'

and 

SELECT * FROM 'mdl2_question_attempts' WHERE behaviour = 'manualgraded' AND
questionusageid = '13890'

All had no results. I had changed the "settings" from manual graded to deferred feedback already, do I need to change it back?

I have to get these exams graded, and since I have the answers shuffled I'll go crazy trying to grade them!

GGreetings,

 
Average of ratings: -
Picture of Debora Weber-Wulff
Re: changing from manual grading to any other
 

(note: 'mdl2_question_attempts' doesn't have a 'quizid' column....)

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: changing from manual grading to any other
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

So, where did the magic number 13890 come from?

The SELECT version of the query needs to be:

SELECT *
FROM mdl2_question_attempts
WHERE questionusageid IN (
    SELECT uniqueid
    FROM mdl2_quiz_attempts
    WHERE quiz = {put quiz id here}
)
AND behaviour = 'manualgraded'

When you are absolutely sure this is showing you the right data (you may wish to double-check by looking at the questionids and the userid, to make sure they are what you expect), then you can run the corresponding update.

UPDATE mdl2_question_attempts
SET behaviour = 'deferredfeedback'
WHERE questionusageid IN (
    SELECT uniqueid
    FROM mdl2_quiz_attempts
    WHERE quiz = {put quiz id here}
)
AND behaviour = 'manualgraded'
 
Average of ratings:Useful (1)
Picture of Wannika Natngam
Re: changing from manual grading to any other
 

Hi Tim,

We have similar issue while a lecturer made his quizzes manually graded and changed to deferred feedback via interface does not fix or grade any attempts for him.

Your SQL to fix the problem using database is very useful. However, you have posted in another forum a while back (forum/discuss.php?d=213853) that there would be two tables involved when changing question behaviour. (mdl_question_attempts & mdl_question_usages)

I checked our database tables and found 'manualgraded' in both tables for the particular quizzes.

So, before I make any changes for my lecturer could you help confirming if I should also update 'mdl_question_usages' or it doesn't matter?

Another questions ... Do I need to add another condition to exclude 'essay' type of question as they can only be manualgraded? If so .. what other type (qtype) can only be manualgraded and needed in the SQL?

Many thanks smile

 

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: changing from manual grading to any other
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

Ideally, you would update question_usages as well, since then the data in the database looks just like it would if the settings had been right form the start. However, it seems that if you don't, the regrade still works, so it is not a big deal.

You should add another condition to the SQL for updating question_attempts. Essay questions should be left on manualgraded (that is the only core question type that needs to be graded manually). Descritiption items (if you have any) should be left using informationitem behaviour, but that is handled by the WHERE behaviour = 'manualgraded' bit of the SQL already.

 
Average of ratings: -
Picture of Joseph Rézeau
Re: changing from manual grading to any other
Group DevelopersGroup TestersGroup Translators

Debora "I am on a Moodle 2.3.1+ and for the Quizzes I had manual grading set by default."

@Tim, I had never noticed that setting.

1.- Questions which can be automatically graded will be.

2.- A teacher can always change those automatic grade if need be.

3.- Those questions that can't be automatically graded (i.e. Essays) will always have to be manually graded.

So what't the real use of that option? other than getting people confused, as was the case with the OP...

Joseph

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: changing from manual grading to any other
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

Well, when I was coding this, the way I phrased the question was "Why should I intentionally prevent something that the code makes possible?" and the answer to that is that I shouldn't.

On Site administration/ ► Plugins/ ► Question behaviours/ ► Manage question behaviours you can control which behaviours are available in the UI. Perhaps the right thing to do is to disable the manual grading behaviour be default?

 
Average of ratings: -
Picture of Joseph Rézeau
Re: changing from manual grading to any other
Group DevelopersGroup TestersGroup Translators

Tim "Why should I intentionally prevent something that the code makes possible?" and the answer to that is that I shouldn't.

Maybe that was not a good question to askwink. And I would certainly agree to make this feature disabled by default.

Joseph

 
Average of ratings: -
Just wondering . . .
Re: changing from manual grading to any other
Group Particularly helpful Moodlers

Tim (etc) I have added a note to the docs here: http://docs.moodle.org/24/en/Quiz_grades_report#Re-grading_attempts

Please check that this is accurate and fits the current facts.  

Really, I'd like an either a change to this behaviour or a warning.

  1. If someone chooses "Manual grading" and includes automatically markable questions in their quiz, for a warning to appear.  "Do you REALLY want to makr these X multichoice questions by hand?"
  2. Or for "regrade to actually re-grade the questions that can be automatically graded.

Meanwhile I'll shut off Manual grading option sitewide as suggested here.  Does anyone know of a hidden downside to this?

-Derek

 
Average of ratings: -
Picture of Jean-Michel Védrine
Re: changing from manual grading to any other
Group DevelopersGroup Particularly helpful Moodlers

Hello Derek,

Isn't there a typo in the doc ?

I think that

"This function does not touch automatically graded questions"

should be

"This function does not touch manually graded questions"

 
Average of ratings: -