Skip to content

Commit 984e6c6

Browse files
authored
Finalisation du cours 02 (#19)
1 parent 8030391 commit 984e6c6

File tree

65 files changed

+4131
-21
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+4131
-21
lines changed

.devcontainer/compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
services:
22
devcontainer:
3-
image: mcr.microsoft.com/devcontainers/php:8.3-bookworm
3+
image: mcr.microsoft.com/devcontainers/base:bookworm
4+
command: sleep infinity
45
volumes:
56
- ..:/workspace:cached
6-
command: sleep infinity
77

88
plantuml:
99
image: plantuml/plantuml-server:latest

.devcontainer/devcontainer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
"name": "HEIG-VD ProgServ2 Course Development Container",
33
"dockerComposeFile": "compose.yaml",
44
"service": "devcontainer",
5+
"runServices": ["plantuml"],
56
"workspaceFolder": "/workspace",
67
"features": {
78
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
89
},
910
"customizations": {
1011
"vscode": {
1112
"extensions": [
13+
"bmewburn.vscode-intelephense-client",
1214
"DavidAnson.vscode-markdownlint",
1315
"esbenp.prettier-vscode",
1416
"GitHub.copilot",
@@ -28,8 +30,11 @@
2830
"type=bind,source=${localEnv:HOME}/.ssh,target=${localEnv:HOME}/.ssh,type=bind,consistency=cached"
2931
],
3032
// Ports to expose on the container's network host
31-
"forwardPorts": [8080, 9090],
33+
"forwardPorts": [3306, 8080, 9090],
3234
"portsAttributes": {
35+
"3306": {
36+
"label": "MariaDB Database"
37+
},
3338
"8080": {
3439
"label": "Apache HTTP Server"
3540
},

.devcontainer/post-create.sh

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,23 @@ EOF
99
# Update packages list
1010
sudo apt update
1111

12+
# Install common packages
13+
sudo apt install --yes neovim
14+
1215
# Install packages to optimize images (jpegoptim, optipng)
1316
sudo apt install --yes jpegoptim optipng
1417

1518
# Install packages to optimize documents (ps2pdf)
1619
sudo apt install --yes ghostscript
1720

1821
# Install packages to interact with SQLite databases
19-
sudo apt install --yes sqlite3
22+
sudo apt install --yes sqlite3 php-sqlite3
23+
24+
# Install Apache server and PHP
25+
sudo apt install --yes php-common libapache2-mod-php php-cli
26+
27+
# Install MariaDB client and server
28+
sudo apt install --yes mariadb-client mariadb-server php-mysql
2029

2130
## Configure Apache server
2231
# Remove the default document root
@@ -25,5 +34,22 @@ sudo rm -rf /var/www/html
2534
# Create symbolic link to the document root
2635
sudo ln -s /workspace /var/www/html
2736

28-
# Allow directory listing
29-
sudo sed -i 's/Options -Indexes/Options +Indexes/' /etc/apache2/conf-available/docker-php.conf
37+
# Change port from 80 to 8080
38+
sudo sed -i 's/80/8080/' /etc/apache2/ports.conf
39+
sudo sed -i 's/:80>/:8080>/' /etc/apache2/sites-available/000-default.conf
40+
41+
# Display all PHP errors
42+
sudo sed -i 's/display_errors = Off/display_errors = On/' /etc/php/*/apache2/php.ini
43+
44+
## Configure MariaDB server
45+
# Start MariaDB server
46+
sudo service mysql start
47+
48+
# Set a password for the root user and remove anonymous users and test database
49+
#sudo mariadb-secure-installation
50+
51+
# Create a database and a user for the application
52+
sudo mariadb --execute="CREATE DATABASE IF NOT EXISTS myapp CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
53+
sudo mariadb --execute="CREATE USER IF NOT EXISTS 'user'@'localhost' IDENTIFIED BY 'password';"
54+
sudo mariadb --execute="GRANT ALL PRIVILEGES ON myapp.* TO 'user'@'localhost';"
55+
sudo mariadb --execute="FLUSH PRIVILEGES;"

01.02-programmation-orientee-objet-avance/03-exercices/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ Voici un exemple d'utilisation attendue :
219219

220220
```php
221221
<?php
222-
223222
require_once __DIR__ . '/../src/utils/autoloader.php';
224223

225224
use Characters\Assassins\Ninja;

01.02-programmation-orientee-objet-avance/03-exercices/solution-exercice-03/public/index.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
32
require_once __DIR__ . '/../src/utils/autoloader.php';
43

54
use Characters\Assassins\Ninja;

01.03-projet-libre-(1-sur-8)/01-supports-de-cours/PRESENTATION.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,48 @@ A faire pour le prochain cours :
205205
- ✅ Mettre en place son environnement de travail collaboratif.
206206
- ✅ Se répartir le travail entre les différents membres du groupe.
207207

208+
#### ProgServ2-A (mardi matin) (1/2)
209+
210+
| # | Groupe | Heure de passage |
211+
| --: | :------------------- | :--------------- |
212+
| 1 | Luca, Sacha, Ryad | 10h30 |
213+
| 2 | Pierre, Raul, Romain | 10h40 |
214+
| 3 | Inês, Rania | 10h50 |
215+
| 4 | Matteo, Ella, Aïdan | 11h00 |
216+
| 5 | Luka, Nabil, Mathias | 11h10 |
217+
218+
#### ProgServ2-A (mardi matin) (2/2)
219+
220+
| # | Groupe | Heure de passage |
221+
| --: | :------------------ | :--------------- |
222+
| 6 | Carla, Cindy | 11h20 |
223+
| 7 | Marc, Ana, Charline | 11h30 |
224+
| 8 | Lilou, Aissya | 11h40 |
225+
| 9 | Léa, Grégory | 11h50 |
226+
227+
Steve..?
228+
229+
#### ProgServ2-B (mardi après-midi) (1/2)
230+
231+
| # | Groupe | Heure de passage |
232+
| --: | :----------------------------------------- | :--------------- |
233+
| 1 | Sarah, Sasita, Enya | 14h30 |
234+
| 2 | Gabriel Cappai, Nuno Amaro, Tanguy Vaucher | 14h40 |
235+
| 3 | Thierry, Lilliana | 14h50 |
236+
| 4 | Dylan, Valentin | 15h00 |
237+
| 5 | Christophe, Loic | 15h10 |
238+
239+
#### ProgServ2-B (mardi après-midi) (2/2)
240+
241+
| # | Groupe | Heure de passage |
242+
| --: | :-------------------- | :--------------- |
243+
| 6 | Chloé, Benoît, Camilo | 15h20 |
244+
| 7 | Etienne, Teicir | 15h30 |
245+
| 8 | Inoé, Léa, Yannis | 15h40 |
246+
| 9 | Loann, Elia, Marike | 15h50 |
247+
248+
Loriane..?
249+
208250
### Jalon 3
209251

210252
- Tour de table - validation du travail effectué jusqu'à présent.

01.03-projet-libre-(1-sur-8)/01-supports-de-cours/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,38 @@ A faire pour le prochain cours :
301301
- [x] Mettre en place son environnement de travail collaboratif.
302302
- [x] Se répartir le travail entre les différents membres du groupe.
303303

304+
#### ProgServ2-A (mardi matin)
305+
306+
| # | Groupe | Heure de passage |
307+
| --: | :------------------- | :--------------- |
308+
| 1 | Luca, Sacha, Ryad | 10h30 |
309+
| 2 | Pierre, Raul, Romain | 10h40 |
310+
| 3 | Inês, Rania | 10h50 |
311+
| 4 | Matteo, Ella, Aïdan | 11h00 |
312+
| 5 | Luka, Nabil, Mathias | 11h10 |
313+
| 6 | Carla, Cindy | 11h20 |
314+
| 7 | Marc, Ana, Charline | 11h30 |
315+
| 8 | Lilou, Aissya | 11h40 |
316+
| 9 | Léa, Grégory | 11h50 |
317+
318+
Steve..?
319+
320+
#### ProgServ2-B (mardi après-midi)
321+
322+
| # | Groupe | Heure de passage |
323+
| --: | :----------------------------------------- | :--------------- |
324+
| 1 | Sarah, Sasita, Enya | 14h30 |
325+
| 2 | Gabriel Cappai, Nuno Amaro, Tanguy Vaucher | 14h40 |
326+
| 3 | Thierry, Lilliana | 14h50 |
327+
| 4 | Dylan, Valentin | 15h00 |
328+
| 5 | Christophe, Loic | 15h10 |
329+
| 6 | Chloé, Benoît, Camilo | 15h20 |
330+
| 7 | Etienne, Teicir | 15h30 |
331+
| 8 | Inoé, Léa, Yannis | 15h40 |
332+
| 9 | Loann, Elia, Marike | 15h50 |
333+
334+
Loriane..?
335+
304336
### Jalon 3
305337

306338
- Tour de table - validation du travail effectué jusqu'à présent.

0 commit comments

Comments
 (0)