?> )" class="flashcard-answer" onclick="javascript:togglecard()"> <?php if ($flashcard->answersmediatype == FLASHCARD_MEDIA_IMAGE) { // flashcard_print_image($flashcard, $subquestion->answertext); flashcard_print_image($flashcard, "{$front}imagefile/{$subquestion->id}"); } elseif ($flashcard->answersmediatype == FLASHCARD_MEDIA_SOUND) { // flashcard_play_sound($flashcard, $subquestion->answertext, $autoplay, false, 'bell_a'); flashcard_play_sound($flashcard, "{$front}soundfile/{$subquestion->id}", $autoplay, false, 'bell_a'); } elseif ($flashcard->answersmediatype == FLASHCARD_MEDIA_VIDEO) { // flashcard_play_video($flashcard, $subquestion->answertext, $autoplay, false, 'bell_a'); flashcard_play_video($flashcard, "{$front}videofile/{$subquestion->id}", $autoplay, false, 'bell_a'); } elseif ($flashcard->answersmediatype == FLASHCARD_MEDIA_IMAGE_AND_SOUND) { // list($image, $sound) = split('@', $subquestion->answertext); // flashcard_print_image($flashcard, $image); flashcard_print_image($flashcard, "{$front}imagefile/{$subquestion->id}"); echo "<br/>"; // flashcard_play_sound($flashcard, $sound, $autoplay, false, 'bell_a'); flashcard_play_sound($flashcard, "{$front}soundfile/{$subquestion->id}", $autoplay, false, 'bell_a'); } else { echo format_text($subquestion->answertext, FORMAT_HTML); } ?> </div> <div id="flashcard_controls"> <p><?php print_string('cardsremaining', 'flashcard'); ?> : <span id="remain"><?php echo count($subquestions); ?>
</tr> </table> </div> <div id="answerdiv" style="display: none" class="frontside" onclick="javascript:togglecard()"> <table class="flashcard_answer" width="100%" height="100%"> <tr> <td align="center" valign="center" style=""> <?php if ($flashcard->answersmediatype == FLASHCARD_MEDIA_IMAGE) { flashcard_print_image($flashcard, $subquestion->answertext); } elseif ($flashcard->answersmediatype == FLASHCARD_MEDIA_SOUND) { flashcard_play_sound($flashcard, $subquestion->answertext, 'false', false, 'bell_a'); } elseif ($flashcard->answersmediatype == FLASHCARD_MEDIA_IMAGE_AND_SOUND) { list($image, $sound) = split('@', $subquestion->answertext); flashcard_print_image($flashcard, $image); echo "<br/>"; flashcard_play_sound($flashcard, $sound, 'false', false, 'bell_a'); } else { echo format_string($subquestion->answertext); } ?> </td> </tr> </table> </div> </center> </td> </tr> <tr>
} else { $back = format_text($card->questiontext, FORMAT_MOODLE); } if ($flashcard->answersmediatype == FLASHCARD_MEDIA_IMAGE) { // $front = flashcard_print_image($flashcard, $card->answertext, true); $front = flashcard_print_image($flashcard, "answerimagefile/{$card->id}", true); } elseif ($flashcard->answersmediatype == FLASHCARD_MEDIA_SOUND) { // $front = flashcard_play_sound($flashcard, $card->answertext, 'false', true, "bell_f$i"); $front = flashcard_play_sound($flashcard, "answersoundfile/{$card->id}", 'false', true, "bell_f{$i}"); } elseif ($flashcard->answersmediatype == FLASHCARD_MEDIA_VIDEO) { // $front = flashcard_play_sound($flashcard, $card->answertext, 'false', true, "bell_f$i"); $front = flashcard_play_video($flashcard, "answervideofile/{$card->id}", 'false', true, "bell_f{$i}"); } elseif ($flashcard->answersmediatype == FLASHCARD_MEDIA_IMAGE_AND_SOUND) { // list($image, $sound) = split('@', $card->answertext); // $front = flashcard_print_image($flashcard, $image, true); $front = flashcard_print_image($flashcard, "answerimagefile/{$card->id}", true); $front .= "<br/>"; // $front .= flashcard_play_sound($flashcard, $sound, 'false', true, "bell_f$i"); $front = flashcard_play_sound($flashcard, "answersoundfile/{$card->id}", 'false', true, "bell_f{$i}"); } else { $front = format_text($card->answertext, FORMAT_MOODLE); } $command = "<a href=\"{$editurl}&what=update&cardid={$card->id}\"><img src=\"" . $OUTPUT->pix_url('t/edit') . '" /></a>'; $command .= " <a href=\"{$url}?id={$id}&view=manage&what=delete&items[]={$card->id}\"><img src=\"" . $OUTPUT->pix_url('t/delete') . '" /></a>'; $table->data[] = array($check, $back, $front, $command); $i++; } echo '<center>'; echo $OUTPUT->paging_bar($allcards, $page, $pagesize, $url . '?id=' . $id . '&view=manage', 'page'); echo '</center>'; echo '<form name="deletecards" action="' . $url . '" method="get">';