forked from ScoDoc/ScoDoc
Update opolka/ScoDoc from ScoDoc/ScoDoc #2
@ -811,11 +811,8 @@ function numberTimeToDate(nb) {
|
||||
* @param {boolean} clear vidage de l'objet "assiduites" ou non
|
||||
* @returns {object} l'objets Assiduités {<etudid:str> : [<assiduite>,]}
|
||||
*/
|
||||
function getAssiduitesFromEtuds(clear, has_formsemestre = true, deb, fin) {
|
||||
function getAssiduitesFromEtuds(clear, deb, fin) {
|
||||
const etudIds = Object.keys(etuds).join(",");
|
||||
const formsemestre_id = has_formsemestre
|
||||
? `formsemestre_id=${getFormSemestreId()}&`
|
||||
: "";
|
||||
|
||||
const date_debut = deb ? deb : toIsoString(getPrevDate());
|
||||
const date_fin = fin ? fin : toIsoString(getNextDate());
|
||||
@ -826,7 +823,7 @@ function getAssiduitesFromEtuds(clear, has_formsemestre = true, deb, fin) {
|
||||
|
||||
const url_api =
|
||||
getUrl() +
|
||||
`/api/assiduites/group/query?date_debut=${date_debut}&${formsemestre_id}&date_fin=${date_fin}&etudids=${etudIds}`;
|
||||
`/api/assiduites/group/query?date_debut=${date_debut}&date_fin=${date_fin}&etudids=${etudIds}`;
|
||||
sync_get(url_api, (data, status) => {
|
||||
if (status === "success") {
|
||||
const dataKeys = Object.keys(data);
|
||||
@ -1057,16 +1054,13 @@ function getAssiduiteValue(field) {
|
||||
* Mise à jour des assiduités d'un étudiant
|
||||
* @param {String | Number} etudid identifiant de l'étudiant
|
||||
*/
|
||||
function actualizeEtudAssiduite(etudid, has_formsemestre = true) {
|
||||
const formsemestre_id = has_formsemestre
|
||||
? `formsemestre_id=${getFormSemestreId()}&`
|
||||
: "";
|
||||
function actualizeEtudAssiduite(etudid) {
|
||||
const date_debut = toIsoString(getPrevDate());
|
||||
const date_fin = toIsoString(getNextDate());
|
||||
|
||||
const url_api =
|
||||
getUrl() +
|
||||
`/api/assiduites/${etudid}/query?${formsemestre_id}date_debut=${date_debut}&date_fin=${date_fin}`;
|
||||
`/api/assiduites/${etudid}/query?date_debut=${date_debut}&date_fin=${date_fin}`;
|
||||
sync_get(url_api, (data, status) => {
|
||||
if (status === "success") {
|
||||
assiduites[etudid] = data;
|
||||
@ -1331,7 +1325,7 @@ function insertEtudRow(etud, index, output = false) {
|
||||
* @param {String | Number} etudid l'identifiant de l'étudiant
|
||||
*/
|
||||
function actualizeEtud(etudid) {
|
||||
actualizeEtudAssiduite(etudid, !isSingleEtud());
|
||||
actualizeEtudAssiduite(etudid);
|
||||
//Actualize row
|
||||
const etudHolder = document.querySelector(".etud_holder");
|
||||
const ancient_row = document.getElementById(`etud_row_${etudid}`);
|
||||
|
@ -533,7 +533,7 @@
|
||||
}
|
||||
|
||||
if (get) {
|
||||
getAssiduitesFromEtuds(false, false, d_debut.format(), d_fin.format())
|
||||
getAssiduitesFromEtuds(false, d_debut.format(), d_fin.format())
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user