"Drop the lowest" feature from UMass Amherst

"Drop the lowest" feature from UMass Amherst

by Longfei Yu -
Number of replies: 1

We had several instructors desire this feature many years ago, and I had a local feature implemented for Moodle 3.0 and earlier. We were using Oracle, but I think the feature can be applied to people who use other database

Since we moved to 3.1, I found the Attendance code had the structural overhaul changes, and I couldn't simply apply the previous fix for 3.1. It took me a long time to hack the big SQL statement in attendance/classes/summary.php, line 206:

$sql = " SELECT atl.studentid AS userid, COUNT(DISTINCT ats.id) AS numtakensessions,

                        SUM(stg.grade) AS points, SUM(stm.maxgrade) AS maxpoints

                   FROM {attendance_sessions} ats

.....................................

I think the SQL statement hack for version 3.1 only works for Oracle. If someone is using Oracle and happens to want this feature, I will be happy to share the fix. 

For the documentation about how the "Drop the lowest" works at UMass, here is the link: https://www.umass.edu/it/support/moodle/record-attendance-moodle (go to the bottom of the page).


Average of ratings: -
In reply to Longfei Yu

Re: "Drop the lowest" feature from UMass Amherst

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Thanks, 

maybe one day you could clean that up a bit and submit a pull request (including some behat tests) and get the feature included in the core release so you don't need to continue to make the changes locally.

If you are unable to do this yourself you might consider paying for a Moodle Partner to do the work for you?