This repository has been archived by the owner on Jun 30, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚒️make assignment status more intuitive and user friendly
* Do not mix progress and grading columns and terms * Change some headings and titles * Make it clear that it is the student’s responsibility to track status
- Loading branch information
Showing
5 changed files
with
136 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,44 @@ | ||
function markComplete(assignment_id, student_id) { | ||
// This function is deprecated as of December 2022 | ||
jQuery.ajax({ | ||
url: eBookConfig.app + '/assignments/update_submit', | ||
type: "POST", | ||
dataType: "JSON", | ||
data: { | ||
assignment_id: assignment_id, | ||
student_id:student_id | ||
student_id: student_id | ||
}, | ||
success: function (retdata) { | ||
success: function(retdata) { | ||
window.location.reload(true); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
|
||
|
||
async function updateAssignmentProgress (newState, assignmentId) { | ||
|
||
let data = { | ||
assignment_id: assignmentId, | ||
new_state: newState, | ||
}; | ||
let jsheaders = new Headers({ | ||
"Content-type": "application/json; charset=utf-8", | ||
Accept: "application/json", | ||
}); | ||
let request = new Request(`${eBookConfig.app}/assignments/update_submit`, { | ||
method: "POST", | ||
headers: jsheaders, | ||
body: JSON.stringify(data), | ||
}); | ||
let resp = await fetch(request); | ||
if (!resp.ok) { | ||
alert(`Status Not Updated ${resp.statusText}`); | ||
} else { | ||
if (location.href.indexOf("doAssignment") > -1) { | ||
window.location.reload(true); | ||
} | ||
} | ||
|
||
console.log(newState); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters