本文整理汇总了PHP中Quiz::republish方法的典型用法代码示例。如果您正苦于以下问题:PHP Quiz::republish方法的具体用法?PHP Quiz::republish怎么用?PHP Quiz::republish使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Quiz
的用法示例。
在下文中一共展示了Quiz::republish方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Quiz
<?php
//----------------------------------------
// Publish the quiz
//----------------------------------------
require "../modules/quiz.php";
if (isset($_GET['id'])) {
$quiz = new Quiz($_GET['id']);
if ($quiz->exists()) {
$quiz_exist = true;
// check if member is owner of the quiz
if ($quiz->isOwner($member->id)) {
// set the quiz as published
$quiz->republish($member->id);
}
} else {
$quiz_exist = false;
}
} else {
$quiz_exist = false;
}
if ($quiz_exist) {
?>
<div class="framePanel rounded">
<h2 id="title_quiz_result">Quiz Updated!</h2>
<div class="content-container"><p>
You have successfully updated your quiz. Your quiz will now be available under the topic <?php
echo $quiz->category();
?>
. It will also turn up in search queries. You will continue to receive points when users take your quiz! Good luck!</p>
</div></div>