From 8ec39d9f0bb8a0d2fd6c62604888d51e154a8ec0 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 15 Oct 2026 17:25:34 +0200 Subject: moodle: add method to download an activity's grading history --- src/moodle-prod.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/moodle-prod.ts') diff --git a/src/moodle-prod.ts b/src/moodle-prod.ts index 39bb190..4052064 100644 --- a/src/moodle-prod.ts +++ b/src/moodle-prod.ts @@ -23,6 +23,12 @@ export class Activity { body: formData, }); } + + async downloadGradingHistory(format = "json") { + const url = `/grade/report/history/index.php?sesskey=${getSesskey()}&download=${format}&id=${this.id}&showreport=1&itemid=0&grader=0&datefrom=0&datetill=0&userids=`; + const editRes = await fetch(url); + return await editRes.text(); + } } export class Course { -- cgit v1.2.3