?> </div> <div id="answerdiv" style="display:none;background-repeat:no-repeat;background-image:url(<?php echo flashcard_print_custom_url($flashcard, 'customfront', 0); ?> )" 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');
$back = flashcard_print_image($flashcard, "questionimagefile/{$card->id}", true); $back .= "<br/>"; // $back .= flashcard_play_sound($flashcard, $sound, 'false', true, "bell_f$i"); $back = flashcard_play_sound($flashcard, "questionsoundfile/{$card->id}", 'false', true, "bell_b{$i}"); } 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++; }