aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2026-10-15 17:25:34 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2026-10-15 17:28:15 +0200
commit8ec39d9f0bb8a0d2fd6c62604888d51e154a8ec0 (patch)
treeef4eb68adc3dfc8c3a353f14d2ca7badbaae7a32 /src
parente7eba29effcfd051a9501c94cc712afb68f7387d (diff)
downloadbycs-sol-8ec39d9f0bb8a0d2fd6c62604888d51e154a8ec0.tar.gz
bycs-sol-8ec39d9f0bb8a0d2fd6c62604888d51e154a8ec0.zip
moodle: add method to download an activity's grading history
Diffstat (limited to 'src')
-rw-r--r--src/moodle-prod.ts6
1 files changed, 6 insertions, 0 deletions
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 {