ScoDoc/app/static/js/validate_previous_ue.js

31 lines
955 B
JavaScript
Raw Permalink Normal View History

2020-09-26 16:19:37 +02:00
// Affiche et met a jour la liste des UE partageant le meme code
2021-06-21 18:46:35 +02:00
$().ready(function () {
2020-09-26 16:19:37 +02:00
update_ue_validations();
update_ue_list();
$("#tf_ue_id").bind("change", update_ue_list);
$("#tf_ue_id").bind("change", update_ue_validations);
});
function update_ue_list() {
var ue_id = $("#tf_ue_id")[0].value;
if (ue_id) {
2021-06-21 18:46:35 +02:00
var query = "ue_sharing_code?ue_id=" + ue_id;
$.get(query, '', function (data) {
$("#ue_list_code").html(data);
});
2020-09-26 16:19:37 +02:00
}
2021-06-21 18:46:35 +02:00
}
2020-09-26 16:19:37 +02:00
function update_ue_validations() {
var etudid = $("#tf_etudid")[0].value;
var ue_id = $("#tf_ue_id")[0].value;
var formsemestre_id = $("#tf_formsemestre_id")[0].value;
if (ue_id) {
2021-06-21 18:46:35 +02:00
var query = SCO_URL + "/Notes/get_etud_ue_cap_html?ue_id=" + ue_id + "&etudid=" + etudid + "&formsemestre_id=" + formsemestre_id;
$.get(query, '', function (data) {
$("#ue_list_etud_validations").html(data);
});
2020-09-26 16:19:37 +02:00
}
}