Modifications mineures
This commit is contained in:
parent
8281ffe52c
commit
9a75ef5f9f
|
@ -146,3 +146,45 @@ span.link{
|
||||||
}
|
}
|
||||||
|
|
||||||
span.link:hover{ color: #000; }
|
span.link:hover{ color: #000; }
|
||||||
|
|
||||||
|
/*********************/
|
||||||
|
/*** SELECT/OPTION ***/
|
||||||
|
/*********************/
|
||||||
|
select{
|
||||||
|
/* position */
|
||||||
|
margin: 2em 0;
|
||||||
|
padding: 0 1em;
|
||||||
|
|
||||||
|
/* border */
|
||||||
|
border-radius: 5px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
|
||||||
|
/* background */
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
/* foreground */
|
||||||
|
color: #233342;
|
||||||
|
|
||||||
|
/* select */
|
||||||
|
-webkit-appearance:none;
|
||||||
|
-moz-appearance:none;
|
||||||
|
appearance:none;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
select > option{
|
||||||
|
/* position */
|
||||||
|
padding: 1em 0;
|
||||||
|
|
||||||
|
/* background */
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
/* foreground */
|
||||||
|
color: #233342;
|
||||||
|
text-indent: 1em;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
select > option:nth-child(4n+0){ color: #e63c54; }
|
||||||
|
select > option:nth-child(4n+1){ color: #3c73e6; }
|
||||||
|
select > option:nth-child(4n+2){ color: #e6983c; }
|
||||||
|
select > option:nth-child(4n+3){ color: #2dcc70; }*/
|
|
@ -347,16 +347,26 @@ class DataBase{
|
||||||
|
|
||||||
|
|
||||||
// on cherche tout les groupes du même semestre de la même année
|
// on cherche tout les groupes du même semestre de la même année
|
||||||
$getGroupesUID = $this->pdo->prepare("SELECT DISTINCT g.nom, s.rang, s.nom as semestre ".
|
$getGroupesUID = $this->pdo->prepare("SELECT DISTINCT s.nom as semestre, s.rang, g.nom as nom ".
|
||||||
"FROM groupe as g, semestre as s, appartenance as app, enseignement as ens, mcc_ue, mcc_module as mcc_m ".
|
"FROM module as m, utilisateur as u, utilisateur as eleve, groupe as g, enseignement as ens, mcc_ue, mcc_module as mcc_m, semestre as s, appartenance as app ".
|
||||||
"WHERE g.id_groupe = app.id_groupe ".
|
"WHERE mcc_ue.id_semestre = s.id_semestre ".
|
||||||
"AND s.id_semestre = app.id_semestre ".
|
"AND mcc_ue.id_mcc_ue = mcc_m.id_mcc_ue ".
|
||||||
|
|
||||||
|
"AND mcc_m.id_module = m.id_module ".
|
||||||
|
"AND mcc_m.id_mcc_module = ens.id_mcc_module ".
|
||||||
|
|
||||||
|
"AND ens.id_enseignant = u.identifiant ".
|
||||||
|
|
||||||
|
"AND app.id_etudiant = eleve.identifiant ".
|
||||||
|
"AND app.id_semestre = s.id_semestre ".
|
||||||
|
"AND app.id_groupe = g.id_groupe ".
|
||||||
|
|
||||||
"AND s.annee = :annee ".
|
"AND s.annee = :annee ".
|
||||||
"ORDER BY g.nom");
|
"AND u.identifiant = :enseignantUID ".
|
||||||
|
"ORDER BY s.rang, g.nom");
|
||||||
$getGroupesUID->execute(array(
|
$getGroupesUID->execute(array(
|
||||||
':annee' => $annee
|
':annee' => $annee,
|
||||||
|
':enseignantUID' => $enseignantUID
|
||||||
));
|
));
|
||||||
|
|
||||||
$grouplist = array(); // contiendra tout les groupes
|
$grouplist = array(); // contiendra tout les groupes
|
||||||
|
|
|
@ -77,3 +77,11 @@ if( document.querySelector('#CONTAINER section[name=movestudents]') != null ){ /
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***************************************************/
|
||||||
|
/*** GESTION DES SELECT POUR AFFINER LES GROUPES ***/
|
||||||
|
/***************************************************/
|
||||||
|
var selectGroupes = document.querySelectorAll("#CONTAINER > section[name] > select");
|
||||||
|
for( var i = 0 ; i < selectGroupes.length ; i++ )
|
||||||
|
selectGroupes[i].associatedSection = selectGroupes[i].parentNode.getAttribute('name');
|
||||||
|
console.log( selectGroupes );
|
100
page/groups.php
100
page/groups.php
|
@ -25,7 +25,7 @@ require_once __ROOT__.'/manager/groups.php';
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'student' ){ // si connecté && utilisateur
|
if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'student' ){ // si connecté && utilisateur
|
||||||
echo "<section name='allgroups' title='tous les groupes' class='basic'>";
|
echo "<section name='studentallgroups' title='tous les groupes' class='basic'>";
|
||||||
|
|
||||||
$request = new stdClass();
|
$request = new stdClass();
|
||||||
$answer = new stdClass();
|
$answer = new stdClass();
|
||||||
|
@ -108,6 +108,33 @@ if( $_SESSION['identifiant'] != null && ($_SESSION['droits'] == 'teacher' || $_S
|
||||||
if( $answer->request == 'success' ){ // si pas d'erreur
|
if( $answer->request == 'success' ){ // si pas d'erreur
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/* select pour SEMESTRES */
|
||||||
|
$lastSemestre = null;
|
||||||
|
|
||||||
|
echo "<select>";
|
||||||
|
echo "<option>Choix du semestre</option>";
|
||||||
|
foreach($answer->grouplist as $group){
|
||||||
|
if( $lastSemestre == null || $lastSemestre != $group->semestre ){
|
||||||
|
echo '<option>'.$group->semestre.'</option>';
|
||||||
|
$lastSemestre = $group->semestre;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "<select>";
|
||||||
|
|
||||||
|
/* select pour GROUPES */
|
||||||
|
$lastGroupe = null;
|
||||||
|
|
||||||
|
echo "<select>";
|
||||||
|
echo "<option>Choix du groupe</option>";
|
||||||
|
foreach($answer->grouplist as $group){
|
||||||
|
if( $lastGroupe == null || $lastGroupe != $group->nom ){
|
||||||
|
echo '<option>'.$group->nom.'</option>';
|
||||||
|
$lastGroupe = $group->nom;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "<select>";
|
||||||
|
|
||||||
|
|
||||||
echo "<table class='basic col5'><thead><tr>";
|
echo "<table class='basic col5'><thead><tr>";
|
||||||
echo '<th>Identifiant</td>';
|
echo '<th>Identifiant</td>';
|
||||||
echo '<th>Prenom</td>';
|
echo '<th>Prenom</td>';
|
||||||
|
@ -172,7 +199,7 @@ if( $_SESSION['identifiant'] != null && ($_SESSION['droits'] == 'teacher' || $_S
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
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
|
||||||
echo "<section name='mygroup' title='Mon groupe' class='basic'>";
|
echo "<section name='studentsgroup' title='Mon groupe' class='basic'>";
|
||||||
|
|
||||||
$request = new stdClass(); $answer = new stdClass();
|
$request = new stdClass(); $answer = new stdClass();
|
||||||
|
|
||||||
|
@ -236,19 +263,19 @@ if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'student' ){ // s
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- mon groupe -->
|
<!-- mes groupeS -->
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/******************/
|
/*******************/
|
||||||
/*** MON GROUPE ***/
|
/*** MES GROUPES ***/
|
||||||
/******************/
|
/*******************/
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* PROFESSEUR -> les groupes inscrits aux modules qu'il enseigne
|
* PROFESSEUR -> les groupes inscrits aux modules qu'il enseigne
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'teacher' ){ // si l'utilisateur est connecté et que c'est un élève
|
if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'teacher' ){ // si l'utilisateur est connecté et que c'est un élève
|
||||||
echo "<section name='mygroup' title='Mon groupe' class='basic'>";
|
echo "<section name='teachersgroups' title='Mes groupes' class='basic'>";
|
||||||
|
|
||||||
$request = new stdClass(); $answer = new stdClass();
|
$request = new stdClass(); $answer = new stdClass();
|
||||||
$request->level_1 = 'grouplistForTeacher'; /******************************************************************************************************** A FAIRE **/
|
$request->level_1 = 'grouplistForTeacher'; /******************************************************************************************************** A FAIRE **/
|
||||||
|
@ -259,24 +286,57 @@ if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'teacher' ){ // s
|
||||||
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
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
echo "<table class='basic col1'><thead>";
|
/* select pour SEMESTRES */
|
||||||
echo '<tr>';
|
$lastSemestre = null;
|
||||||
echo '<th colspan=5>';
|
|
||||||
echo 'Groupe '.$monGroupe;
|
echo "<select>";
|
||||||
echo '</th>';
|
echo "<option>Choix du semestre</option>";
|
||||||
echo '</tr>';
|
foreach($answer->grouplist as $group){
|
||||||
echo '</thead></table>';
|
if( $lastSemestre == null || $lastSemestre != $group->semestre ){
|
||||||
|
echo '<option>'.$group->semestre.'</option>';
|
||||||
|
$lastSemestre = $group->semestre;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "<select>";
|
||||||
|
|
||||||
|
/* select pour GROUPES */
|
||||||
|
$lastGroupe = null;
|
||||||
|
|
||||||
|
echo "<select>";
|
||||||
|
echo "<option>Choix du groupe</option>";
|
||||||
|
foreach($answer->grouplist as $group){
|
||||||
|
if( $lastGroupe == null || $lastGroupe != $group->nom ){
|
||||||
|
echo '<option>'.$group->nom.'</option>';
|
||||||
|
$lastGroupe = $group->nom;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "<select>";
|
||||||
|
|
||||||
|
echo "<table class='basic col5'><thead><tr>";
|
||||||
|
echo '<th>Identifiant</td>';
|
||||||
|
echo '<th>Prenom</td>';
|
||||||
|
echo '<th>Nom</td>';
|
||||||
|
echo '<th>Semestre</td>';
|
||||||
|
echo '<th>Groupe</td>';
|
||||||
|
echo '</tr></thead></table>';
|
||||||
|
|
||||||
|
foreach($answer->grouplist as $group){ // pour chaque groupe
|
||||||
|
|
||||||
|
if( count($group->userlist) > 0 ){ // s'il y a des utilisateurs
|
||||||
|
|
||||||
|
echo "<table class='basic margin col5'>";
|
||||||
|
|
||||||
|
echo '<tbody>';
|
||||||
|
|
||||||
echo "<table class='basic col5'><tbody>";
|
|
||||||
|
|
||||||
// pour chaque utilisateur
|
// pour chaque utilisateur
|
||||||
foreach($answer->userlist as $user){
|
foreach($group->userlist as $user){
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo "<td><span class=link>".$user['identifiant'].'</span></td>';
|
echo "<td><span class=link>".$user['identifiant'].'</span></td>';
|
||||||
echo '<td>'.$user['prenom'].'</td>';
|
echo '<td>'.$user['prenom'].'</td>';
|
||||||
echo '<td>'.$user['nom'].'</td>';
|
echo '<td>'.$user['nom'].'</td>';
|
||||||
echo '<td>'.$user['semestre'].'</td>';
|
echo '<td>'.$group->semestre.'</td>';
|
||||||
echo '<td>Groupe <span class=stressed>'.$monGroupe.'</span></td>';
|
echo '<td>Groupe <span class=stressed>'.$group->nom.'</span></td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,6 +345,10 @@ if( $_SESSION['identifiant'] != null && $_SESSION['droits'] == 'teacher' ){ // s
|
||||||
echo '</tbody>';
|
echo '</tbody>';
|
||||||
|
|
||||||
echo '</table>';
|
echo '</table>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
}else
|
}else
|
||||||
echo "Erreur interne.";
|
echo "Erreur interne.";
|
||||||
|
|
|
@ -33,11 +33,16 @@ require_once __ROOT__.'/manager/groups.php';
|
||||||
- Saisir des notes si vous en avez l'accès</p>
|
- Saisir des notes si vous en avez l'accès</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<?php /* [2] Notifications
|
||||||
|
=======================================================*/
|
||||||
|
if( $_SESSION['identifiant'] != null ){ // si on est connecté ?>
|
||||||
<section name='notifications' title='Notifications'>
|
<section name='notifications' title='Notifications'>
|
||||||
<p>Notification 3</p>
|
<p>Notification 3</p>
|
||||||
<p>Notification 2</p>
|
<p>Notification 2</p>
|
||||||
<p>Notification 1</p>
|
<p>Notification 1</p>
|
||||||
</section>
|
</section>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
43
test.php
43
test.php
|
@ -186,38 +186,39 @@ require_once __ROOT__.'/manager/security.php';
|
||||||
|
|
||||||
/*** AFFICHER LES MEMBRES DE TOUS LES GROUPES (d'un semestre particulier) ***/
|
/*** AFFICHER LES MEMBRES DE TOUS LES GROUPES (d'un semestre particulier) ***/
|
||||||
|
|
||||||
require('manager/groups.php');
|
// require('manager/groups.php');
|
||||||
|
|
||||||
$request = new stdClass();
|
// $request = new stdClass();
|
||||||
$answer = new stdClass();
|
// $answer = new stdClass();
|
||||||
|
|
||||||
$request->level_1 = 'grouplist';
|
// $request->level_1 = 'grouplist';
|
||||||
$request->semestre = '3';
|
// $request->semestre = '3';
|
||||||
$request->annee = '2015';
|
// $request->annee = '2015';
|
||||||
|
|
||||||
groups_switch_level_1($request, $answer);
|
// groups_switch_level_1($request, $answer);
|
||||||
|
|
||||||
var_dump( $answer );
|
// var_dump( $answer );
|
||||||
echo '<br><br><br><br>';
|
// echo '<br><br><br><br>';
|
||||||
|
|
||||||
foreach($answer->grouplist as $group){
|
// foreach($answer->grouplist as $group){
|
||||||
echo "<br><br>================";
|
// echo "<br><br>================";
|
||||||
echo "<br>=== GROUPE ".$group->nom." ===<br>";
|
// echo "<br>=== GROUPE ".$group->nom." ===<br>";
|
||||||
echo "================<br>";
|
// echo "================<br>";
|
||||||
foreach($group as $userlist)
|
// foreach($group as $userlist)
|
||||||
foreach($userlist as $user){
|
// foreach($userlist as $user){
|
||||||
foreach($user as $key=>$value)
|
// foreach($user as $key=>$value)
|
||||||
echo $key.' = '.$value.' | ';
|
// echo $key.' = '.$value.' | ';
|
||||||
echo '<br>';
|
// echo '<br>';
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
echo "<br><br><br><br><br><br><br>It works !";
|
// echo "<br><br><br><br><br><br><br>It works !";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
phpinfo();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -225,11 +225,14 @@ ORDER BY u.identifiant, u.prenom, u.nom ASC;
|
||||||
/*** AFFICHE LES MODULES D'UN ENSEIGNANT ***/
|
/*** AFFICHE LES MODULES D'UN ENSEIGNANT ***/
|
||||||
/*******************************************/
|
/*******************************************/
|
||||||
SELECT DISTINCT u.prenom, u.nom, m.nom, m.libelle
|
SELECT DISTINCT u.prenom, u.nom, m.nom, m.libelle
|
||||||
FROM module as m, utilisateur as u, enseignement as e, programme as prog, semestre as s
|
FROM module as m, utilisateur as u, enseignement as ens, mcc_ue, mcc_module as mcc_m, semestre as s
|
||||||
WHERE prog.id_module = m.id_module
|
WHERE mcc_ue.id_semestre = s.id_semestre
|
||||||
AND prog.id_semestre = s.id_semestre
|
AND mcc_ue.id_mcc_ue = mcc_m.id_mcc_ue
|
||||||
AND prog.id_programme = e.id_programme
|
|
||||||
AND e.id_enseignant = u.identifiant
|
AND mcc_m.id_module = m.id_module
|
||||||
|
AND mcc_m.id_mcc_module = ens.id_mcc_module
|
||||||
|
|
||||||
|
AND ens.id_enseignant = u.identifiant
|
||||||
|
|
||||||
AND s.annee = 2015
|
AND s.annee = 2015
|
||||||
ORDER BY u.prenom, u.nom, m.nom, m.libelle ASC;
|
ORDER BY u.prenom, u.nom, m.nom, m.libelle ASC;
|
||||||
|
|
10
xdoc/sid.sql
10
xdoc/sid.sql
|
@ -371,7 +371,15 @@ CREATE TABLE IF NOT EXISTS `note` (
|
||||||
--
|
--
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
INSERT INTO `note` (`id_note`, `id_appartenance`, `id_mcc_module`, `date`, `intitule`, `valeur`, `base`, `coefficient`) VALUES
|
||||||
|
(1, 1, 5, '0000-00-00 00:00:00', 'Partiel 1', 1, 10, 1),
|
||||||
|
(2, 1, 5, '0000-00-00 00:00:00', 'Partiel 2', 2, 10, 1),
|
||||||
|
(3, 1, 6, '0000-00-00 00:00:00', 'Partiel 3', 3, 10, 1),
|
||||||
|
(4, 1, 6, '0000-00-00 00:00:00', 'Partiel 4', 4, 10, 1),
|
||||||
|
(5, 1, 7, '0000-00-00 00:00:00', 'Partiel 5', 5, 10, 1),
|
||||||
|
(6, 1, 7, '0000-00-00 00:00:00', 'Partiel 6', 6, 10, 1),
|
||||||
|
(7, 1, 8, '0000-00-00 00:00:00', 'Partiel 7', 7, 10, 1),
|
||||||
|
(8, 1, 8, '0000-00-00 00:00:00', 'Partiel 8', 8, 10, 1);
|
||||||
--
|
--
|
||||||
-- Structure de la table `semestre`
|
-- Structure de la table `semestre`
|
||||||
--
|
--
|
||||||
|
|
Loading…
Reference in New Issue