Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
2 changed files with 21 additions and 2 deletions
Showing only changes of commit 35646a934b - Show all commits

View File

@ -1758,7 +1758,7 @@ function getCurrentAssiduite(etudid) {
const assiduite_id = parseInt(field.getAttribute("assiduite_id"));
const type = field.getAttribute("type");
if (type == "edition") {
if (type == "édition") {
let assi = null;
assiduites[etudid].forEach((a) => {
if (a.assiduite_id === assiduite_id) {

View File

@ -98,7 +98,26 @@
}
function updateSelectedSelect(moduleimpl_id) {
document.getElementById('moduleimpl_select').value = moduleimpl_id;
const mod_id = moduleimpl_id != null ? moduleimpl_id : ""
document.getElementById('moduleimpl_select').value = mod_id;
}
window.onload = () => {
document.getElementById('moduleimpl_select').addEventListener('change', () => {
const mod_id = document.getElementById('moduleimpl_select').value;
const assi = getCurrentAssiduite(etudid);
if (assi) {
editAssiduite(assi.assiduite_id, assi.etat);
}
})
const conflicts = getAssiduitesConflict(etudid);
if (conflicts.length > 0) {
updateSelectedSelect(conflicts[0].moduleimpl_id);
}
}