mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 00:24:35 +00:00
Added alert when test includes MathML format and browser is not Firefox
By the moment applicants should absolve the tests using Firefox Browser to ensure the correct display MathML. If they use another browser, they will now get an alert.
This commit is contained in:
+33
-1
@@ -283,7 +283,7 @@ if (isset($_SESSION['pruefling_id']))
|
||||
$result = $db->db_query($qry);
|
||||
$lastsemester = '';
|
||||
$quereinsteiger_stg = '';
|
||||
|
||||
$gebiet_hasMathML = false; // true, wenn irgendein Gebiet eine/n Frage/Vorschlag im MathML-Format enthält
|
||||
while($row = $db->db_fetch_object($result))
|
||||
{
|
||||
//Jedes Semester in einer eigenen Tabelle anzeigen
|
||||
@@ -323,6 +323,13 @@ if (isset($_SESSION['pruefling_id']))
|
||||
}
|
||||
|
||||
$gebiet = new gebiet();
|
||||
|
||||
// Prüfen, ob das Gebiet eine/n Frage/Vorschlag im MathML-Format enthält
|
||||
if (!$gebiet_hasMathML) // sobald nur ein MathML Format gefunden, variable nicht mehr überschreiben
|
||||
{
|
||||
$gebiet_hasMathML = $gebiet->hasMathML($row->gebiet_id);
|
||||
}
|
||||
|
||||
if($gebiet->check_gebiet($row->gebiet_id))
|
||||
{
|
||||
//Status der Gebiete Pruefen
|
||||
@@ -401,4 +408,29 @@ else
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// Get users Browser
|
||||
var ua = navigator.userAgent;
|
||||
|
||||
// If Browser is any other than Mozilla Firefox and the test includes any MathML,
|
||||
// show message to use Mozilla Firefox
|
||||
if ((ua.indexOf("Firefox") > -1) == false)
|
||||
{
|
||||
let hasMathML = "<?php echo $gebiet_hasMathML; ?>";
|
||||
let userLang = "<?php echo $sprache_user; ?>";
|
||||
if (hasMathML == true)
|
||||
{
|
||||
if (userLang == 'German')
|
||||
{
|
||||
alert('BITTE VERWENDEN SIE DEN MOZILLA FIREFOX BROWSER!\n(Manche Prüfungsfragen werden sonst nicht korrekt dargestellt.)');
|
||||
}
|
||||
else if(userLang == 'English')
|
||||
{
|
||||
alert('PLEASE USE MOZILLA FIREFOX BROWSER!\n(Ohterwise some exam items will not be displayed correctly.)');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user