支持导出详细教学班名单和 Moodle CSV
This commit is contained in:
1 parent
821bfb083a
commit
5d5781e707
6 files changed
+122
-6
No files matched your search
@@ -35,6 +35,11 @@ export async function downloadApiFile(
|
||||
const response = await http.get(path, {
|
||||
...config,
|
||||
responseType: 'blob',
|
||||
}).catch(async (error) => {
|
||||
if (error.response?.data instanceof Blob && error.response.data.type.includes('json')) {
|
||||
try { error.response.data = JSON.parse(await error.response.data.text()) } catch { /* Keep the original response. */ }
|
||||
}
|
||||
throw error
|
||||
})
|
||||
const url = URL.createObjectURL(response.data)
|
||||
const anchor = document.createElement('a')
|
||||
|
||||
@@ -855,6 +855,15 @@ export default {
|
||||
rosterTitle: "{course} class roster",
|
||||
rosterCount: "{count} students / capacity {capacity}",
|
||||
export: "Export Excel",
|
||||
exportDetailed: "Export detailed Excel",
|
||||
exportMoodle: "Export Moodle CSV",
|
||||
moodleCourseShortName: "Moodle course short name",
|
||||
moodleCourseRequired: "Enter the short name of an existing Moodle course.",
|
||||
moodleGroupName: "Group name (leave empty for no group)",
|
||||
moodleIncludeTeachers: "Include instructors",
|
||||
moodleTeacherRole: "Teacher role short name",
|
||||
moodleExportHint: "Usernames are lowercase student and teacher numbers. Choose update existing users only when uploading. The course must exist and permit manual enrolment. Check the course and role short names in Moodle.",
|
||||
cancel: "Cancel",
|
||||
exportFilename: "class-roster-{number}.xlsx",
|
||||
studentNumber: "Student number",
|
||||
name: "Name",
|
||||
|
||||
@@ -792,6 +792,15 @@ export default {
|
||||
rosterTitle: "{course}教学班名单",
|
||||
rosterCount: "共 {count} 人 / 容量 {capacity} 人",
|
||||
export: "导出 Excel",
|
||||
exportDetailed: "导出详细 Excel",
|
||||
exportMoodle: "导出 Moodle CSV",
|
||||
moodleCourseShortName: "Moodle 课程简称",
|
||||
moodleCourseRequired: "请输入 Moodle 中已存在课程的简称。",
|
||||
moodleGroupName: "分组名称(留空则不分组)",
|
||||
moodleIncludeTeachers: "同时导出授课教师",
|
||||
moodleTeacherRole: "教师角色短名称",
|
||||
moodleExportHint: "按学号和工号小写匹配 Moodle 用户。上传用户时请选择仅更新现有用户;课程须已存在并启用手动选课。请确认课程简称和角色与 Moodle 设置一致。",
|
||||
cancel: "取消",
|
||||
exportFilename: "教学班名单-{number}.xlsx",
|
||||
studentNumber: "学号",
|
||||
name: "姓名",
|
||||
|
||||
Loaded 3 of 6 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user