set accepted mimetypes and required-flag for file uploads for Questtype ?Submit?

This commit is contained in:
coderkun 2014-04-05 13:31:55 +02:00
commit d63cf04908

View file

@ -13,7 +13,7 @@
<?php endif ?>
<?php if(is_null($submission)) : ?>
<form method="post" enctype="multipart/form-data">
<input type="file" name="answers" /><br />
<input type="file" name="answers" required="required" accept="<?=implode(',', array_map(function($m) { return $m['mimetype']; }, $mimetypes))?>" /><br />
<?=_('Allowed file types')?>:
<ul>
<?php foreach($mimetypes as &$mimetype) : ?>