mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 15:18:32 -06:00
updates to rubric totals
This commit is contained in:
@@ -57,7 +57,7 @@ export default function EditAssignment({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const delay = 500;
|
const delay = 500;
|
||||||
|
|
||||||
const handler = setTimeout(async () => {
|
const handler = setTimeout(() => {
|
||||||
try {
|
try {
|
||||||
if (assignmentIsFetching || updateAssignment.isPending) {
|
if (assignmentIsFetching || updateAssignment.isPending) {
|
||||||
console.log("network requests in progress, not updating assignments");
|
console.log("network requests in progress, not updating assignments");
|
||||||
@@ -72,28 +72,30 @@ export default function EditAssignment({
|
|||||||
) {
|
) {
|
||||||
if (clientIsAuthoritative) {
|
if (clientIsAuthoritative) {
|
||||||
console.log("updating assignment, client is authoritative");
|
console.log("updating assignment, client is authoritative");
|
||||||
await updateAssignment.mutateAsync({
|
updateAssignment
|
||||||
assignment: updatedAssignment,
|
.mutateAsync({
|
||||||
moduleName,
|
assignment: updatedAssignment,
|
||||||
assignmentName: updatedAssignment.name,
|
moduleName,
|
||||||
previousModuleName: moduleName,
|
assignmentName: updatedAssignment.name,
|
||||||
previousAssignmentName: assignmentName,
|
previousModuleName: moduleName,
|
||||||
courseName,
|
previousAssignmentName: assignmentName,
|
||||||
});
|
courseName,
|
||||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
})
|
||||||
|
.then(async () => {
|
||||||
|
// await new Promise(resolve => setTimeout(resolve, 1000));
|
||||||
|
|
||||||
const newUpdatedAssignment: LocalAssignment =
|
if (updatedAssignment.name !== assignmentName)
|
||||||
localAssignmentMarkdown.parseMarkdown(text);
|
router.replace(
|
||||||
if (newUpdatedAssignment.name !== assignmentName)
|
getModuleItemUrl(
|
||||||
router.replace(
|
courseName,
|
||||||
getModuleItemUrl(
|
moduleName,
|
||||||
courseName,
|
"assignment",
|
||||||
moduleName,
|
updatedAssignment.name
|
||||||
"assignment",
|
), {
|
||||||
newUpdatedAssignment.name
|
|
||||||
),
|
}
|
||||||
{}
|
);
|
||||||
);
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
console.log(
|
||||||
"client not authoritative, updating client with server assignment",
|
"client not authoritative, updating client with server assignment",
|
||||||
|
|||||||
Reference in New Issue
Block a user