implement basic QuesttypeAgent ?Drag&Drop?
This commit is contained in:
parent
7e710ff0a4
commit
16a057f2fc
5 changed files with 306 additions and 0 deletions
17
questtypes/dragndrop/html/quest.tpl
Normal file
17
questtypes/dragndrop/html/quest.tpl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<form method="post">
|
||||
<div id="dnd" style="width:<?=$field['width']?>px; height:<?=$field['height']?>px; background-image:url('<?=$linker->link(array('media','index',$seminary['url'],$field['media']['url']))?>')">
|
||||
<?php foreach($drops as &$drop) : ?>
|
||||
<div id="drop<?=$drop['id']?>" style="position:absolute; width:<?=$drop['width']?>px; height:<?=$drop['height']?>px; margin:<?=$drop['top']?>px 0 0 <?=$drop['left']?>px;"></div>
|
||||
<input type="hidden" id="dnd_drop<?=$drop['id']?>" name="dnd[<?=$drop['id']?>]" value="" />
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<?php foreach($drags as &$drag) : ?>
|
||||
<img id="drag<?=$drag['id']?>" src="<?=$linker->link(array('media','index',$seminary['url'],$drag['media']['url']))?>" />
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<input type="submit" name="submit" value="<?=_('solve')?>" <?=($solved) ? 'disabled="disabled"' : '' ?> />
|
||||
</form>
|
||||
7
questtypes/dragndrop/html/submission.tpl
Normal file
7
questtypes/dragndrop/html/submission.tpl
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?php foreach($texts as $i => &$text) : ?>
|
||||
<?php if($i > 0) : ?>
|
||||
<span style="background-color:grey"><?=$regexs[$i-1]['answer']?></span>
|
||||
<?php if($regexs[$i-1]['right']) : ?>✓<?php else: ?>✕<?php endif ?>
|
||||
<?php endif ?>
|
||||
<?=\hhu\z\Utils::t($text)?>
|
||||
<?php endforeach ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue