@ -329,7 +335,11 @@ function ExercisesCheck($pagename, $auth){
} else {
} else {
$result .="No, [[$sourcepage]] is not linked to [[$answer]] ";
$result .="No, [[$sourcepage]] is not linked to [[$answer]] ";
$result .="but $formattedlinks are. ";
$result .="but $formattedlinks are. ";
if ($counter > 0) $result .="\nIt means you are losing your $counter points.";
if ($counter > 0){
$result .="\nIt means you are losing your $counter points.";
// $halloffame = ExercisesResults();
// to add to $verbatimresult to motivate playing again
}
$result .="\n\nTry to redeem yourself by [[$pagename?action=Exercises&type=$type|trying another time]]. ";
$result .="\n\nTry to redeem yourself by [[$pagename?action=Exercises&type=$type|trying another time]]. ";
}
}
break;
break;
@ -350,6 +360,7 @@ function ExercisesCheck($pagename, $auth){
}
}
break;
break;
case "pagehasexpression":
case "pagehasexpression":
// XXX does not work
if ( md5($sourcepage) === $answer ) {
if ( md5($sourcepage) === $answer ) {
$result .="Excellent! [[$sourcepage]] indeed has that expression.";
$result .="Excellent! [[$sourcepage]] indeed has that expression.";
if ( $counter > 0) {
if ( $counter > 0) {
@ -381,13 +392,13 @@ function ExercisesCheck($pagename, $auth){
$result .="\n\nTry to redeem yourself by [[$pagename?action=Exercises&type=$type|trying another time]]. ";
$result .="\n\nTry to redeem yourself by [[$pagename?action=Exercises&type=$type|trying another time]]. ";
}
}
break;
break;
default:
default:
$result .= "Exercise type unknown, this most likely indicate that the checking for the solution has not yet been implemented, please consider notifying the author. For now try [[$pagename?action=Exercises&type=random|a random type of exercise]].";
$result .= "Exercise type unknown, this most likely indicate that the checking for the solution has not yet been implemented, please consider notifying the author. For now try [[$pagename?action=Exercises&type=random|a random type of exercise]].";
}
}
$result .= "\n\n%center%[-Generated by [[http://fabien.benetou.fr/MemoryRecalls/ImprovingPIM#PIMBasedExercises|PIM Based Exercises]].-]%%";
$result .= "\n\n%center%[-Generated by [[http://fabien.benetou.fr/MemoryRecalls/ImprovingPIM#PIMBasedExercises|PIM Based Exercises]].-]%%";