fix demo pour les student + visuel boutons des actions student

php
Anthony RICHARD 1 year ago
parent a3b6b9262d
commit dede582ca3

@ -22,7 +22,7 @@ class StudentController extends UserController
{
global $twig;
global $user;
$jeu = $_POST['jeu'];
$jeu = Validation::filter_str_nospecialchar($_GET['jeu'] ?? null);
$model = new MdlStudent();
$voc = $model->getVocByGroup($user->getGroup());
echo $twig->render('vocabList.html', ['jeu' => $jeu,

@ -18,7 +18,7 @@ class VisitorController
global $user;
try {
$idVoc = Validation::filter_int($_POST['idVoc'] ?? 4);
$idVoc = Validation::filter_int($_GET['idVoc'] ?? 4);
$wordList = (new MdlTeacher())->findByIdVoc($idVoc);
$name = ((new MdlStudent())->getVocabById($idVoc))->getName();
$wordShuffle = array();
@ -63,7 +63,7 @@ class VisitorController
global $user;
try {
$vocabId = Validation::filter_int($_POST['idVoc'] ?? 4);
$vocabId = Validation::filter_int($_GET['idVoc'] ?? 4);
$vocabList = (new VocabularyListGateway())->findById($vocabId) ?? null;
if ($vocabList == null) {

@ -2846,7 +2846,7 @@ textarea.form-control-lg {
--bs-btn-bg: #a840a3;
--bs-btn-border-color: #a840a3;
--bs-btn-hover-color: #fff;
--bs-btn-hover-bg: #cf51c9;
--bs-btn-hover-bg: #6e176a;
--bs-btn-hover-border-color: #cf51c9;
--bs-btn-focus-shadow-rgb: 123, 175, 172;
--bs-btn-active-color: #fff;
@ -8177,6 +8177,12 @@ textarea.form-control-lg {
.text-capitalize {
text-transform: capitalize !important;
}
.text-capitalize-first-letter::first-letter {
text-transform: uppercase;
}
.text-capitalize-first-letter {
text-transform: lowercase;
}
.text-wrap {
white-space: normal !important;
@ -11147,9 +11153,9 @@ body {
padding: 1.25rem 2rem;
font-family: "Varela Round", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 80%;
text-transform: uppercase;
letter-spacing: 0.15rem;
letter-spacing: 0.1rem;
border: 0;
text-align: center;
}
.masthead {

@ -5,48 +5,17 @@
<title>Games list</title>
<link href="{{base}}/css/styles.css" rel="stylesheet" />
<link rel="icon" type="image/x-icon" href="{{base}}/assets/favicon.ico"/>
<style>
body {
margin-top: 5vh;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
.content {
text-align: center;
}
table {
margin-top: 20px;
}
</style>
</head>
<body>
<body class="min-vh-100 d-flex justify-content-center align-items-center">
{% include 'navBar.twig' %}
<div class="content">
<section>
<table>
<tr>
<td>
<form action="{{base}}/student/{{userID}}/listVocChoice" method="post">
<input type="hidden" name="jeu" value="quiz">
<input class="btn-list" type="submit" value="Quiz" />
</form>
</td>
</tr>
<tr>
<td>
<form action="{{base}}/student/{{userID}}/listVocChoice" method="post">
<input type="hidden" name="jeu" value="memory">
<input class="btn-list" type="submit" value="Memory" />
</form>
</td>
</tr>
</table>
</section>
<div class="w-50 d-flex flex-column gap-3">
<a href="{{base}}/student/{{userID}}/listVocChoice?jeu=quiz">
<input class="w-100 btn btn-primary rounded-4 fs-1" style="height: 17vh" type="button" value="Quiz"/>
</a>
<a href="{{base}}/student/{{userID}}/listVocChoice?jeu=memory">
<input class="w-100 btn btn-primary rounded-4 fs-1" style="height: 17vh" type="button" value="Memory"/>
</a>
</div>
</body>
</html>

@ -54,7 +54,12 @@
<section class="projects-section">
<div class="container px-4 px-lg-5" id="game">
<!-- Game One Row-->
<a class="click-game" href="{{base}}/visitor/quiz">
<a class="click-game"
{% if userRole is defined and 'student' in userRole %}
href="{{base}}/student/{{userID}}/listVocChoice?jeu=quiz">
{% else %}
href="{{base}}/visitor/quiz">
{% endif %}>
<div class="row gx-0 mb-5 mb-lg-0 justify-content-center">
<div class="col-lg-6"><img class="img-fluid" src="{{base}}/assets/img/quizz.jpeg" alt="..." /></div>
<div class="col-lg-6">
@ -70,7 +75,12 @@
</div>
</a>
<!-- Game Two Row-->
<a class="click-game" href="{{base}}/visitor/memory">
<a class="click-game"
{% if userRole is defined and 'student' in userRole %}
href="{{base}}/student/{{userID}}/listVocChoice?jeu=memory">
{% else %}
href="{{base}}/visitor/memory">
{% endif %}
<div class="row gx-0 justify-content-center">
<div class="col-lg-6"><img class="img-fluid" src="{{base}}/assets/img/memory.jpeg" alt="..." /></div>
<div class="col-lg-6 order-lg-first">

@ -7,42 +7,16 @@
<link rel="icon" type="image/x-icon" href="{{base}}/assets/favicon.ico"/>
<title>Manage lists</title>
</head>
<style>
body {
margin-top: 5vh;
display: flex;
align-items: center;
justify-content: center;
height: auto;
}
.content {
text-align: center;
}
table {
margin-top: 20px;
}
</style>
<body>
<body class="min-vh-100 d-flex justify-content-center align-items-center">
{% include 'navBar.twig' %}
{% if vocabularies is defined %}
<div class="content">
<div class="border my-2 py-2 border-5 border-secondary rounded-3 text-center">
<table class="table table-bordered">
{% for row in vocabularies %}
<tr>
<td>
<form action="{{base}}/student/{{userID}}/{{jeu}}" method="post">
<input type="hidden" name="idVoc" value="{{ row.id }}">
<input class="btn-list" type="submit" value="{{ row.name }}" />
</form>
</td>
</tr>
{% endfor %}
</table>
</div>
<div class="w-50 d-flex flex-column gap-3">
{% for row in vocabularies %}
<a href="{{base}}/student/{{userID}}/{{jeu}}?idVoc={{row.id}}">
<input class="w-100 btn btn-primary rounded-4 fs-1" style="height: 17vh" type="button" value="{{row.name}}"/>
</a>
{% endfor %}
</div>
{% endif %}
</body>

Loading…
Cancel
Save