MDL-67160 mod_forum: Show the users grading status in the grader

This commit is contained in:
Mathew May
2019-11-19 10:17:00 +13:00
parent d547735f2f
commit 6ebf994c23
4 changed files with 14 additions and 6 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -3
View File
@@ -115,6 +115,7 @@ const getUpdateUserContentFunction = (root, getContentForUser, getGradeForUser,
if (spinner) {
spinner.resolve();
}
return userGrade;
};
};
@@ -393,9 +394,10 @@ export const launch = async(getListOfUsers, getContentForUser, getGradeForUser,
// Fetch the userpicker for display.
const userPicker = await getUserPicker(
userList,
user => {
async(user) => {
const userGrade = await updateUserContent(user);
const renderContext = {
status: null,
status: userGrade.hasgrade,
index: userIds.indexOf(user.id) + 1,
total: userList.length
};
@@ -403,7 +405,6 @@ export const launch = async(getListOfUsers, getContentForUser, getGradeForUser,
statusContainer.innerHTML = html;
return html;
}).catch();
updateUserContent(user);
},
saveGradeFunction,
{
@@ -33,5 +33,12 @@
"total": 10
}
}}
{{#status}}<h2 class="font-weight-bold h5 mb-0">{{.}}</h2>{{/status}}
<h2 class="font-weight-bold h5 mb-0">
{{#status}}
{{#str}}graded, forum{{/str}}
{{/status}}
{{^status}}
{{#str}}notgraded, forum{{/str}}
{{/status}}
</h2>
<div>{{#str}} indexoutoftotal, mod_forum, {"index": "{{index}}", "total":"{{total}}"}{{/str}}</div>