Automatic grading

Automatic grading

by Tim Dyer -
Number of replies: 5

Moodle 2.4.4+ (Build: 20130524)

I'm looking for a way to have a student submit an Assignment and it automatically give a grade or credit. Is that possible? Also, in a discussion too?

 

Thanks

Average of ratings: Useful (1)
In reply to Tim Dyer

Re: Automatic grading

by Steve Ambro v3.8 -

Additionally, I would like to see a default grade of "0" and a "Nothing Submitted" comment be place upon the due time/date of an assignment and sent out automatically.  What a waste of time it is for me to have to do all this manually.

Average of ratings: Useful (1)
In reply to Tim Dyer

Re: Automatic grading

by mart van der niet -

Hi Tim,

 

I've been looking into this, and I seem to be near a solution:

  • have a PHP script run as a cronjob say every 15 minutes
  • script looks for submissions that have not a grade
    (I misuse the groupid field in mdl_assign_submission as I do not use groupsubmissions.
    All submissions that not have a value form this field of '99999' are submissions that have not dealt with by my script. At the end of the script I set this field to '99999')
  • For a submission that is new from the last time the script has run (indicated by the groupid field not yet set to '99999'
    • insert a record into mdl_assign_grades with the correct values
    • insert a record into mdl_assign_user_flags with the correct values
    • update mdl_grade_grades with the correct values
    • update the timemodified timestamp in mdl_grade_items

This works, for instance when you want to sent a message/email to your user with feedback.

When however you have in your course an item that is hidden, and will be only revealed after grading, such an item is only show after purging all caches. This is obviously not what you want, so I'd like to invite someone to explain to me how to selectively purge the cache that holds assignment data!

Average of ratings: Useful (1)
In reply to mart van der niet

Re: Automatic grading

by mart van der niet -

Automatic purging of the stored data for assignments is actually quite easy: just use cache/admin with the correct parameters, or make a copy of the file and edit out all unncessary funcionality!

In reply to mart van der niet

Re: Automatic grading

by Tim Dyer -

Thanks for the information. It gives me something to look into.

In reply to Tim Dyer

Re: Automatic grading

by mart van der niet -

Hi TIm,

 

Any progress on your site?

I though I had it fixed, nice batchjob running, automatic grades set, hidden items showing up ager purging the cache, but....

it seems that calling the cache from cron messes things up: all kinds of strange session problems all of a sudden....