|
|
|
@ -25,6 +25,8 @@ function Exercises($pagename, $auth){ |
|
|
|
|
$type = $_GET["type"]; |
|
|
|
|
|
|
|
|
|
$availableexercisetypes = array("pagelink", "expressioninpage"); |
|
|
|
|
if ($type=="random") |
|
|
|
|
$type= $availableexercisetypes[rand(0,count($availableexercisetypes)-1)]; |
|
|
|
|
|
|
|
|
|
switch ($type){ |
|
|
|
|
case "pagelink": |
|
|
|
@ -105,10 +107,10 @@ function Exercises($pagename, $auth){ |
|
|
|
|
foreach ($availableexercisetypes as $e) { |
|
|
|
|
$result .= " [[$pagename?action=Exercises&type=$e|$e]],"; |
|
|
|
|
} |
|
|
|
|
$result .= "."; |
|
|
|
|
} |
|
|
|
|
if ( $counter > 0) { |
|
|
|
|
$result .= " (note that it resets the counter)"; |
|
|
|
|
$result .= " or a [[$pagename?action=Exercises&type=random|random]] one."; |
|
|
|
|
if ( $counter > 0) { |
|
|
|
|
$result .= " (note that it resets the counter)"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
$renderedresult = MarkupToHTML($pagename, $result); |
|
|
|
|
print $renderedresult; |
|
|
|
|