function hangman_onincorrect($id, $wordline, $word, $game, $attempt, $hangman, $onlyshow, $showsolution) { echo "\r\n<br/><br/><font size=\"5\">\n{$wordline}</font>\r\n"; if ($onlyshow or $showsolution) { return; } echo '<p><BR/><font size="5" color="red">' . get_string('hangman_loose', 'game') . '</font><BR/><BR/></p>'; if ($game->param6) { // Show the correct answer. if (game_strpos($word, ' ') != false) { echo '<br/>' . get_string('hangman_correct_phrase', 'game'); } else { echo '<br/>' . get_string('hangman_correct_word', 'game'); } echo '<B>' . $word . "</B><BR/><BR/>\r\n"; } game_hangman_show_nextword($id, $game, $attempt, $hangman, true); }
function hangman_oninncorrect($id, $word_line, $word, $game, $attempt, $hangman) { $textlib = textlib_get_instance(); echo "\r\n<BR/><BR/><font size=\"5\">\n{$word_line}</font>\r\n"; echo '<p><BR/><font size="5" color="red">' . get_string('hangman_loose', 'game') . '</font><BR/><BR/></p>'; if ($game->param6) { //show the correct answer if ($textlib->strpos($word, ' ') != false) { echo '<br/>' . get_string('hangman_correct_phrase', 'game'); } else { echo '<br/>' . get_string('hangman_correct_word', 'game'); } echo '<B>' . $word . "</B><BR/><BR/>\r\n"; } game_hangman_show_nextword($id, $game, $attempt, $hangman, true); }