diff --git a/build/database/repo/professor.php b/build/database/repo/professor.php index fa22578..6f3d391 100644 --- a/build/database/repo/professor.php +++ b/build/database/repo/professor.php @@ -214,21 +214,25 @@ class professor extends Repo_i { /* (1) Prepare Statement */ $st = $this->pdo->prepare("SELECT * FROM `Professeur` WHERE `casLogin` = :cas_login"); - /* (2) Bind params and execute statement */ + /* (2) Check if statement error */ + if( is_bool($st) ) + return NULL; + + /* (3) Bind params and execute statement */ $success = $st->execute([ ':cas_login' => $cas_login ]); - /* (3) Manage error */ + /* (4) Manage error */ if( !$success ) return NULL; - /* (4) Get data */ + /* (5) Get data */ $fetched = $st->fetch(); - /* (5) Return NULL on no result */ + /* (6) Return NULL on no result */ if( $fetched === false ) return NULL; - /* (6) Return data */ + /* (7) Return data */ return $fetched; } diff --git a/build/database/repo/ue.php b/build/database/repo/ue.php index 2c0f82c..31037bd 100644 --- a/build/database/repo/ue.php +++ b/build/database/repo/ue.php @@ -163,11 +163,15 @@ class ue extends Repo_i { public function get(?String $code=null) : ?array{ /* (1) Manage if no id given */ - $cond = is_null($code) ? '' : ' WHERE `code` = :code'; + $cond = is_null($code) ? '' : 'AND `code` = :code'; $parm = is_null($code) ? [] : [':code' => $code]; /* (2) Prepare Statement */ - $st = $this->pdo->prepare("SELECT * FROM `UE`$cond GROUP BY `label` ASC"); + $st = $this->pdo->prepare("SELECT ue.code, ue.label, ue.disabled, ue.required, ue.volumeCours, ue.volumeTD, ue.volumeTP, ue.Formation_idFormation idForm, f.labelFormation labelForm + FROM `UE` ue, `Formation` f + WHERE f.idFormation = ue.Formation_idFormation + $cond + ORDER BY `ue`.`label` ASC"); /* (3) Bind params and execute statement */ if( is_bool($st) ) return []; diff --git a/public_html/asset/svg/bell.svg b/public_html/asset/svg/bell.svg new file mode 100644 index 0000000..822f455 --- /dev/null +++ b/public_html/asset/svg/bell.svg @@ -0,0 +1,44 @@ + +image/svg+xml \ No newline at end of file diff --git a/webpack/component/teacher/view.vue b/webpack/component/teacher/view.vue index dae6a93..401e99c 100644 --- a/webpack/component/teacher/view.vue +++ b/webpack/component/teacher/view.vue @@ -59,7 +59,7 @@
-
+
diff --git a/webpack/component/ue/view.vue b/webpack/component/ue/view.vue index c549486..0a69c4a 100644 --- a/webpack/component/ue/view.vue +++ b/webpack/component/ue/view.vue @@ -1,38 +1,87 @@