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


PHP Exercise::getShuffle方法代码示例

本文整理汇总了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;
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:edit_exercise.php

示例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':
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:exercise.php


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