本文整理汇总了PHP中Exercise::getShuffle方法的典型用法代码示例。如果您正苦于以下问题:PHP Exercise::getShuffle方法的具体用法?PHP Exercise::getShuffle怎么用?PHP Exercise::getShuffle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Exercise
的用法示例。
在下文中一共展示了Exercise::getShuffle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$cmd = 'rqEdit';
}
} else {
if (claro_failure::get_last_failure() == 'exercise_no_title') {
$dialogBox->error(get_lang('Field \'%name\' is required', array('%name' => get_lang('Title'))));
} elseif (claro_failure::get_last_failure() == 'exercise_incorrect_dates') {
$dialogBox->error(get_lang('Start date must be before end date ...'));
}
$cmd = 'rqEdit';
}
}
if ($cmd == 'rqEdit') {
$form['title'] = $exercise->getTitle();
$form['description'] = $exercise->getDescription();
$form['displayType'] = $exercise->getDisplayType();
$form['randomize'] = (bool) $exercise->getShuffle() > 0;
$form['questionDrawn'] = $exercise->getShuffle();
$form['useSameShuffle'] = (bool) $exercise->getUseSameShuffle();
$form['showAnswers'] = $exercise->getShowAnswers();
$form['startDate'] = $exercise->getStartDate();
// unix
if (is_null($exercise->getEndDate())) {
$form['useEndDate'] = false;
$form['endDate'] = 0;
} else {
$form['useEndDate'] = true;
$form['endDate'] = $exercise->getEndDate();
}
$form['useTimeLimit'] = (bool) $exercise->getTimeLimit();
$form['timeLimitSec'] = $exercise->getTimeLimit() % 60;
$form['timeLimitMin'] = ($exercise->getTimeLimit() - $form['timeLimitSec']) / 60;
示例2: Exercise
$htmlcontent .= "</table>\n";
$htmlcontent .= "</section>\n";
Claroline::getDisplay()->body->appendContent($htmlcontent);
$i++;
}
Claroline::getDisplay()->body->appendContent('</article>' . "\n");
//Close and output PDF document
echo Claroline::getDisplay()->render();
exit;
}
//-- export pdf
if ($cmd == 'exExportPDF' && $exId) {
require_once './lib/question.class.php';
$exercise = new Exercise();
$exercise->load($exId);
if ($exercise->getShuffle() && isset($_REQUEST['shuffle']) && $_REQUEST['shuffle'] == 1) {
$questionList = $exercise->getRandomQuestionList();
} else {
$questionList = $exercise->getQuestionList();
}
foreach ($questionList as $_id => $question) {
$questionObj = new Question();
$questionObj->setExerciseId($exId);
if ($questionObj->load($question['id'])) {
$questionList[$_id]['description'] = $questionObj->getDescription();
$questionList[$_id]['attachment'] = $questionObj->getAttachment();
if (!empty($questionList[$_id]['attachment'])) {
$questionList[$_id]['attachmentURL'] = get_conf('rootWeb') . 'courses/' . claro_get_current_course_id() . '/exercise/question_' . $questionObj->getId() . '/' . $questionObj->getAttachment();
}
switch ($questionObj->getType()) {
case 'MCUA':