当前位置: 首页>>代码示例>>PHP>>正文


PHP Quiz::getAllQuizes方法代码示例

本文整理汇总了PHP中Quiz::getAllQuizes方法的典型用法代码示例。如果您正苦于以下问题:PHP Quiz::getAllQuizes方法的具体用法?PHP Quiz::getAllQuizes怎么用?PHP Quiz::getAllQuizes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Quiz的用法示例。


在下文中一共展示了Quiz::getAllQuizes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: doFilesMenu

function doFilesMenu()
{
    echo "<script>function confirmAction() { if (confirm(\"Voulez-vous vraiment réaliser cette opération ?\")) { document.file_operations_form.submit(); } }";
    echo "function onActionChange() {\n     selectedAction = document.getElementById(\"action\").options.selectedIndex;\n     if (selectedAction == 0) {\n     \tdocument.getElementById(\"dest_quiz_div\").style.display = \"none\";\n     \tdocument.getElementById(\"dest_folder_div\").style.display = \"block\";\n     } else if (selectedAction == 1) {\n        document.getElementById(\"dest_quiz_div\").style.display = \"block\";\n     \tdocument.getElementById(\"dest_folder_div\").style.display = \"block\";   \n     } else {\n        document.getElementById(\"dest_quiz_div\").style.display = \"none\";\n     \tdocument.getElementById(\"dest_folder_div\").style.display = \"none\"; \n     }\n   }";
    echo "</script>";
    echo "Avec les fichiers choisis: ";
    echo "<select id=\"action\" class=\"form_elem\" name=\"action\" onchange=\"onActionChange();\">";
    echo "<option value=\"move\">Déplacer dans un autre répertoire</option>";
    echo "<option value=\"move_to_another_quiz\">Déplacer dans un autre quiz</option>";
    echo "<option value=\"remove\">Supprimer</option>";
    echo "</select>";
    echo "<br><div id=\"dest_quiz_div\" style=\"display: none;\">Quiz destination : ";
    echo "<select id=\"dest_quiz\" class=\"form_elem\" name=\"dest_quiz\">";
    $quizes = Quiz::getAllQuizes();
    foreach ($quizes as $quiz_name => $quiz) {
        echo "<option value=\"" . $quiz->getId() . "\">" . $quiz->getName() . "</option>";
    }
    echo "</select></div>";
    echo "<div id=\"dest_folder_div\" style=\"display: block;\">Répertoire destination : ";
    echo "<select id=\"dest_folder\" class=\"form_elem\" name=\"dest_folder\">";
    echo "<option value=\"omr_input\">omr_input</option>";
    echo "<option value=\"omr_output\">omr_output</option>";
    echo "<option value=\"omr_errors\">omr_errors</option>";
    echo "<option value=\"correction\">correction</option>";
    // echo "<option value=\".\">base</option>";
    echo "</select></div><br>";
    echo "<button type=\"submit\" class=\"btn btn-primary\" onclick=\"confirmAction(); return false;\">Valider</button>";
}
开发者ID:CedricDinont,项目名称:PaperQuiz,代码行数:28,代码来源:view_files_common.php

示例2:

}
?>
</select>
</td><td style="border:0px;">
<button type="submit" class="btn btn-primary"><i class="icon-folder-open"></i> Go</button>
</td>
</tr>
</table>
</form>
</li>
<li>
<form action="quiz_workflow.php" class="form-horizontal" method="get">
Archives : <br/>
<select name="quiz-id" class="form_elem" id="old_quizes">
<?php 
$quizes = Quiz::getAllQuizes();
foreach ($quizes as $quiz_name => $quiz) {
    if ($quiz->getDate() < $max_date) {
        echo "<option value=\"" . $quiz->getId() . "\">" . $quiz->getName() . "</option>";
    }
}
?>
</select>
<button type="submit" class="btn btn-primary"><i class="icon-folder-open"></i> Go</button>
</li>
</ul>
</form>

</li>
</ul>
<?php 
开发者ID:CedricDinont,项目名称:PaperQuiz,代码行数:31,代码来源:index.php


注:本文中的Quiz::getAllQuizes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。