fix [modules.json] format + fix 'teacher/pdf' to return data even if no formation is found (+remove dumb data from pdf)
This commit is contained in:
parent
cfb9e0df23
commit
1bfd97009e
|
@ -132,7 +132,7 @@ class pdfController{
|
|||
$fetched = $form_repo->get(null);
|
||||
|
||||
/* (2) Error: no formation found */
|
||||
if( count($fetched) < 1 )
|
||||
if( !is_array($fetched) )
|
||||
return ['error' => new Error(Err::RepoError)];
|
||||
|
||||
/* (3) Reference formations by key = idForm */
|
||||
|
@ -285,10 +285,6 @@ class pdfController{
|
|||
Il est à noter qu\'elle contient les données générées au '.$date.'. Elle peut ne plus être à jour.
|
||||
</blockquote>
|
||||
|
||||
<p>
|
||||
Si un problème persiste veuillez contacter les responsables à l\'addresse mail suivante <span style="color: red;"><mail_display_error></span>.
|
||||
</p>
|
||||
|
||||
<br><br><br>
|
||||
|
||||
|
||||
|
@ -317,12 +313,12 @@ class pdfController{
|
|||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="ar">Heures manquantes</td>
|
||||
<td class="ar">Sous service</td>
|
||||
<td>'.( $missing_h>0 ? "$svg_warning $missing_h" : $missing_h).' h</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="ar">Heures sup.</td>
|
||||
<td class="ar">Sur service</td>
|
||||
<td>'.$sup_h.' h</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -352,10 +348,6 @@ class pdfController{
|
|||
Il est à noter qu\'elle contient les données générées au '.$date.'. Elle peut ne plus être à jour.
|
||||
</blockquote>
|
||||
|
||||
<p>
|
||||
Si un problème persiste veuillez contacter les responsables à l\'addresse mail suivante <span style="color: red;"><mail_display_error></span>.
|
||||
</p>
|
||||
|
||||
<br><br><br>
|
||||
|
||||
<table>
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
"par": {
|
||||
"URL0": {"des": "Department id", "typ": "id", "ren": "department" }
|
||||
},
|
||||
"output": {
|
||||
"out": {
|
||||
"switched": { "des": "Whether the department has been switched", "typ": "bool" }
|
||||
}
|
||||
|
||||
|
@ -133,7 +133,7 @@
|
|||
"par": {
|
||||
"URL0": { "des": "The version id", "typ": "id", "ren": "version" }
|
||||
},
|
||||
"output": {
|
||||
"out": {
|
||||
"sucess": { "des": "success of the operation", "typ": "bool" }
|
||||
}
|
||||
}
|
||||
|
@ -142,7 +142,7 @@
|
|||
"des": "Get the list of the versions of the department",
|
||||
"per": [["cas_admin"]],
|
||||
"par": {},
|
||||
"output": {
|
||||
"out": {
|
||||
"versions": { "des": "List of available versions", "typ": "array" }
|
||||
}
|
||||
},
|
||||
|
@ -150,9 +150,9 @@
|
|||
"des": "Create a backup if the name is empty, execute the backup if the name is set",
|
||||
"per": [["cas_admin"]],
|
||||
"par": {
|
||||
"label": { "des": "Label of the version","typ": "text"}
|
||||
"label": { "des": "Label of the version", "typ": "text" }
|
||||
},
|
||||
"output": {
|
||||
"out": {
|
||||
"created_id": { "des": "The id of the created version", "typ": "varchar(10,10,alphanumeric)" }
|
||||
}
|
||||
},
|
||||
|
@ -160,11 +160,11 @@
|
|||
"des": "Update a version and switch to this version",
|
||||
"per": [["cas_admin"]],
|
||||
"par": {
|
||||
"URL0": { "des": "id of the version","typ": "id","ren": "version"},
|
||||
"label" : { "des": "Label de la version", "typ": "text", "opt":true},
|
||||
"default": { "des": "true if this version is the one that should be used by default on login", "typ": "bool","opt":true}
|
||||
"URL0": { "des": "id of the version", "typ": "id", "ren": "version" },
|
||||
"label": { "des": "Label de la version", "typ": "text", "opt": true },
|
||||
"default": { "des": "Whether this version should be used on login", "typ": "bool", "opt": true }
|
||||
},
|
||||
"output": {
|
||||
"out": {
|
||||
"updated": { "des": "Whether the version has been switched|applied", "typ": "bool" }
|
||||
}
|
||||
},
|
||||
|
@ -174,7 +174,7 @@
|
|||
"par": {
|
||||
"URL0": { "des": "The version id", "typ": "id", "ren": "version" }
|
||||
},
|
||||
"output": {
|
||||
"out": {
|
||||
"deleted": { "des": "Whether the version has been deleted", "typ": "bool" }
|
||||
}
|
||||
}
|
||||
|
@ -261,7 +261,7 @@
|
|||
|
||||
"GET": {
|
||||
"des": "Get a professor's fiche",
|
||||
"per": [["cas_admin"],["cas_user"]],
|
||||
"per": [["cas_admin"], ["cas_user"]],
|
||||
"par": {
|
||||
"URL0": { "des": "Optional professor UID.", "typ": "id", "ren": "prof_id" }
|
||||
},
|
||||
|
@ -346,7 +346,7 @@
|
|||
"volume": { "des": "Number of hours for Cours", "typ": "id", "opt": true, "def": 0 },
|
||||
"formations": { "des": "List of formations (ids)", "typ": "array<id>", "opt": true, "def": [] }
|
||||
},
|
||||
"output": {
|
||||
"out": {
|
||||
"created_id" : { "des": "The id of the created Cours", "typ": "id" },
|
||||
"formations" : { "des": "The ids of the linked formations", "typ": "array<id>" }
|
||||
}
|
||||
|
@ -370,7 +370,7 @@
|
|||
"add_form": { "des": "Id of formations to add", "typ": "array<id>", "opt": true, "def": [] },
|
||||
"rem_form": { "des": "Id of formations to remove", "typ": "array<id>", "opt": true, "def": [] }
|
||||
},
|
||||
"output": {
|
||||
"out": {
|
||||
"updated" : { "des": "Whether it has been updated", "typ": "bool" }
|
||||
}
|
||||
},
|
||||
|
@ -381,7 +381,7 @@
|
|||
"par": {
|
||||
"URL0": { "des": "Id of the Cours", "typ": "id", "ren": "idCours" }
|
||||
},
|
||||
"output": {
|
||||
"out": {
|
||||
"deleted" : { "des": "Whether it has been deleted", "typ": "bool" }
|
||||
}
|
||||
}
|
||||
|
@ -399,7 +399,7 @@
|
|||
"volume": { "des": "Number of hours for TD", "typ": "id", "opt": true, "def": 0 },
|
||||
"formations": { "des": "List of formations (ids)", "typ": "array<id>", "opt": true, "def": [] }
|
||||
},
|
||||
"output": {
|
||||
"out": {
|
||||
"created_id" : { "des": "The id of the created TD", "typ": "id" },
|
||||
"formations" : { "des": "The ids of the linked formations", "typ": "array<id>" }
|
||||
}
|
||||
|
@ -423,7 +423,7 @@
|
|||
"add_form": { "des": "Id of formations to add", "typ": "array<id>", "opt": true, "def": [] },
|
||||
"rem_form": { "des": "Id of formations to remove", "typ": "array<id>", "opt": true, "def": [] }
|
||||
},
|
||||
"output": {
|
||||
"out": {
|
||||
"updated" : { "des": "Whether it has been updated", "typ": "bool" }
|
||||
}
|
||||
},
|
||||
|
@ -434,7 +434,7 @@
|
|||
"par": {
|
||||
"URL0": { "des": "Id of the TD", "typ": "id", "ren": "idTD" }
|
||||
},
|
||||
"output": {
|
||||
"out": {
|
||||
"deleted" : { "des": "Whether it has been deleted", "typ": "bool" }
|
||||
}
|
||||
}
|
||||
|
@ -452,7 +452,7 @@
|
|||
"volume": { "des": "Number of hours for TP", "typ": "id", "opt": true, "def": 0 },
|
||||
"formations": { "des": "List of formations (ids)", "typ": "array<id>", "opt": true, "def": [] }
|
||||
},
|
||||
"output": {
|
||||
"out": {
|
||||
"created_id" : { "des": "The id of the created TP", "typ": "id" },
|
||||
"formations" : { "des": "The ids of the linked formations", "typ": "array<id>" }
|
||||
}
|
||||
|
@ -476,7 +476,7 @@
|
|||
"add_form": { "des": "Id of formations to add", "typ": "array<id>", "opt": true, "def": [] },
|
||||
"rem_form": { "des": "Id of formations to remove", "typ": "array<id>", "opt": true, "def": [] }
|
||||
},
|
||||
"output": {
|
||||
"out": {
|
||||
"updated" : { "des": "Whether it has been updated", "typ": "bool" }
|
||||
}
|
||||
},
|
||||
|
@ -487,7 +487,7 @@
|
|||
"par": {
|
||||
"URL0": { "des": "Id of the TP", "typ": "id", "ren": "idTP" }
|
||||
},
|
||||
"output": {
|
||||
"out": {
|
||||
"deleted" : { "des": "Whether it has been deleted", "typ": "bool" }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue