Ummarked Assignments - How to update SQL for new module?

Ummarked Assignments - How to update SQL for new module?

by Mike Walters -
Number of replies: 5

I'm still having trouble getting to grips with SQL!

There is a contributed report for this block that lists all ungraded assignments for a site. It looks like this...

SELECT 
u.firstname AS "First",
u.lastname AS "Last",
c.fullname AS "Course",
a.name AS "Assignment",

FROM_UNIXTIME (asb.timemodified, '%D %M %Y - %h %i') AS "Date Submitted"
 
FROM prefix_assignment_submissions AS asb
JOIN prefix_assignment AS a ON a.id = asb.assignment
JOIN prefix_user AS u ON u.id = asb.userid
JOIN prefix_course AS c ON c.id = a.course
JOIN prefix_course_modules AS cm ON c.id = cm.course
 
WHERE asb.grade < 0 AND cm.instance = a.id
AND cm.module = 1
 
ORDER BY c.fullname, a.name, u.lastname

Problem is, it is reading from the table for the OLD assignment type, not the new one. Does anybody have any ideas how to modify this to pull results from the NEW moodle assignments?

I have already tried changing "prefix_assignment_submissions" to "prefix_assign_submission", but it doen't like that!

Any help greatly appreciated...

Mike

Average of ratings: -
In reply to Mike Walters

Re: Ummarked Assignments - How to update SQL for new module?

by Mike Walters -

It's a shame nobody appears to be able to help with this one as I can't be the only person with a site full of assignment modules that I need to check in a hurry!

Is anyone still monitoring or seriously using this plugin?

Cheers,

Mike

In reply to Mike Walters

Re: Ummarked Assignments - How to update SQL for new module?

by Kimber Warden -

I'm not sure what you mean. This report works on my 2.2 installation.

Even so, it only checks for the Assignment module submissions, not quizzes, lessons, forums, etc.

You should try the AJAX Marking Block. It will change your life. smile

Kimber

In reply to Mike Walters

Re: Ummarked Assignments - How to update SQL for new module?

by Dan Olson -

Mike, I am having exactly the same problem. This report (and others like it) simply don't work if you're using the new assignment module. I am pulling my hair out trying to get it to work and am seriously considering an SQL course just so I can learn how to fix it myself!

BTW, we have tried the Ajax marking block and it is nice... in theory. But we found it ground the home page of our site to a complete halt -- at least for our instructors. So we had to remove it. But we still need a way to find all those ungraded assignments. 

Please let me know if you've had any luck, Mike. I'll keep trying myself. 

In reply to Dan Olson

Re: Ummarked Assignments - How to update SQL for new module?

by Steven Swanson -

There is a block now called "grade me" block that lists all the assignments that need grading. Not only in a course, but the whole site (if you have the privilege). Did anyone ever find the sql table name for the new assignment modules? I also am looking for a simple query that lists all submitted assignments.

In reply to Mike Walters

Re: Ummarked Assignments - How to update SQL for new module?

by Al Brocklehurst -

Any idea how this should be updated for Moodle 2.8.

Searched everywhere!