1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2024-12-27 08:22:21 +00:00
plateforme-corres2math/server_files/classes/Reason.php

41 lines
662 B
PHP
Raw Normal View History

2019-09-16 22:04:45 +00:00
<?php
class Reason
{
const SOLUTION = 0;
2019-09-23 22:12:33 +00:00
const ANSWER1 = 1;
const ANSWER2 = 2;
2019-09-16 22:04:45 +00:00
public static function getTranslatedName($class) {
switch ($class) {
2019-09-23 22:12:33 +00:00
case self::ANSWER1:
case self::ANSWER2:
2019-09-16 22:04:45 +00:00
return "Réponse";
default:
return "Solution";
}
}
public static function getName($class) {
switch ($class) {
2019-09-23 22:12:33 +00:00
case self::ANSWER1:
return "ANSWER1";
case self::ANSWER2:
return "ANSWER2";
2019-09-16 22:04:45 +00:00
default:
return "SOLUTION";
}
}
public static function fromName($name) {
switch ($name) {
2019-09-23 22:12:33 +00:00
case "ANSWER1":
return self::ANSWER1;
case "ANSWER2":
return self::ANSWER2;
2019-09-16 22:04:45 +00:00
default:
return self::SOLUTION;
}
}
}