Example #1
0
            $answerinput = "<input type=\"text\" name=\"a{$card->id}\" value=\"{$text}\" style=\"width: 300px\" />";
            $answerinput .= "<br/>";
            $answerinput .= poodllflashcard_play_sound($flashcard, $card->answertext, 'false', true);
            $answerinput .= "&nbsp;<input type=\"button\" value=\"{$strselect}\" onClick=\"window.open('{$CFG->wwwroot}/files/index.php?id={$COURSE->id}&amp;choose=editcard.a{$card->id}&amp;wdir=/moddata/poodllflashcard/{$flashcard->id}', '_blank', 'width=750,height=480,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=1')\" />";
        } elseif ($flashcard->answersmediatype == FLASHCARD_MEDIA_IMAGE_AND_SOUND) {
            if (empty($card->answertext)) {
                $card->answertext = '@';
            }
            list($image, $sound) = split('@', htmlspecialchars($card->answertext));
            $answerinput = "<input type=\"text\" name=\"i{$card->id}\" value=\"{$image}\" style=\"width: 300px\" />";
            $answerinput .= "<br/>";
            $answerinput .= poodllflashcard_print_image($flashcard, $image, true);
            $answerinput .= "&nbsp;<input type=\"button\" value=\"{$strselect}\" onClick=\"window.open('{$CFG->wwwroot}/files/index.php?id={$COURSE->id}&amp;choose=editcard.i{$card->id}&amp;wdir=/moddata/poodllflashcard/{$flashcard->id}', '_blank', 'width=750,height=480,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=1')\" />";
            $answerinput .= "<br/><input type=\"text\" name=\"s{$card->id}\" value=\"{$sound}\" style=\"width: 300px\" />";
            $answerinput .= "<br/>";
            $answerinput .= poodllflashcard_play_sound($flashcard, $sound, 'false', true);
            $answerinput .= "&nbsp;<input type=\"button\" value=\"{$strselect}\" onClick=\"window.open('{$CFG->wwwroot}/files/index.php?id={$COURSE->id}&amp;choose=editcard.s{$card->id}&amp;wdir=/moddata/poodllflashcard/{$flashcard->id}', '_blank', 'width=750,height=480,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=1')\" />";
        } else {
            $answerinput = "<textarea name=\"a{$card->id}\" style=\"width: 100%\" rows=\"3\">{$text}</textarea>";
        }
        $commands = "<a href=\"view.php?id={$cm->id}&amp;what=delete&amp;items={$card->id}&amp;view=edit\"><img src=\"{$CFG->pixpath}/t/delete.gif\" /></a>";
        $table->data[] = array($checkbox, $i, $questioninput, $answerinput, $commands);
        $i++;
    }
}
?>
<center>
<div style="width: 90%">
<form name="editcard" method="POST" action="view.php">
<input type="hidden" name="what" value="save" />
<input type="hidden" name="id" value="<?php 
Example #2
0
    echo "<div id=\"b{$i}\" style=\"display: none\" class=\"frontside\"";
    echo " onclick=\"javascript:clicked('b', '{$i}')\">";
    ?>
    		<table class="flashcard_answer" width="100%" height="100%">
    		    <tr>
    		        <td align="center" valign="center" style="">
    		            <?php 
    if ($flashcard->answersmediatype == FLASHCARD_MEDIA_IMAGE) {
        poodllflashcard_print_image($flashcard, $subquestion->answertext);
    } elseif ($flashcard->answersmediatype == FLASHCARD_MEDIA_SOUND) {
        poodllflashcard_play_sound($flashcard, $subquestion->answertext, 'false', false, "bell_b{$i}");
    } elseif ($flashcard->answersmediatype == FLASHCARD_MEDIA_IMAGE_AND_SOUND) {
        list($image, $sound) = split('@', $subquestion->answertext);
        poodllflashcard_print_image($flashcard, $image);
        echo "<br/>";
        poodllflashcard_play_sound($flashcard, $sound, 'false', false, "bell_b{$i}");
    } else {
        echo format_string($subquestion->answertext);
    }
    ?>
    		        </td>
    		    </tr>
    		</table>
    		</div>
    		</center>
<?php 
    $i++;
}
?>
            <center>
            <div id="finished" style="display: none;" class="finished">