Affichage des notes par module + affichage des notes par UE
This commit is contained in:
parent
6b0867b933
commit
a77aaa78d0
2
API.js
2
API.js
|
@ -51,7 +51,7 @@ APIClass.prototype = {
|
||||||
if( ptrAPI.xhr[i].readyState == 4 ){ // si la requête est terminée
|
if( ptrAPI.xhr[i].readyState == 4 ){ // si la requête est terminée
|
||||||
|
|
||||||
/* DEBUG : affiche la réponse BRUTE de API.php */
|
/* DEBUG : affiche la réponse BRUTE de API.php */
|
||||||
// console.log('API.php => '+ptrAPI.xhr[i].responseText);
|
console.log('API.php => '+ptrAPI.xhr[i].responseText);
|
||||||
console.log(JSON.parse(ptrAPI.xhr[i].responseText) );
|
console.log(JSON.parse(ptrAPI.xhr[i].responseText) );
|
||||||
|
|
||||||
/* si success de requête */
|
/* si success de requête */
|
||||||
|
|
10
API.php
10
API.php
|
@ -46,10 +46,12 @@ require_once __ROOT__.'/manager/security.php';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
/********************/
|
/********************************/
|
||||||
/* CALCUL DES NOTES */
|
/* DOSSIER ETUDIANT (NOTES,...) */
|
||||||
/********************/
|
/********************************/
|
||||||
case 'MCC':
|
case 'career':
|
||||||
|
if( isset($request->level_1) ){ require_once __ROOT__.'/manager/career.php'; career_switch_level_1($request, $answer); }
|
||||||
|
else { $answer->request = 'missing_level_1'; }
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
|
15
css/menu.css
15
css/menu.css
|
@ -126,10 +126,9 @@
|
||||||
/* gestion des différentes icônes */
|
/* gestion des différentes icônes */
|
||||||
#MENU span:nth-child(2){ background-image: url(../src/menu/menu_icon/home.svg); }
|
#MENU span:nth-child(2){ background-image: url(../src/menu/menu_icon/home.svg); }
|
||||||
#MENU span:nth-child(3){ background-image: url(../src/menu/menu_icon/groups.svg); }
|
#MENU span:nth-child(3){ background-image: url(../src/menu/menu_icon/groups.svg); }
|
||||||
#MENU span:nth-child(4){ background-image: url(../src/menu/menu_icon/ue.svg); }
|
#MENU span:nth-child(4){ background-image: url(../src/menu/menu_icon/modules.svg); }
|
||||||
#MENU span:nth-child(5){ background-image: url(../src/menu/menu_icon/modules.svg); }
|
#MENU span:nth-child(5){ background-image: url(../src/menu/menu_icon/career.svg); }
|
||||||
#MENU span:nth-child(6){ background-image: url(../src/menu/menu_icon/marks.svg); }
|
#MENU span:nth-child(6){ background-image: url(../src/menu/menu_icon/settings.svg); }
|
||||||
#MENU span:nth-child(7){ background-image: url(../src/menu/menu_icon/settings.svg); }
|
|
||||||
|
|
||||||
|
|
||||||
/* gestion de l'activation des différentes icônes */
|
/* gestion de l'activation des différentes icônes */
|
||||||
|
@ -138,13 +137,11 @@
|
||||||
#MENU span:nth-child(3):hover,
|
#MENU span:nth-child(3):hover,
|
||||||
#MENU span:nth-child(3).active{ background-image: url(../src/menu/menu_icon/groups@hover.svg); }
|
#MENU span:nth-child(3).active{ background-image: url(../src/menu/menu_icon/groups@hover.svg); }
|
||||||
#MENU span:nth-child(4):hover,
|
#MENU span:nth-child(4):hover,
|
||||||
#MENU span:nth-child(4).active{ background-image: url(../src/menu/menu_icon/ue@hover.svg); }
|
#MENU span:nth-child(4).active{ background-image: url(../src/menu/menu_icon/modules@hover.svg); }
|
||||||
#MENU span:nth-child(5):hover,
|
#MENU span:nth-child(5):hover,
|
||||||
#MENU span:nth-child(5).active{ background-image: url(../src/menu/menu_icon/modules@hover.svg); }
|
#MENU span:nth-child(5).active{ background-image: url(../src/menu/menu_icon/career@hover.svg); }
|
||||||
#MENU span:nth-child(6):hover,
|
#MENU span:nth-child(6):hover,
|
||||||
#MENU span:nth-child(6).active{ background-image: url(../src/menu/menu_icon/marks@hover.svg); }
|
#MENU span:nth-child(6).active{ background-image: url(../src/menu/menu_icon/settings@hover.svg); }
|
||||||
#MENU span:nth-child(7):hover,
|
|
||||||
#MENU span:nth-child(7).active{ background-image: url(../src/menu/menu_icon/settings@hover.svg); }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -51,9 +51,8 @@ $notifNotifNum = 5;
|
||||||
<span data-link='home' >Accueil </span>
|
<span data-link='home' >Accueil </span>
|
||||||
<?php if( $_SESSION['identifiant'] != null ){ ?>
|
<?php if( $_SESSION['identifiant'] != null ){ ?>
|
||||||
<span data-link='groups' >Composition</span>
|
<span data-link='groups' >Composition</span>
|
||||||
<span data-link='ue' >Suivi </span>
|
|
||||||
<span data-link='modules' >Modules </span>
|
<span data-link='modules' >Modules </span>
|
||||||
<span data-link='marks' >Notes </span>
|
<span data-link='career' >Parcours </span>
|
||||||
<span data-link='settings'>Paramètres </span>
|
<span data-link='settings'>Paramètres </span>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -61,7 +61,7 @@ var connected = !( DOM.AUTH.children[0].innerHTML == 'Connexion' );
|
||||||
pageM = new pageManager(); // instance principale
|
pageM = new pageManager(); // instance principale
|
||||||
|
|
||||||
/* initialisation du gestionnaire */
|
/* initialisation du gestionnaire */
|
||||||
pageM.setPage(null, 'page', DOM.CONTAINER, ['home', 'groups', 'ue', 'modules', 'marks', 'auth', 'settings'] );
|
pageM.setPage(null, 'page', DOM.CONTAINER, ['home', 'groups', 'modules', 'career', 'settings'] );
|
||||||
|
|
||||||
|
|
||||||
/* [b] API.js
|
/* [b] API.js
|
||||||
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
<?php
|
||||||
|
require_once __ROOT__.'/manager/security.php';
|
||||||
|
require_once __ROOT__.'/manager/database.php';
|
||||||
|
|
||||||
|
/***********************************************************
|
||||||
|
* *
|
||||||
|
* MANAGER DES MODULES *
|
||||||
|
* *
|
||||||
|
************************************************************
|
||||||
|
* *
|
||||||
|
* [0] Constantes *
|
||||||
|
* [1] ROUTAGE de niveau 1 *
|
||||||
|
* *
|
||||||
|
* *
|
||||||
|
* *
|
||||||
|
* *
|
||||||
|
* *
|
||||||
|
* *
|
||||||
|
* *
|
||||||
|
* *
|
||||||
|
* *
|
||||||
|
* *
|
||||||
|
***********************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* [1] ROUTAGE DE NIVEAU 1
|
||||||
|
============================================================*/
|
||||||
|
function career_switch_level_1($request, $answer){
|
||||||
|
|
||||||
|
switch( $request->level_1 ){
|
||||||
|
|
||||||
|
/*******************************/
|
||||||
|
/* liste des notes par modules */
|
||||||
|
/*******************************/
|
||||||
|
case 'getNotesByModules':
|
||||||
|
$areSetParam = isset($request->etudiant) && isset($request->semestre) && isset($request->annee); // les arguments existent
|
||||||
|
$typeOkParam = $areSetParam && is_string($request->etudiant) && is_string($request->semestre) && is_string($request->annee); // si c'est des strings
|
||||||
|
$nEmptyParam = $typeOkParam && strlen($request->etudiant) > 0 && is_numeric($request->semestre) && is_numeric($request->annee); // des bon types
|
||||||
|
$etudiantCheck = $nEmptyParam && preg_match('/^[\w -]{6,100}$/i', $request->etudiant); // nom bon format
|
||||||
|
$semestreCheck = $etudiantCheck && preg_match('/^[1-4]{1}$/i', $request->semestre); // semestre (semestre) bon format
|
||||||
|
$anneeCheck = $semestreCheck && preg_match('/^[0-9]{4}$/i', $request->annee); // semestre (annee) bon format
|
||||||
|
|
||||||
|
if( $anneeCheck ){ // si tout les paramètres sont bons
|
||||||
|
$notes = DataBase::getInstance()->getNotesByModules($request->etudiant, $request->semestre, $request->annee);
|
||||||
|
|
||||||
|
if( is_array($notes) ){ // si on a bien un tableau
|
||||||
|
$answer->notes = $notes; // on renvoie dans answer->note
|
||||||
|
$answer->request = 'success'; // et on renvoie success
|
||||||
|
}else // sinon si c'est pas un tableau
|
||||||
|
$answer->request = $notes; // on retourne l'erreur
|
||||||
|
}else
|
||||||
|
$answer->request = 'param_error';
|
||||||
|
break;
|
||||||
|
|
||||||
|
/***************************/
|
||||||
|
/* liste des notes par UEs */
|
||||||
|
/***************************/
|
||||||
|
case 'getNotesByUEs':
|
||||||
|
$areSetParam = isset($request->etudiant) && isset($request->semestre) && isset($request->annee); // les arguments existent
|
||||||
|
$typeOkParam = $areSetParam && is_string($request->etudiant) && is_string($request->semestre) && is_string($request->annee); // si c'est des strings
|
||||||
|
$nEmptyParam = $typeOkParam && strlen($request->etudiant) > 0 && is_numeric($request->semestre) && is_numeric($request->annee); // des bon types
|
||||||
|
$etudiantCheck = $nEmptyParam && preg_match('/^[\w -]{6,100}$/i', $request->etudiant); // nom bon format
|
||||||
|
$semestreCheck = $etudiantCheck && preg_match('/^[1-4]{1}$/i', $request->semestre); // semestre (semestre) bon format
|
||||||
|
$anneeCheck = $semestreCheck && preg_match('/^[0-9]{4}$/i', $request->annee); // semestre (annee) bon format
|
||||||
|
|
||||||
|
if( $anneeCheck ){ // si tout les paramètres sont bons
|
||||||
|
$notes = DataBase::getInstance()->getNotesByUEs($request->etudiant, $request->semestre, $request->annee);
|
||||||
|
|
||||||
|
if( is_array($notes) ){ // si on a bien un tableau
|
||||||
|
$answer->notes = $notes; // on renvoie dans answer->note
|
||||||
|
$answer->request = 'success'; // et on renvoie success
|
||||||
|
}else // sinon si c'est pas un tableau
|
||||||
|
$answer->request = $notes; // on retourne l'erreur
|
||||||
|
}else
|
||||||
|
$answer->request = 'param_error';
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/***********/
|
||||||
|
/* DEFAULT */
|
||||||
|
/***********/
|
||||||
|
default:
|
||||||
|
$answer->request = 'unknown_level_1';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
|
@ -24,7 +24,7 @@ class DataBase{
|
||||||
|
|
||||||
/* retourne une instance de la classe */
|
/* retourne une instance de la classe */
|
||||||
public static function getInstance(){
|
public static function getInstance(){
|
||||||
return new DataBase("localhost", "sid2", "php", "Qt358nUdyeTxLDM8");
|
return new DataBase("localhost", "sid", "php", "Qt358nUdyeTxLDM8");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************/
|
/*********************************************/
|
||||||
|
@ -350,7 +350,7 @@ class DataBase{
|
||||||
return 'unknown_group';
|
return 'unknown_group';
|
||||||
|
|
||||||
// si on a l'UID utilisateur & l'UID groupe => on récupère les modules
|
// si on a l'UID utilisateur & l'UID groupe => on récupère les modules
|
||||||
$getModuleList = $this->pdo->prepare("SELECT DISTINCT m.nom, m.libelle ".
|
$getModuleList = $this->pdo->prepare("SELECT DISTINCT m.id_module as id, m.nom as nom, m.libelle as libelle ".
|
||||||
"FROM module as m, groupe as g, semestre as s, programme as prog, ue, appartenance as app ".
|
"FROM module as m, groupe as g, semestre as s, programme as prog, ue, appartenance as app ".
|
||||||
"WHERE app.id_semestre = prog.id_semestre ".
|
"WHERE app.id_semestre = prog.id_semestre ".
|
||||||
"AND app.id_semestre = s.id_semestre ".
|
"AND app.id_semestre = s.id_semestre ".
|
||||||
|
@ -381,6 +381,377 @@ class DataBase{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************/
|
||||||
|
/*** retourne les UEs d'un étudiant ***/
|
||||||
|
/**************************************/
|
||||||
|
public function getUEsEtudiant($etudiant, $semestre, $annee){
|
||||||
|
/*** on cherche un semestre avec ce rang et cette année (qui est unique) ***/
|
||||||
|
$getSemestreUID = $this->pdo->prepare("SELECT id_semestre as id FROM semestre WHERE rang = :rang AND annee = :annee");
|
||||||
|
$getSemestreUID->execute(array(
|
||||||
|
':rang' => $semestre,
|
||||||
|
':annee' => $annee
|
||||||
|
));
|
||||||
|
|
||||||
|
// si on trouve, on le définit, sinon on retourne "unknown_group"
|
||||||
|
if( $semestreUID = $getSemestreUID->fetch()['id'] )
|
||||||
|
$semestreUID = (int) $semestreUID;
|
||||||
|
else
|
||||||
|
return 'unknown_semestre';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*** on cherche un utilisateur avec cet identifiant ***/
|
||||||
|
$getEtudiantUID = $this->pdo->prepare("SELECT identifiant as id FROM utilisateur WHERE identifiant = :etudiant");
|
||||||
|
$getEtudiantUID->execute(array(
|
||||||
|
':etudiant' => $etudiant
|
||||||
|
));
|
||||||
|
|
||||||
|
// si on trouve, on le définit, sinon on retourne "unknown_user"
|
||||||
|
if( $etudiantUID = $getEtudiantUID->fetch()['id'] )
|
||||||
|
$etudiantUID = $etudiantUID;
|
||||||
|
else
|
||||||
|
return 'unknown_user';
|
||||||
|
|
||||||
|
/*** on cherche le groupe de cet utilisateur ***/
|
||||||
|
$getGroupeUID = $this->pdo->prepare("SELECT g.id_groupe as id ".
|
||||||
|
"FROM utilisateur as u, groupe as g, appartenance as app, semestre as s ".
|
||||||
|
"WHERE app.id_etudiant = u.identifiant ".
|
||||||
|
"AND app.id_groupe = g.id_groupe ".
|
||||||
|
"AND app.id_semestre = s.id_semestre ".
|
||||||
|
|
||||||
|
"AND u.identifiant = :etudiantUID ".
|
||||||
|
"AND app.id_semestre = :semestreUID");
|
||||||
|
$getGroupeUID->execute(array(
|
||||||
|
':etudiantUID' => $etudiantUID,
|
||||||
|
':semestreUID' => $semestreUID,
|
||||||
|
));
|
||||||
|
|
||||||
|
// si on trouve, on le définit, sinon on retourne "unknown_user"
|
||||||
|
if( $groupeUID = $getGroupeUID->fetch()['id'] )
|
||||||
|
$groupeUID = $groupeUID;
|
||||||
|
else
|
||||||
|
return 'unknown_group';
|
||||||
|
|
||||||
|
// si on a l'UID utilisateur & l'UID groupe => on récupère les modules
|
||||||
|
$getUEList = $this->pdo->prepare("SELECT DISTINCT ue.id_ue as id, s.annee as annee, ue.nom as nom, ue.libelle as libelle ".
|
||||||
|
"FROM module as m, groupe as g, semestre as s, programme as prog, ue, appartenance as app ".
|
||||||
|
"WHERE app.id_semestre = prog.id_semestre ".
|
||||||
|
"AND app.id_semestre = s.id_semestre ".
|
||||||
|
"AND app.id_groupe = g.id_groupe ".
|
||||||
|
"AND prog.id_ue = ue.id_ue ".
|
||||||
|
"AND prog.id_module = m.id_module ".
|
||||||
|
|
||||||
|
"AND g.id_groupe = :groupeUID ".
|
||||||
|
"AND app.id_semestre = :semestreUID ".
|
||||||
|
"ORDER BY m.nom, m.libelle ASC");
|
||||||
|
$getUEList->execute(array(
|
||||||
|
':groupeUID' => $groupeUID,
|
||||||
|
':semestreUID' => $semestreUID
|
||||||
|
));
|
||||||
|
|
||||||
|
$UElist = $getUEList->fetchAll(); // on récupère la liste des modules
|
||||||
|
|
||||||
|
// on supprime les doublons des entrées (indice numérique)
|
||||||
|
for( $i = 0 ; $i < count($UElist) ; $i++ ) // pour tout les modules
|
||||||
|
foreach($UElist[$i] as $col => $val) // pour toutes les entrées
|
||||||
|
if( is_int($col) ) // si l'indice est un entier
|
||||||
|
unset( $UElist[$i][$col] ); // on le supprime
|
||||||
|
|
||||||
|
return $UElist;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************/
|
||||||
|
/*** retourne les notes par modules ***/
|
||||||
|
/**************************************/
|
||||||
|
public function getNotesByModules($etudiant, $semestre, $annee){
|
||||||
|
/*** on cherche un semestre avec ce rang et cette année (qui est unique) ***/
|
||||||
|
$getSemestreUID = $this->pdo->prepare("SELECT id_semestre as id FROM semestre WHERE rang = :rang AND annee = :annee");
|
||||||
|
$getSemestreUID->execute(array(
|
||||||
|
':rang' => $semestre,
|
||||||
|
':annee' => $annee
|
||||||
|
));
|
||||||
|
|
||||||
|
// si on trouve, on le définit, sinon on retourne "unknown_group"
|
||||||
|
if( $semestreUID = $getSemestreUID->fetch()['id'] )
|
||||||
|
$semestreUID = (int) $semestreUID;
|
||||||
|
else
|
||||||
|
return 'unknown_semestre';
|
||||||
|
|
||||||
|
|
||||||
|
/*** on cherche un utilisateur avec cet identifiant ***/
|
||||||
|
$getEtudiantUID = $this->pdo->prepare("SELECT u.identifiant as id FROM utilisateur as u, appartenance as app ".
|
||||||
|
"WHERE u.identifiant = app.id_etudiant ".
|
||||||
|
"AND u.identifiant = :etudiant ".
|
||||||
|
"AND app.id_semestre = :semestreUID");
|
||||||
|
$getEtudiantUID->execute(array(
|
||||||
|
':etudiant' => $etudiant,
|
||||||
|
':semestreUID' => $semestreUID
|
||||||
|
));
|
||||||
|
|
||||||
|
// si on trouve, on le définit, sinon on retourne "unknown_user"
|
||||||
|
if( $etudiantUID = $getEtudiantUID->fetch()['id'] )
|
||||||
|
$etudiantUID = $etudiantUID;
|
||||||
|
else
|
||||||
|
return 'unknown_user';
|
||||||
|
|
||||||
|
|
||||||
|
$notelist = array(); // tableau qui contiendra tout les modules
|
||||||
|
|
||||||
|
$modulelist = $this->getModulesEtudiant($etudiant, $semestre, $annee); // on récupère la liste des modules
|
||||||
|
|
||||||
|
foreach($modulelist as $module){ // pour chaque module
|
||||||
|
|
||||||
|
$notes = $this->getModuleNotes($etudiant, $module['nom'], $semestre, $annee); // on récupère les notes
|
||||||
|
|
||||||
|
$current = array(); // on créé l'entrée qui sera dans le tableau de retour
|
||||||
|
$current['module'] = array();
|
||||||
|
$current['module']['nom'] = $module['nom']; // contenant le nom du module
|
||||||
|
$current['module']['libelle'] = $module['libelle']; // contenant le nom du module
|
||||||
|
$current['notes'] = $notes; // et la liste de notes
|
||||||
|
|
||||||
|
array_push($notelist, $current); // on l'ajoute au résultat
|
||||||
|
}
|
||||||
|
|
||||||
|
return $notelist;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************/
|
||||||
|
/*** retourne les notes par UE ***/
|
||||||
|
/*********************************/
|
||||||
|
public function getNotesByUEs($etudiant, $semestre, $annee){
|
||||||
|
/*** on cherche un semestre avec ce rang et cette année (qui est unique) ***/
|
||||||
|
$getSemestreUID = $this->pdo->prepare("SELECT id_semestre as id FROM semestre WHERE rang = :rang AND annee = :annee");
|
||||||
|
$getSemestreUID->execute(array(
|
||||||
|
':rang' => $semestre,
|
||||||
|
':annee' => $annee
|
||||||
|
));
|
||||||
|
|
||||||
|
// si on trouve, on le définit, sinon on retourne "unknown_group"
|
||||||
|
if( $semestreUID = $getSemestreUID->fetch()['id'] )
|
||||||
|
$semestreUID = (int) $semestreUID;
|
||||||
|
else
|
||||||
|
return 'unknown_semestre';
|
||||||
|
|
||||||
|
|
||||||
|
/*** on cherche un utilisateur avec cet identifiant ***/
|
||||||
|
$getEtudiantUID = $this->pdo->prepare("SELECT u.identifiant as id FROM utilisateur as u, appartenance as app ".
|
||||||
|
"WHERE u.identifiant = app.id_etudiant ".
|
||||||
|
"AND u.identifiant = :etudiant ".
|
||||||
|
"AND app.id_semestre = :semestreUID");
|
||||||
|
$getEtudiantUID->execute(array(
|
||||||
|
':etudiant' => $etudiant,
|
||||||
|
':semestreUID' => $semestreUID
|
||||||
|
));
|
||||||
|
|
||||||
|
// si on trouve, on le définit, sinon on retourne "unknown_user"
|
||||||
|
if( $etudiantUID = $getEtudiantUID->fetch()['id'] )
|
||||||
|
$etudiantUID = $etudiantUID;
|
||||||
|
else
|
||||||
|
return 'unknown_user';
|
||||||
|
|
||||||
|
|
||||||
|
$notelist = array(); // tableau qui contiendra tout les modules
|
||||||
|
|
||||||
|
$UElist = $this->getUEsEtudiant($etudiant, $semestre, $annee); // on récupère la liste des modules
|
||||||
|
|
||||||
|
foreach($UElist as $UE){ // pour chaque module
|
||||||
|
|
||||||
|
$notes = $this->getUENotes($etudiant, $UE['nom'], $semestre, $annee); // on récupère les notes
|
||||||
|
|
||||||
|
$current = array(); // on créé l'entrée qui sera dans le tableau de retour
|
||||||
|
$current['UE'] = array();
|
||||||
|
$current['UE']['annee'] = $UE['annee']; // contenant l'annee du UE
|
||||||
|
$current['UE']['nom'] = $UE['nom']; // contenant le nom du UE
|
||||||
|
$current['UE']['libelle'] = $UE['libelle']; // contenant le libelle du UE
|
||||||
|
$current['notes'] = $notes; // et la liste de notes
|
||||||
|
|
||||||
|
array_push($notelist, $current); // on l'ajoute au résultat
|
||||||
|
}
|
||||||
|
|
||||||
|
return $notelist;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************/
|
||||||
|
/*** retourne les notes d'un module ***/
|
||||||
|
/**************************************/
|
||||||
|
public function getModuleNotes($etudiant, $module, $semestre, $annee){
|
||||||
|
/*** on cherche un semestre avec ce rang et cette année (qui est unique) ***/
|
||||||
|
$getSemestreUID = $this->pdo->prepare("SELECT id_semestre as id FROM semestre WHERE rang = :rang AND annee = :annee");
|
||||||
|
$getSemestreUID->execute(array(
|
||||||
|
':rang' => $semestre,
|
||||||
|
':annee' => $annee
|
||||||
|
));
|
||||||
|
|
||||||
|
// si on trouve, on le définit, sinon on retourne "unknown_group"
|
||||||
|
if( $semestreUID = $getSemestreUID->fetch()['id'] )
|
||||||
|
$semestreUID = (int) $semestreUID;
|
||||||
|
else
|
||||||
|
return 'unknown_semestre';
|
||||||
|
|
||||||
|
|
||||||
|
/*** on cherche un utilisateur avec cet identifiant ***/
|
||||||
|
$getEtudiantUID = $this->pdo->prepare("SELECT identifiant as id FROM utilisateur as u, appartenance as app ".
|
||||||
|
"WHERE u.identifiant = app.id_etudiant ".
|
||||||
|
"AND u.identifiant = :etudiant ".
|
||||||
|
"AND app.id_semestre = :semestreUID");
|
||||||
|
$getEtudiantUID->execute(array(
|
||||||
|
':etudiant' => $etudiant,
|
||||||
|
':semestreUID' => $semestreUID
|
||||||
|
));
|
||||||
|
|
||||||
|
// si on trouve, on le définit, sinon on retourne "unknown_user"
|
||||||
|
if( $etudiantUID = $getEtudiantUID->fetch()['id'] )
|
||||||
|
$etudiantUID = $etudiantUID;
|
||||||
|
else
|
||||||
|
return 'unknown_user';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*** on cherche un module avec ce nom, en accord avec le semestre et l'étudiant ***/
|
||||||
|
$getModuleUID = $this->pdo->prepare("SELECT m.id_module as id FROM module as m, appartenance as app, programme as prog ".
|
||||||
|
"WHERE prog.id_module = m.id_module ".
|
||||||
|
"AND prog.id_semestre = app.id_semestre ".
|
||||||
|
"AND m.nom = :module ".
|
||||||
|
"AND app.id_etudiant = :etudiantUID ".
|
||||||
|
"AND app.id_semestre = :semestreUID");
|
||||||
|
$getModuleUID->execute(array(
|
||||||
|
':module' => $module,
|
||||||
|
':etudiantUID' => $etudiantUID,
|
||||||
|
':semestreUID' => $semestreUID
|
||||||
|
));
|
||||||
|
|
||||||
|
// si on trouve, on le définit, sinon on retourne "unknown_group"
|
||||||
|
if( $moduleUID = $getModuleUID->fetch()['id'] )
|
||||||
|
$moduleUID = (int) $moduleUID;
|
||||||
|
else
|
||||||
|
return 'unknown_module';
|
||||||
|
|
||||||
|
// si on a l'UID utilisateur & l'UID groupe => on récupère les modules
|
||||||
|
$getModuleList = $this->pdo->prepare("SELECT note.intitule, note.valeur, note.base ".
|
||||||
|
"FROM note, appartenance as app, programme as prog, semestre as s, module as m ".
|
||||||
|
"WHERE note.id_appartenance = app.id_appartenance ".
|
||||||
|
"AND note.id_programme = prog.id_programme ".
|
||||||
|
"AND prog.id_module = m.id_module ".
|
||||||
|
"AND prog.id_semestre = s.id_semestre ".
|
||||||
|
|
||||||
|
"AND prog.id_module = :moduleUID ".
|
||||||
|
"AND app.id_etudiant = :etudiantUID ".
|
||||||
|
"AND s.id_semestre = :semestreUID ".
|
||||||
|
"ORDER BY note.valeur, note.base ASC");
|
||||||
|
$getModuleList->execute(array(
|
||||||
|
':moduleUID' => $moduleUID,
|
||||||
|
':etudiantUID' => $etudiantUID,
|
||||||
|
':semestreUID' => $semestreUID
|
||||||
|
));
|
||||||
|
|
||||||
|
$notes = $getModuleList->fetchAll(); // on récupère la liste des notes
|
||||||
|
|
||||||
|
// on supprime les doublons des entrées (indice numérique)
|
||||||
|
for( $i = 0 ; $i < count($notes) ; $i++ ) // pour toutes les notes
|
||||||
|
foreach($notes[$i] as $col => $val) // pour toutes les entrées
|
||||||
|
if( is_int($col) ) // si l'indice est un entier
|
||||||
|
unset( $notes[$i][$col] ); // on le supprime
|
||||||
|
|
||||||
|
return $notes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************/
|
||||||
|
/*** retourne les notes d'un UE ***/
|
||||||
|
/**********************************/
|
||||||
|
public function getUENotes($etudiant, $UE, $semestre, $annee){
|
||||||
|
/*** on cherche un semestre avec ce rang et cette année (qui est unique) ***/
|
||||||
|
$getSemestreUID = $this->pdo->prepare("SELECT id_semestre as id FROM semestre WHERE rang = :rang AND annee = :annee");
|
||||||
|
$getSemestreUID->execute(array(
|
||||||
|
':rang' => $semestre,
|
||||||
|
':annee' => $annee
|
||||||
|
));
|
||||||
|
|
||||||
|
// si on trouve, on le définit, sinon on retourne "unknown_group"
|
||||||
|
if( $semestreUID = $getSemestreUID->fetch()['id'] )
|
||||||
|
$semestreUID = (int) $semestreUID;
|
||||||
|
else
|
||||||
|
return 'unknown_semestre';
|
||||||
|
|
||||||
|
|
||||||
|
/*** on cherche un utilisateur avec cet identifiant ***/
|
||||||
|
$getEtudiantUID = $this->pdo->prepare("SELECT identifiant as id FROM utilisateur as u, appartenance as app ".
|
||||||
|
"WHERE u.identifiant = app.id_etudiant ".
|
||||||
|
"AND u.identifiant = :etudiant ".
|
||||||
|
"AND app.id_semestre = :semestreUID");
|
||||||
|
$getEtudiantUID->execute(array(
|
||||||
|
':etudiant' => $etudiant,
|
||||||
|
':semestreUID' => $semestreUID
|
||||||
|
));
|
||||||
|
|
||||||
|
// si on trouve, on le définit, sinon on retourne "unknown_user"
|
||||||
|
if( $etudiantUID = $getEtudiantUID->fetch()['id'] )
|
||||||
|
$etudiantUID = $etudiantUID;
|
||||||
|
else
|
||||||
|
return 'unknown_user';
|
||||||
|
|
||||||
|
|
||||||
|
/*** on cherche un module avec ce nom, en accord avec le semestre et l'étudiant ***/
|
||||||
|
$getUEUID = $this->pdo->prepare("SELECT ue.id_ue as id ".
|
||||||
|
"FROM module as m, appartenance as app, programme as prog, ue ".
|
||||||
|
"WHERE prog.id_module = m.id_module ".
|
||||||
|
"AND prog.id_semestre = app.id_semestre ".
|
||||||
|
"AND prog.id_ue = ue.id_ue ".
|
||||||
|
|
||||||
|
"AND ue.nom = :UE ".
|
||||||
|
"AND app.id_etudiant = :etudiantUID ".
|
||||||
|
"AND app.id_semestre = :semestreUID");
|
||||||
|
$getUEUID->execute(array(
|
||||||
|
':UE' => $UE,
|
||||||
|
':etudiantUID' => $etudiantUID,
|
||||||
|
':semestreUID' => $semestreUID
|
||||||
|
));
|
||||||
|
|
||||||
|
// si on trouve, on le définit, sinon on retourne "unknown_group"
|
||||||
|
if( $UEUID = $getUEUID->fetch()['id'] )
|
||||||
|
$UEUID = (int) $UEUID;
|
||||||
|
else
|
||||||
|
return 'unknown_UE';
|
||||||
|
|
||||||
|
|
||||||
|
// si on a l'UID utilisateur & l'UID UE => on récupère les notes
|
||||||
|
$getUEList = $this->pdo->prepare("SELECT note.intitule, note.valeur, note.base ".
|
||||||
|
"FROM note, appartenance as app, programme as prog, semestre as s, module as m ".
|
||||||
|
"WHERE note.id_appartenance = app.id_appartenance ".
|
||||||
|
"AND note.id_programme = prog.id_programme ".
|
||||||
|
"AND prog.id_module = m.id_module ".
|
||||||
|
"AND prog.id_semestre = s.id_semestre ".
|
||||||
|
|
||||||
|
"AND prog.id_ue = :UEUID ".
|
||||||
|
"AND app.id_etudiant = :etudiantUID ".
|
||||||
|
"AND s.id_semestre = :semestreUID ".
|
||||||
|
"ORDER BY note.valeur, note.base ASC");
|
||||||
|
$getUEList->execute(array(
|
||||||
|
':UEUID' => $UEUID,
|
||||||
|
':etudiantUID' => $etudiantUID,
|
||||||
|
':semestreUID' => $semestreUID
|
||||||
|
));
|
||||||
|
|
||||||
|
$notes = $getUEList->fetchAll(); // on récupère la liste des notes
|
||||||
|
|
||||||
|
// on supprime les doublons des entrées (indice numérique)
|
||||||
|
for( $i = 0 ; $i < count($notes) ; $i++ ) // pour toutes les notes
|
||||||
|
foreach($notes[$i] as $col => $val) // pour toutes les entrées
|
||||||
|
if( is_int($col) ) // si l'indice est un entier
|
||||||
|
unset( $notes[$i][$col] ); // on le supprime
|
||||||
|
|
||||||
|
return $notes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -161,6 +161,11 @@ require_once __ROOT__.'/manager/database.php';
|
||||||
// on définit les variables session
|
// on définit les variables session
|
||||||
$_SESSION['identifiant'] = $username;
|
$_SESSION['identifiant'] = $username;
|
||||||
$_SESSION['droits'] = $userList->{$username}->permissions;
|
$_SESSION['droits'] = $userList->{$username}->permissions;
|
||||||
|
|
||||||
|
/******************************* TEMPO *********************************/
|
||||||
|
$_SESSION['annee'] = '2015';
|
||||||
|
$_SESSION['semestre'] = '2';
|
||||||
|
/***********************************************************************/
|
||||||
return 'success';
|
return 'success';
|
||||||
}else
|
}else
|
||||||
return 'wrong_password';
|
return 'wrong_password';
|
||||||
|
|
120
page/career.php
120
page/career.php
|
@ -1 +1,119 @@
|
||||||
career.php
|
<?php define('__ROOT__', dirname(dirname(__FILE__)) );
|
||||||
|
require_once __ROOT__.'/manager/security.php';
|
||||||
|
require_once __ROOT__.'/manager/groups.php';
|
||||||
|
require_once __ROOT__.'/manager/modules.php';
|
||||||
|
require_once __ROOT__.'/manager/career.php';
|
||||||
|
|
||||||
|
/****************************************
|
||||||
|
* *
|
||||||
|
* SECTION "PARCOURS" *
|
||||||
|
* *
|
||||||
|
*****************************************
|
||||||
|
*
|
||||||
|
* [1] Mes modules (eleves) notes
|
||||||
|
* [2] Mes ue (eleves) notes
|
||||||
|
* [3] Mes semestres (eleves) notes
|
||||||
|
* [4] Graphiques (eleves) notes
|
||||||
|
*
|
||||||
|
*****************************************/
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- mes modules -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
/**************************************/
|
||||||
|
/*** MES MODULES (version étudiant) ***/
|
||||||
|
/**************************************/
|
||||||
|
if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'student' ){ // si l'utilisateur est connecté et que c'est un élève
|
||||||
|
|
||||||
|
$request = new stdClass(); $answer = new stdClass();
|
||||||
|
|
||||||
|
$request->level_1 = 'getNotesByModules';
|
||||||
|
$request->etudiant = $_SESSION['identifiant'];
|
||||||
|
$request->semestre = $_SESSION['semestre'];
|
||||||
|
$request->annee = $_SESSION['annee'];
|
||||||
|
|
||||||
|
career_switch_level_1($request, $answer);
|
||||||
|
|
||||||
|
if( $answer->request == 'success' ){ // si on a bien récupéré les modules/notes
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
echo "<section name='marksbymodules' title='Mes modules' class='basic'>";
|
||||||
|
|
||||||
|
foreach($answer->notes as $module){
|
||||||
|
|
||||||
|
echo "<table class='basic'>";
|
||||||
|
echo "<thead class='active'>";
|
||||||
|
echo '<tr>';
|
||||||
|
echo '<th colspan=5>'.$module['module']['nom'].' - '.$module['module']['libelle'].'</th>';
|
||||||
|
echo '</tr>';
|
||||||
|
|
||||||
|
echo '</thead>';
|
||||||
|
echo '<tbody>';
|
||||||
|
foreach($module['notes'] as $note){
|
||||||
|
echo '<tr>';
|
||||||
|
echo '<td>'.$note['intitule'].'</td>';
|
||||||
|
echo '<td>'.$note['valeur'].'/'.$note['base'].'</td>';
|
||||||
|
echo '</tr>';
|
||||||
|
}
|
||||||
|
echo '</tbody>';
|
||||||
|
echo '</table>';
|
||||||
|
}
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
echo '</section>';
|
||||||
|
}else
|
||||||
|
echo "Erreur interne.";
|
||||||
|
|
||||||
|
} ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- mes UEs -->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
/**************************************/
|
||||||
|
/*** MES UEs (version étudiant) ***/
|
||||||
|
/**************************************/
|
||||||
|
if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'student' ){ // si l'utilisateur est connecté et que c'est un élève
|
||||||
|
|
||||||
|
$request = new stdClass(); $answer = new stdClass();
|
||||||
|
debug();
|
||||||
|
|
||||||
|
$request->level_1 = 'getNotesByUEs';
|
||||||
|
$request->etudiant = $_SESSION['identifiant'];
|
||||||
|
$request->semestre = $_SESSION['semestre'];
|
||||||
|
$request->annee = $_SESSION['annee'];
|
||||||
|
|
||||||
|
career_switch_level_1($request, $answer);
|
||||||
|
|
||||||
|
if( $answer->request == 'success' ){ // si on a bien récupéré les UE/notes
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
echo "<section name='marksbyue' title='Mes UE' class='basic'>";
|
||||||
|
|
||||||
|
foreach($answer->notes as $UE){
|
||||||
|
|
||||||
|
echo "<table class='basic'>";
|
||||||
|
echo "<thead class='active'>";
|
||||||
|
echo '<tr>';
|
||||||
|
echo '<th colspan=5>'.$UE['UE']['nom'].' - '.$UE['UE']['libelle'].'</th>';
|
||||||
|
echo '</tr>';
|
||||||
|
|
||||||
|
echo '</thead>';
|
||||||
|
echo '<tbody>';
|
||||||
|
foreach($UE['notes'] as $note){
|
||||||
|
echo '<tr>';
|
||||||
|
echo '<td>'.$note['intitule'].'</td>';
|
||||||
|
echo '<td>'.$note['valeur'].'/'.$note['base'].'</td>';
|
||||||
|
echo '</tr>';
|
||||||
|
}
|
||||||
|
echo '</tbody>';
|
||||||
|
echo '</table>';
|
||||||
|
}
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
echo '</section>';
|
||||||
|
}else
|
||||||
|
echo "Erreur interne.";
|
||||||
|
|
||||||
|
} ?>
|
||||||
|
|
|
@ -27,8 +27,8 @@ require_once __ROOT__.'/manager/groups.php';
|
||||||
$answer = new stdClass();
|
$answer = new stdClass();
|
||||||
|
|
||||||
$request->level_1 = 'grouplist';
|
$request->level_1 = 'grouplist';
|
||||||
$request->semestre = '3';
|
$request->semestre = $_SESSION['semestre'];
|
||||||
$request->annee = '2015';
|
$request->annee = $_SESSION['annee'];
|
||||||
|
|
||||||
groups_switch_level_1($request, $answer);
|
groups_switch_level_1($request, $answer);
|
||||||
|
|
||||||
|
@ -100,8 +100,8 @@ if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'student' ){ // s
|
||||||
|
|
||||||
$request->level_1 = 'get';
|
$request->level_1 = 'get';
|
||||||
$request->etudiant = $_SESSION['identifiant'];
|
$request->etudiant = $_SESSION['identifiant'];
|
||||||
$request->semestre = '3';
|
$request->semestre = $_SESSION['semestre'];
|
||||||
$request->annee = '2015';
|
$request->annee = $_SESSION['annee'];
|
||||||
|
|
||||||
groups_switch_level_1($request, $answer);
|
groups_switch_level_1($request, $answer);
|
||||||
|
|
||||||
|
@ -111,8 +111,8 @@ if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'student' ){ // s
|
||||||
$request = new stdClass(); $answer = new stdClass();
|
$request = new stdClass(); $answer = new stdClass();
|
||||||
$request->level_1 = 'userlist';
|
$request->level_1 = 'userlist';
|
||||||
$request->groupe = $monGroupe;
|
$request->groupe = $monGroupe;
|
||||||
$request->semestre = '3';
|
$request->semestre = $_SESSION['semestre'];
|
||||||
$request->annee = '2015';
|
$request->annee = $_SESSION['annee'];
|
||||||
groups_switch_level_1($request, $answer);
|
groups_switch_level_1($request, $answer);
|
||||||
|
|
||||||
if( $answer->request == 'success' ){ // si on a bien récupéré les membres du groupe
|
if( $answer->request == 'success' ){ // si on a bien récupéré les membres du groupe
|
||||||
|
@ -163,8 +163,8 @@ if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'admin' ){ // si
|
||||||
$answer = new stdClass();
|
$answer = new stdClass();
|
||||||
|
|
||||||
$request->level_1 = 'grouplist';
|
$request->level_1 = 'grouplist';
|
||||||
$request->semestre = '3';
|
$request->semestre = $_SESSION['semestre'];
|
||||||
$request->annee = '2015';
|
$request->annee = $_SESSION['annee'];
|
||||||
|
|
||||||
groups_switch_level_1($request, $answer);
|
groups_switch_level_1($request, $answer);
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Notes ici !!!
|
|
|
@ -1,19 +1,16 @@
|
||||||
<?php define('__ROOT__', dirname(dirname(__FILE__)) );
|
<?php define('__ROOT__', dirname(dirname(__FILE__)) );
|
||||||
require_once __ROOT__.'/manager/security.php';
|
require_once __ROOT__.'/manager/security.php';
|
||||||
debug();
|
|
||||||
require_once __ROOT__.'/manager/groups.php';
|
require_once __ROOT__.'/manager/groups.php';
|
||||||
require_once __ROOT__.'/manager/modules.php';
|
require_once __ROOT__.'/manager/modules.php';
|
||||||
|
|
||||||
/****************************************
|
/****************************************
|
||||||
* *
|
* *
|
||||||
* SECTION "GROUPES" *
|
* SECTION "MODULES" *
|
||||||
* *
|
* *
|
||||||
*****************************************
|
*****************************************
|
||||||
*
|
*
|
||||||
* [1] Présentation (studend + prof)
|
* [1] MES MODULES (studend + prof)
|
||||||
* [2] Tout les groupes (tous connecté)
|
* [2] MES MODULES (prof)
|
||||||
* [3] Modifier les groupes (admin)
|
|
||||||
* [4] Répartir les élèves (admin)
|
|
||||||
*
|
*
|
||||||
*****************************************/
|
*****************************************/
|
||||||
?>
|
?>
|
||||||
|
@ -28,12 +25,11 @@ require_once __ROOT__.'/manager/modules.php';
|
||||||
if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'student' ){ // si l'utilisateur est connecté et que c'est un élève
|
if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'student' ){ // si l'utilisateur est connecté et que c'est un élève
|
||||||
|
|
||||||
$request = new stdClass(); $answer = new stdClass();
|
$request = new stdClass(); $answer = new stdClass();
|
||||||
debug();
|
|
||||||
|
|
||||||
$request->level_1 = 'getByEtudiant';
|
$request->level_1 = 'getByEtudiant';
|
||||||
$request->etudiant = $_SESSION['identifiant'];
|
$request->etudiant = $_SESSION['identifiant'];
|
||||||
$request->semestre = '3';
|
$request->semestre = $_SESSION['semestre'];
|
||||||
$request->annee = '2015';
|
$request->annee = $_SESSION['annee'];
|
||||||
|
|
||||||
modules_switch_level_1($request, $answer);
|
modules_switch_level_1($request, $answer);
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
@ -4,7 +4,7 @@
|
||||||
"password" : "eleve1password"
|
"password" : "eleve1password"
|
||||||
},
|
},
|
||||||
|
|
||||||
"eme1913a": {
|
"ydw1981a": {
|
||||||
"permissions": "student",
|
"permissions": "student",
|
||||||
"password" : "password"
|
"password" : "password"
|
||||||
},
|
},
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 76 KiB |
|
@ -144,7 +144,7 @@ ORDER BY s.annee, ue.nom, m.nom ASC
|
||||||
/******************************************/
|
/******************************************/
|
||||||
/*** AFFICHE LES ETUDIANTS PAR SEMESTRE ***/
|
/*** AFFICHE LES ETUDIANTS PAR SEMESTRE ***/
|
||||||
/******************************************/
|
/******************************************/
|
||||||
SELECT DISTINCT s.annee as annee, s.nom as semestre, u.identifiant+'-' as etudiant
|
SELECT DISTINCT s.annee as annee, s.nom as semestre, u.identifiant as etudiant
|
||||||
FROM utilisateur as u, semestre as s, appartenance as app
|
FROM utilisateur as u, semestre as s, appartenance as app
|
||||||
WHERE app.id_etudiant = u.identifiant
|
WHERE app.id_etudiant = u.identifiant
|
||||||
AND app.id_semestre = s.id_semestre
|
AND app.id_semestre = s.id_semestre
|
||||||
|
|
307
xdoc/sid.sql
307
xdoc/sid.sql
|
@ -19,8 +19,8 @@ SET time_zone = "+00:00";
|
||||||
--
|
--
|
||||||
-- Base de données: `sid2`
|
-- Base de données: `sid2`
|
||||||
--
|
--
|
||||||
CREATE DATABASE IF NOT EXISTS `sid2` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
|
CREATE DATABASE IF NOT EXISTS `sid` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
|
||||||
USE `sid2`;
|
USE `sid`;
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
@ -55,106 +55,106 @@ CREATE TABLE IF NOT EXISTS `appartenance` (
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO `appartenance` (`id_appartenance`, `id_etudiant`, `id_groupe`, `id_semestre`) VALUES
|
INSERT INTO `appartenance` (`id_appartenance`, `id_etudiant`, `id_groupe`, `id_semestre`) VALUES
|
||||||
(1, 'ydw1981a', 25, 3),
|
(1, 'ydw1981a', 25, 3),
|
||||||
(2, 'ihf1991a', 26, 4),
|
(2, 'ihf1991a', 26, 4),
|
||||||
(3, 'mma1990a', 23, 3),
|
(3, 'mma1990a', 23, 3),
|
||||||
(4, 'lme1952a', 9, 3),
|
(4, 'lme1952a', 9, 3),
|
||||||
(5, 'imf1922a', 9, 3),
|
(5, 'imf1922a', 9, 3),
|
||||||
(6, 'gyy1983a', 28, 4),
|
(6, 'gyy1983a', 28, 4),
|
||||||
(7, 'otm1902a', 28, 4),
|
(7, 'otm1902a', 28, 4),
|
||||||
(8, 'tnx1949a', 25, 3),
|
(8, 'tnx1949a', 25, 3),
|
||||||
(9, 'sjl1937a', 12, 2),
|
(9, 'sjl1937a', 12, 2),
|
||||||
(10, 'anj1991a', 4, 2),
|
(10, 'anj1991a', 4, 2),
|
||||||
(11, 'xdh1989a', 6, 4),
|
(11, 'xdh1989a', 6, 4),
|
||||||
(12, 'agl1956a', 11, 1),
|
(12, 'agl1956a', 11, 1),
|
||||||
(13, 'mhu1946a', 17, 1),
|
(13, 'mhu1946a', 17, 1),
|
||||||
(14, 'cvv1936a', 22, 2),
|
(14, 'cvv1936a', 22, 2),
|
||||||
(15, 'mzh1955a', 27, 4),
|
(15, 'mzh1955a', 27, 4),
|
||||||
(16, 'pdi1904a', 13, 3),
|
(16, 'pdi1904a', 13, 3),
|
||||||
(17, 'cuk1947a', 23, 3),
|
(17, 'cuk1947a', 23, 3),
|
||||||
(18, 'non1968a', 7, 1),
|
(18, 'non1968a', 7, 1),
|
||||||
(19, 'hmn1970a', 16, 1),
|
(19, 'hmn1970a', 16, 1),
|
||||||
(20, 'hth1975a', 22, 2),
|
(20, 'hth1975a', 22, 2),
|
||||||
(21, 'liw1940a', 11, 1),
|
(21, 'liw1940a', 11, 1),
|
||||||
(22, 'dtg1946a', 6, 4),
|
(22, 'dtg1946a', 6, 4),
|
||||||
(23, 'oxz1985a', 12, 2),
|
(23, 'oxz1985a', 12, 2),
|
||||||
(24, 'ono1984a', 27, 4),
|
(24, 'ono1984a', 27, 4),
|
||||||
(25, 'auy1966a', 10, 4),
|
(25, 'auy1966a', 10, 4),
|
||||||
(26, 'dui1946a', 27, 4),
|
(26, 'dui1946a', 27, 4),
|
||||||
(27, 'cyw1979a', 4, 2),
|
(27, 'cyw1979a', 4, 2),
|
||||||
(28, 'pfv1965a', 11, 1),
|
(28, 'pfv1965a', 11, 1),
|
||||||
(29, 'oqz1937a', 13, 3),
|
(29, 'oqz1937a', 13, 3),
|
||||||
(30, 'aft1950a', 20, 2),
|
(30, 'aft1950a', 20, 2),
|
||||||
(31, 'bae1943a', 22, 2),
|
(31, 'bae1943a', 22, 2),
|
||||||
(32, 'kul1903a', 19, 1),
|
(32, 'kul1903a', 19, 1),
|
||||||
(33, 'rmj1965a', 9, 3),
|
(33, 'rmj1965a', 9, 3),
|
||||||
(34, 'yyt1926a', 16, 1),
|
(34, 'yyt1926a', 16, 1),
|
||||||
(35, 'ktz1997a', 27, 4),
|
(35, 'ktz1997a', 27, 4),
|
||||||
(36, 'hku1995a', 5, 3),
|
(36, 'hku1995a', 5, 3),
|
||||||
(37, 'zgy1948a', 7, 1),
|
(37, 'zgy1948a', 7, 1),
|
||||||
(38, 'vau1957a', 7, 1),
|
(38, 'vau1957a', 7, 1),
|
||||||
(39, 'hsx1927a', 5, 3),
|
(39, 'hsx1927a', 5, 3),
|
||||||
(40, 'eca1977a', 11, 1),
|
(40, 'eca1977a', 11, 1),
|
||||||
(41, 'wpa1966a', 4, 2),
|
(41, 'wpa1966a', 4, 2),
|
||||||
(42, 'qoe1974a', 16, 1),
|
(42, 'qoe1974a', 16, 1),
|
||||||
(43, 'tkz1955a', 7, 1),
|
(43, 'tkz1955a', 7, 1),
|
||||||
(44, 'wnx1995a', 16, 1),
|
(44, 'wnx1995a', 16, 1),
|
||||||
(45, 'sft1994a', 9, 3),
|
(45, 'sft1994a', 9, 3),
|
||||||
(46, 'vgb1979a', 22, 2),
|
(46, 'vgb1979a', 22, 2),
|
||||||
(47, 'wbt1993a', 11, 1),
|
(47, 'wbt1993a', 11, 1),
|
||||||
(48, 'xtb1903a', 27, 4),
|
(48, 'xtb1903a', 27, 4),
|
||||||
(49, 'msj1985a', 25, 3),
|
(49, 'msj1985a', 25, 3),
|
||||||
(50, 'wvn1982a', 20, 2),
|
(50, 'wvn1982a', 20, 2),
|
||||||
(51, 'psg1965a', 25, 3),
|
(51, 'psg1965a', 25, 3),
|
||||||
(52, 'hpa1908a', 24, 3),
|
(52, 'hpa1908a', 24, 3),
|
||||||
(53, 'maq1980a', 21, 2),
|
(53, 'maq1980a', 21, 2),
|
||||||
(54, 'agq1929a', 28, 4),
|
(54, 'agq1929a', 28, 4),
|
||||||
(55, 'gwe1975a', 6, 4),
|
(55, 'gwe1975a', 6, 4),
|
||||||
(56, 'gdb1939a', 4, 2),
|
(56, 'gdb1939a', 4, 2),
|
||||||
(57, 'jrc1974a', 17, 1),
|
(57, 'jrc1974a', 17, 1),
|
||||||
(58, 'jfa1965a', 10, 4),
|
(58, 'jfa1965a', 10, 4),
|
||||||
(59, 'buz1982a', 24, 3),
|
(59, 'buz1982a', 24, 3),
|
||||||
(60, 'mhr1952a', 10, 4),
|
(60, 'mhr1952a', 10, 4),
|
||||||
(61, 'pos1958a', 7, 1),
|
(61, 'pos1958a', 7, 1),
|
||||||
(62, 'xdi1926a', 11, 1),
|
(62, 'xdi1926a', 11, 1),
|
||||||
(63, 'awl1901a', 25, 3),
|
(63, 'awl1901a', 25, 3),
|
||||||
(64, 'uix1942a', 7, 1),
|
(64, 'uix1942a', 7, 1),
|
||||||
(65, 'ngz1932a', 26, 4),
|
(65, 'ngz1932a', 26, 4),
|
||||||
(66, 'kpf1942a', 26, 4),
|
(66, 'kpf1942a', 26, 4),
|
||||||
(67, 'aiv1989a', 23, 3),
|
(67, 'aiv1989a', 23, 3),
|
||||||
(68, 'sjw1936a', 21, 2),
|
(68, 'sjw1936a', 21, 2),
|
||||||
(69, 'fei1944a', 8, 2),
|
(69, 'fei1944a', 8, 2),
|
||||||
(70, 'zge1937a', 10, 4),
|
(70, 'zge1937a', 10, 4),
|
||||||
(71, 'rpl1936a', 4, 2),
|
(71, 'rpl1936a', 4, 2),
|
||||||
(72, 'hrv1902a', 12, 2),
|
(72, 'hrv1902a', 12, 2),
|
||||||
(73, 'djo1928a', 5, 3),
|
(73, 'djo1928a', 5, 3),
|
||||||
(74, 'scm1996a', 13, 3),
|
(74, 'scm1996a', 13, 3),
|
||||||
(75, 'ylq1926a', 26, 4),
|
(75, 'ylq1926a', 26, 4),
|
||||||
(76, 'eme1913a', 5, 3),
|
(76, 'eme1913a', 5, 3),
|
||||||
(77, 'otv1930a', 27, 4),
|
(77, 'otv1930a', 27, 4),
|
||||||
(78, 'cda1951a', 20, 2),
|
(78, 'cda1951a', 20, 2),
|
||||||
(79, 'eee1933a', 26, 4),
|
(79, 'eee1933a', 26, 4),
|
||||||
(80, 'kfx1995a', 27, 4),
|
(80, 'kfx1995a', 27, 4),
|
||||||
(81, 'jgd1966a', 19, 1),
|
(81, 'jgd1966a', 19, 1),
|
||||||
(82, 'rwg1909a', 21, 2),
|
(82, 'rwg1909a', 21, 2),
|
||||||
(83, 'ngw1997a', 20, 2),
|
(83, 'ngw1997a', 20, 2),
|
||||||
(84, 'obg1973a', 24, 3),
|
(84, 'obg1973a', 24, 3),
|
||||||
(85, 'hzg1935a', 14, 4),
|
(85, 'hzg1935a', 14, 4),
|
||||||
(86, 'iyh1918a', 10, 4),
|
(86, 'iyh1918a', 10, 4),
|
||||||
(87, 'tdc1978a', 8, 2),
|
(87, 'tdc1978a', 8, 2),
|
||||||
(88, 'swd1951a', 5, 3),
|
(88, 'swd1951a', 5, 3),
|
||||||
(89, 'vdj1905a', 12, 2),
|
(89, 'vdj1905a', 12, 2),
|
||||||
(90, 'bit1985a', 8, 2),
|
(90, 'bit1985a', 8, 2),
|
||||||
(91, 'iah1936a', 6, 4),
|
(91, 'iah1936a', 6, 4),
|
||||||
(92, 'ypt1989a', 19, 1),
|
(92, 'ypt1989a', 19, 1),
|
||||||
(93, 'ljc1902a', 26, 4),
|
(93, 'ljc1902a', 26, 4),
|
||||||
(94, 'hcc1997a', 24, 3),
|
(94, 'hcc1997a', 24, 3),
|
||||||
(95, 'bky1924a', 11, 1),
|
(95, 'bky1924a', 11, 1),
|
||||||
(96, 'vul1953a', 12, 2),
|
(96, 'vul1953a', 12, 2),
|
||||||
(97, 'ssr1906a', 21, 2),
|
(97, 'ssr1906a', 21, 2),
|
||||||
(98, 'yjh1944a', 16, 1),
|
(98, 'yjh1944a', 16, 1),
|
||||||
(99, 'ste1994a', 21, 2),
|
(99, 'ste1994a', 21, 2),
|
||||||
(100, 'ypo1964a', 9, 3);
|
(100, 'ypo1964a', 9, 3);
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
@ -221,25 +221,25 @@ CREATE TABLE IF NOT EXISTS `module` (
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO `module` (`id_module`, `nom`, `libelle`) VALUES
|
INSERT INTO `module` (`id_module`, `nom`, `libelle`) VALUES
|
||||||
(1, 'M1101', 'Bases de l''algorithmique'), -- S1 - UE1
|
(1, 'M1101', 'Bases de l''algorithmique' ), -- S1 - UE1
|
||||||
(2, 'M1102', 'Programmation web'), -- S1 - UE1
|
(2, 'M1102', 'Programmation web' ), -- S1 - UE1
|
||||||
(3, 'M1201', 'Affiche'), -- S1 - UE2
|
(3, 'M1201', 'Affiche' ), -- S1 - UE2
|
||||||
(4, 'M1202', 'Journal'), -- S1 - UE2
|
(4, 'M1202', 'Journal' ), -- S1 - UE2
|
||||||
|
|
||||||
(5, 'M2101', 'Base de la POO'), -- S2 - UE1
|
(5, 'M2101', 'Base de la POO' ), -- S2 - UE1
|
||||||
(6, 'M2102', 'Ada'), -- S2 - UE1
|
(6, 'M2102', 'Ada' ), -- S2 - UE1
|
||||||
(7, 'M2201', 'Revue de projet'), -- S2 - UE2
|
(7, 'M2201', 'Revue de projet' ), -- S2 - UE2
|
||||||
(8, 'M2202', 'Magazine'), -- S2 - UE2
|
(8, 'M2202', 'Magazine' ), -- S2 - UE2
|
||||||
|
|
||||||
(9, 'M3301', 'Algorithmique et structures de données'), -- S3 - UE3
|
(9, 'M3301', 'Algorithmique et structures de données'), -- S3 - UE3
|
||||||
(10, 'M3302', 'POO avancée'), -- S3 - UE3
|
(10, 'M3302', 'POO avancée' ), -- S3 - UE3
|
||||||
(11, 'M3401', 'Curriculum Vitae'), -- S3 - UE4
|
(11, 'M3401', 'Curriculum Vitae' ), -- S3 - UE4
|
||||||
(12, 'M3402', 'Lettre de motivation'), -- S3 - UE4
|
(12, 'M3402', 'Lettre de motivation' ), -- S3 - UE4
|
||||||
|
|
||||||
(13, 'M4301', 'Programmation serveur: PHP'), -- S4 - UE3
|
(13, 'M4301', 'Programmation serveur: PHP' ), -- S4 - UE3
|
||||||
(14, 'M4302', 'Informatique en stage'); -- S4 - UE3
|
(14, 'M4302', 'Informatique en stage' ), -- S4 - UE3
|
||||||
(15, 'M4401', 'Entretien'); -- S4 - UE4
|
(15, 'M4401', 'Entretien' ), -- S4 - UE4
|
||||||
(16, 'M4402', 'Communication en stage'); -- S4 - UE4
|
(16, 'M4402', 'Communication en stage' ); -- S4 - UE4
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
@ -271,26 +271,26 @@ CREATE TABLE IF NOT EXISTS `note` (
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO `note` (`id_note`, `id_appartenance`, `id_programme`, `valeur`, `base`) VALUES
|
INSERT INTO `note` (`id_note`, `id_appartenance`, `id_programme`, `valeur`, `base`) VALUES
|
||||||
(1, 6, 1, 1, 20), -- 01/20
|
(1, 1, 1, 1, 20), -- 01/20
|
||||||
(2, 7, 1, 2, 20), -- 02/20
|
(2, 1, 1, 2, 20), -- 02/20
|
||||||
(3, 7, 1, 3, 20), -- 03/20
|
(3, 1, 1, 3, 20), -- 03/20
|
||||||
(4, 7, 1, 4, 20), -- 04/20
|
(4, 1, 1, 4, 20), -- 04/20
|
||||||
(5, 7, 1, 5, 20), -- 05/20
|
(5, 1, 1, 5, 20), -- 05/20
|
||||||
(6, 7, 1, 6, 20), -- 06/20
|
(6, 1, 1, 6, 20), -- 06/20
|
||||||
(7, 7, 1, 7, 20), -- 07/20
|
(7, 1, 1, 7, 20), -- 07/20
|
||||||
(8, 7, 1, 8, 20), -- 08/20
|
(8, 1, 1, 8, 20), -- 08/20
|
||||||
(9, 7, 1, 9, 20), -- 09/20
|
(9, 1, 1, 9, 20), -- 09/20
|
||||||
(10, 7, 1, 10, 20), -- 10/20
|
(10, 1, 1, 10, 20), -- 10/20
|
||||||
(11, 6, 1, 11, 20), -- 11/20
|
(11, 1, 1, 11, 20), -- 11/20
|
||||||
(12, 7, 1, 12, 20), -- 12/20
|
(12, 1, 1, 12, 20), -- 12/20
|
||||||
(13, 7, 1, 13, 20), -- 13/20
|
(13, 1, 1, 13, 20), -- 13/20
|
||||||
(14, 7, 1, 14, 20), -- 14/20
|
(14, 1, 1, 14, 20), -- 14/20
|
||||||
(15, 7, 1, 15, 20), -- 15/20
|
(15, 1, 1, 15, 20), -- 15/20
|
||||||
(16, 7, 1, 16, 20), -- 16/20
|
(16, 1, 1, 16, 20), -- 16/20
|
||||||
(17, 7, 1, 17, 20), -- 17/20
|
(17, 1, 1, 17, 20), -- 17/20
|
||||||
(18, 7, 1, 18, 20), -- 18/20
|
(18, 1, 1, 18, 20), -- 18/20
|
||||||
(19, 7, 1, 19, 20), -- 19/20
|
(19, 1, 1, 19, 20), -- 19/20
|
||||||
(20, 7, 1, 20, 20); -- 20/20
|
(20, 1, 1, 20, 20); -- 20/20
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
@ -324,14 +324,25 @@ CREATE TABLE IF NOT EXISTS `programme` (
|
||||||
--
|
--
|
||||||
|
|
||||||
INSERT INTO `programme` (`id_programme`, `id_module`, `id_ue`, `id_semestre`) VALUES
|
INSERT INTO `programme` (`id_programme`, `id_module`, `id_ue`, `id_semestre`) VALUES
|
||||||
(1, 1, 1, 1),
|
(1, 1, 1, 1), -- M1101 - UE1 - S1
|
||||||
(2, 2, 1, 1),
|
(2, 2, 1, 1), -- M1102 - UE1 - S1
|
||||||
(3, 3, 2, 2),
|
(3, 3, 2, 1), -- M1201 - UE2 - S1
|
||||||
(4, 4, 2, 2),
|
(4, 4, 2, 1), -- M1202 - UE2 - S1
|
||||||
(5, 5, 3, 3),
|
|
||||||
(6, 6, 3, 3),
|
(5, 5, 1, 2), -- M2101 - UE1 - S2
|
||||||
(7, 7, 4, 4),
|
(6, 6, 1, 2), -- M2102 - UE1 - S2
|
||||||
(8, 8, 4, 4);
|
(7, 7, 2, 2), -- M2201 - UE2 - S2
|
||||||
|
(8, 8, 2, 2), -- M2202 - UE2 - S2
|
||||||
|
|
||||||
|
(9, 9, 3, 3), -- M3301 - UE3 - S3
|
||||||
|
(10, 10, 3, 3), -- M3302 - UE3 - S3
|
||||||
|
(11, 11, 4, 3), -- M3401 - UE4 - S3
|
||||||
|
(12, 12, 4, 3), -- M3402 - UE4 - S3
|
||||||
|
|
||||||
|
(13, 13, 3, 4), -- M4301 - UE3 - S4
|
||||||
|
(14, 14, 3, 4), -- M4302 - UE3 - S4
|
||||||
|
(15, 15, 4, 4), -- M4401 - UE4 - S4
|
||||||
|
(16, 16, 4, 4); -- M4402 - UE4 - S4
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
@ -359,9 +370,9 @@ INSERT INTO `semestre` (`id_semestre`, `nom`, `rang`, `annee`) VALUES
|
||||||
(4, 'S4', 4, 2015),
|
(4, 'S4', 4, 2015),
|
||||||
|
|
||||||
(5, 'S1', 0, 2016),
|
(5, 'S1', 0, 2016),
|
||||||
(7, 'S2', 2, 2016),
|
(6, 'S2', 2, 2016),
|
||||||
(8, 'S3', 3, 2016),
|
(7, 'S3', 3, 2016),
|
||||||
(9, 'S4', 4, 2016);
|
(8, 'S4', 4, 2016);
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue