Which Moodle assignments are due soon, and who hasn't submitted?

Moodle shows submissions one assignment at a time. Our free report_deadlines plugin lists every assignment due in the next weeks with how many students have not submitted yet.

Drawing of a short stack of paper sheets beside an hourglass, one sheet painted blue.

Short answer: Moodle tells you who has submitted one assignment at a time. To chase missing work across a course before it is late, a teacher opens every assignment in turn. Our free report, report_deadlines, puts it on one page: every assignment due in the next 7, 14, 30 or 60 days, how many students have submitted, how many have not, and a link to grading.

This is the third plugin in our series: one plugin for each Moodle plugin type, each one teaching DevLMS Studio, our AI plugin builder, how that type works.

What the report shows

Open a course, then More > Reports > Upcoming deadlines.

ColumnWhat it counts
AssignmentVisible assignments with a due date in the chosen window, soonest first
StudentsActive enrolled users who can submit to that assignment
SubmittedTheir latest attempt has the status “submitted”
Not submittedThe rest, drafts included

Teachers, editing teachers and managers can see it (capability report/deadlines:view). Group (team) assignments count a student as submitted when their group has submitted. Version 0.1 covers assignments only, does not apply per-student extensions, and counts all groups together, so in a course with separate groups a teacher sees totals for the whole course. It supports Moodle 4.5 LTS to 5.3 and is GPL. The code is on GitHub.

How a Moodle report plugin works

From Moodle 5.3’s own reports, such as the activity completion report:

  1. lib.php has one function, report_NAME_extend_navigation_course(). It adds a link to the course Reports menu when the user has the report’s capability. Site-wide reports use settings.php and an admin_externalpage under Reports instead.
  2. index.php is a plain page: log in to the course, check the capability, set the page layout to report, print the table.
  3. db/access.php defines the view capability. Reports that show learners’ data are marked RISK_PERSONAL.
  4. Counting “students” correctly is the subtle part. We use get_enrolled_sql() with the assignment’s own submit capability and active enrolments only, so suspended learners and teachers do not inflate the numbers.

We tested the counts with PHPUnit (submitted, draft, nothing; due soon, later, past, no date, hidden) and ran a Behat test that opens the report from the course menu.

What Studio learned

The report guide is now in DevLMS Studio’s builder: how to hook into the Reports menu, the capability and risk flag, the enrolled-users query, and the separate groups trap.

Want a report for your own courses, like quiz attempts this week or learners who have never logged in? Describe it in DevLMS Studio and watch it built and tested in a real Moodle.

Need a Moodle plugin built or rescued?

Tell the scoping assistant what you need. You get a fixed price and a timeline in a few minutes, and an engineer reviews it within one business day.

Get a fixed quote