Merge branch 'master' of https://codefirst.iut.uca.fr/git/nathan.boileau/Scripted
continuous-integration/drone/push Build is failing Details

ServeurDeTest
Noé GARNIER 2 years ago
commit a12f0ee72d

@ -31,10 +31,20 @@ ul {
a{
color: white;
cursor: pointer;
text-decoration: none !important;
font-family: Equinox, sans-serif;
}
a:hover{
color: #44fff6;
transition: all 0.4s ease-in-out;
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
}
/***** Text CSS *****/
p{
@ -80,7 +90,7 @@ h1, h2, h3, h4, h5, h6 {
.btn{
position: relative;
width: 120px;
width: 130px;
height: 60px;
background: transparent;
}

@ -30,31 +30,31 @@ function run() {
setTimeout(() => {
runner.stopRunning();
}, 10 * 1000);
}
}
function run_init() {
function run_init() {
if (document.getElementById("console") != "") {
document.getElementById("console").innerHTML = "";
}
run();
}
}
var editor = ace.edit("editor");
editor.container.style.opacity = 0.85;
editor.setTheme("ace/theme/vibrant_ink");
editor.getSession().setMode("ace/mode/python");
editor.setFontSize("16px");
editor.setOptions({
var editor = ace.edit("editor");
editor.container.style.opacity = 0.85;
editor.setTheme("ace/theme/vibrant_ink");
editor.getSession().setMode("ace/mode/python");
editor.setFontSize("16px");
editor.setOptions({
enableLiveAutocompletion: true,
copyWithEmptySelection: true,
showGutter: true,
useWrapMode: true, // wrap text to view
indentedSoftWrap: false,
});
});
//Function that execute given code and return the result in a given element by id
//Function that execute given code and return the result in a given element by id
function exec(code, id) {
function exec(code, id) {
const terminal = document.getElementById("console");
terminal.innerHTML = "";
const runner = new BrythonRunner({
@ -93,12 +93,12 @@ function run() {
setTimeout(() => {
runner.stopRunning();
}, 10 * 1000);
}
}
/**
/**
* It checks if the code in the editor as the same result as the solution.
*/
function check() {
function check() {
if (retourSolution == "ERROR") {
result.innerHTML = "Il semblerait qu'il y a une erreur dans ton code :/";
} else if (retourSolution == retourCode) {
@ -107,14 +107,12 @@ function run() {
} else {
result.innerHTML = "Mauvaise réponse";
}
}
}
/**
/**
* If the help is displayed, hide it. Otherwise, display it.
*/
function displayHelp() {
function displayHelp() {
var help = document.getElementsByClassName("help");
if (help[0].style.display == "block") {
@ -127,5 +125,11 @@ function run() {
for (var i = 0; i < help.length; i++) {
help[i].style.display = "block";
}
}
}
/**
* It opens a new window with the name dashboard.html and the size of 1000x450.
*/
function dashboard() {
window.open("dashboard.html", "", "width=1000, height=450");
}

@ -26,34 +26,23 @@
<!-- First Row -->
<div class="row py-4 d-flex justify-content-between user-select-none">
<div class="col d-flex align-items-center px-0">
<a class="material-icons pl-0" id="home" href="index.php?action=goToHome"
<a class="material-icons pl-0" id="home" href="index.php?action=quitGame"
style="font-size: 40px; color: white">home</a>
</div>
<div class="col-4 d-flex align-items-center justify-content-center px-0">
<button>Next</button>
</div>
<!-- <div class="col-1 d-flex align-items-center justify-content-end px-0">
<a class="material-icons pl-0" id="backArrow"
href="index.php?action=goToEnigme&ordre=<?php
if ($enigme->getOrdre() == 1)
{
echo $enigme->getOrdre();
}
else
{
echo $enigme->getOrdre() - 1;
}?>"
style="font-size: 40px; color: white">< &nbsp;</a>
</div>
<div class="col-1 d-flex align-items-center px-0">
<a class="material-icons pl-0" id="nextArrow"
href="index.php?action=goToEnigme&ordre=<?php echo $enigme->getOrdre() + 1; ?>"
style="font-size: 40px; color: white">&nbsp; ></a>
</div> -->
<a class="px-3 py-2"><b>Passer l'énigme</b></a>
</div>
<div class="col-4 d-flex align-items-center justify-content-center px-0">
<p>Temps restant : </p>
<div id="countdown"></div>
</div>
<button style="background-color: transparent; border: none; outline: none;" onclick="displayHelp()"
class="col d-flex align-items-center">
<div class="col text-right px-2">
<p class="" style="font-size: 14px; color: white"><b>Besoin d'aide ?</b></p>
<div class="col"></div>
<div class="col-3 d-flex justify-content-end px-2" style="width:fit-content">
<p class="mr-3" style="font-size: 16px; font-family: Equinox; color: white;"><b>Besoin d'aide ?</b></p>
</div>
<div class="col-1 text-right">
<img src="View/assets/img/Foxy.png" alt="Logo" class="rounded-circle moving-fox"
@ -117,16 +106,21 @@
class="p-3 rounded"></textarea>
<div class="row pt-5 text-center" style="cursor: pointer">
<div class="col-6">
<div class="col-4">
<a onclick="run_init()" class="btn">
<span>Run</span>
</a>
</div>
<div class="col-6">
<div class="col-4">
<button onclick="submit()" class="btn" data-toggle="modal" data-target="#modal">
<span>Submit</span>
</button>
</div>
<div class="col-4">
<a onclick="dashboard()" class="btn">
<span>Dashboard</span>
</a>
</div>
</div>
</div>
<!-- End Third Column -->
@ -152,7 +146,9 @@
</div>
<div class="modal-footer">
<a
href="index.php?action=enigmeMultiEnded&index=' . $index .'"
<?php
echo 'href="index.php?action=enigmeMultiEnded&index=' . $index .'"';
?>
class="btn" style="display: none" id="next"
>
<span>NEXT</span>
@ -167,7 +163,8 @@
charset="utf-8"></script>
<script src="https://raw.githack.com/pythonpad/brython-runner/master/lib/brython-runner.bundle.js"
type="text/javascript" charset="utf-8"></script>
<script src="View/src/JS/baseMulti.js"></script>
<script src="../../JS/baseMulti.js">
</script>
</body>
</html>

@ -112,16 +112,21 @@
class="p-3 rounded"></textarea>
<div class="row pt-5 text-center" style="cursor: pointer">
<div class="col-6">
<div class="col-4">
<a onclick="run_init()" class="btn">
<span>Run</span>
</a>
</div>
<div class="col-6">
<div class="col-4">
<button onclick="submit()" class="btn" data-toggle="modal" data-target="#modal">
<span>Submit</span>
</button>
</div>
<div class="col-4">
<a onclick="dashboard()" class="btn">
<span>Dashboard</span>
</a>
</div>
</div>
</div>
<!-- End Third Column -->

Loading…
Cancel
Save