Saltar al contenido principal

Function: exportGrades()

function exportGrades(
context,
siteUrl,
courseId,
options
): Promise<DownloadedFile>;

Defined in: areas/grades/export.ts:45

Saves a course's grades into destDir as Moodle exports them for a teacher: a spreadsheet (xlsx, ods), comma-separated text (csv) or XML, with the items, group, display and feedback chosen as in the export form. Returns the file as downloadFile does (never overwriting one). Throws GradebookError when the site has that format's export plugin disabled (naming the ones it has), when an item isn't in the course, or when Moodle refuses the export.

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
courseIdnumber
optionsExportGradesOptions

Returns​

Promise<DownloadedFile>