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


PHP Exercise::selectTitle方法代码示例

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


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

示例1:

    <input type="hidden" name="learnpath_item_id" 		value="<?php 
    echo $learnpath_item_id;
    ?>
" />
    <input type="hidden" name="learnpath_item_view_id"  value="<?php 
    echo $learnpath_item_view_id;
    ?>
" />
<?php 
}
$i = $total_score = $max_score = 0;
//We check if the user attempts before sending to the exercise_result.php
if ($objExercise->selectAttempts() > 0) {
    $attempt_count = Event::get_attempt_count(api_get_user_id(), $objExercise->id, $learnpath_id, $learnpath_item_id, $learnpath_item_view_id);
    if ($attempt_count >= $objExercise->selectAttempts()) {
        Display::display_warning_message(sprintf(get_lang('ReachedMaxAttempts'), $objExercise->selectTitle(), $objExercise->selectAttempts()), false);
        if ($origin != 'learnpath') {
            //we are not in learnpath tool
            Display::display_footer();
        }
        exit;
    }
}
$total_score = 0;
if (!empty($exercise_stat_info)) {
    $total_score = $exercise_stat_info['exe_result'];
}
$max_score = $objExercise->get_max_score();
Display::display_normal_message(get_lang('Saved') . '<br />', false);
// Display and save questions
ExerciseLib::display_question_list_by_attempt($objExercise, $exe_id, true);
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:exercise_result.php

示例2: Exercise

    $objExercise = $_SESSION['objExercise'][$exerciseId];
}
// if the object is not in the session
if (!isset($_SESSION['objExercise'][$exerciseId])) {
    // construction of Exercise
    $objExercise = new Exercise();
    // if the specified exercise doesn't exist or is disabled
    if (!$objExercise->read($exerciseId) && !$is_editor) {
        $tool_content .= $langExerciseNotFound;
        draw($tool_content, 2);
        exit;
    }
    // saves the object into the session
    $_SESSION['objExercise'][$exerciseId] = $objExercise;
}
$exerciseTitle = $objExercise->selectTitle();
$exerciseDescription = $objExercise->selectDescription();
$randomQuestions = $objExercise->isRandom();
$exerciseType = $objExercise->selectType();
$exerciseTimeConstraint = $objExercise->selectTimeConstraint();
$exerciseAllowedAttempts = $objExercise->selectAttemptsAllowed();
$eid_temp = $objExercise->selectId();
$recordStartDate = date("Y-m-d H:i:s", time());
$temp_CurrentDate = date("Y-m-d H:i");
$temp_StartDate = $objExercise->selectStartDate();
$temp_EndDate = $objExercise->selectEndDate();
$temp_StartDate = mktime(substr($temp_StartDate, 11, 2), substr($temp_StartDate, 14, 2), 0, substr($temp_StartDate, 5, 2), substr($temp_StartDate, 8, 2), substr($temp_StartDate, 0, 4));
$temp_EndDate = mktime(substr($temp_EndDate, 11, 2), substr($temp_EndDate, 14, 2), 0, substr($temp_EndDate, 5, 2), substr($temp_EndDate, 8, 2), substr($temp_EndDate, 0, 4));
$temp_CurrentDate = mktime(substr($temp_CurrentDate, 11, 2), substr($temp_CurrentDate, 14, 2), 0, substr($temp_CurrentDate, 5, 2), substr($temp_CurrentDate, 8, 2), substr($temp_CurrentDate, 0, 4));
if (!$is_editor) {
    $error = FALSE;
开发者ID:kostastzo,项目名称:openeclass,代码行数:31,代码来源:showExercise.php

示例3: array

        $pageName = $langNewQu;
        $navigation[] = array(
            'url' => (isset($exerciseId) ? "admin.php?course=$course_code&amp;exerciseId=$exerciseId" : "question_pool.php?course=$course_code&amp;exerciseId=0"), 
            'name' => (isset($exerciseId) ? $langExerciseManagement : $langQuestionPool)
            );
        include('statement_admin.inc.php');
    }
} elseif (isset($_GET['importIMSQTI'])) {
	$pageName = $langNewQu;
	$navigation[] = array(
	  'url' => (isset($exerciseId) ? "admin.php?course=$course_code&amp;exerciseId=$exerciseId" : "question_pool.php?course=$course_code&amp;exerciseId=0"), 
	  'name' => (isset($exerciseId) ? $langExerciseManagement : $langQuestionPool)
	);
	include('imsqti.inc.php');
} else {
    if (isset($_GET['NewExercise'])) {
        $pageName = $langNewEx;
    } elseif (isset($_GET['modifyExercise'])) {
        $pageName = $langInfoExercise;
        $navigation[] = array('url' => "admin.php?course=$course_code&amp;exerciseId=$exerciseId", 'name' => $langExerciseManagement);
    } else {
        $pageName = $objExercise->selectTitle();
    }
    include('exercise_admin.inc.php');
    if (!isset($_GET['NewExercise']) && !isset($_GET['modifyExercise'])) {
        include('question_list_admin.inc.php');
    }
}

draw($tool_content, 2, null, $head_content);
开发者ID:nikosv,项目名称:openeclass,代码行数:30,代码来源:admin.php

示例4: Answer

            $objAnswer = new Answer($question_id);
            include 'answer_admin.inc.php';
        } else {
            $pageName = $langInfoQuestion;
            $navigation[] = array('url' => isset($exerciseId) ? "admin.php?course={$course_code}&amp;exerciseId={$exerciseId}" : "question_pool.php?course={$course_code}&amp;exerciseId=0", 'name' => isset($exerciseId) ? $langExerciseManagement : $langQuestionPool);
            include 'statement_admin.inc.php';
        }
    } else {
        $pageName = $langNewQu;
        $navigation[] = array('url' => isset($exerciseId) ? "admin.php?course={$course_code}&amp;exerciseId={$exerciseId}" : "question_pool.php?course={$course_code}&amp;exerciseId=0", 'name' => isset($exerciseId) ? $langExerciseManagement : $langQuestionPool);
        include 'statement_admin.inc.php';
    }
} elseif (isset($_GET['importIMSQTI'])) {
    $pageName = $langNewQu;
    $navigation[] = array('url' => isset($exerciseId) ? "admin.php?course={$course_code}&amp;exerciseId={$exerciseId}" : "question_pool.php?course={$course_code}&amp;exerciseId=0", 'name' => isset($exerciseId) ? $langExerciseManagement : $langQuestionPool);
    include 'imsqti.inc.php';
} else {
    if (isset($_GET['NewExercise'])) {
        $pageName = $langNewEx;
    } elseif (isset($_GET['modifyExercise'])) {
        $pageName = $langInfoExercise;
        $navigation[] = array('url' => "admin.php?course={$course_code}&amp;exerciseId={$exerciseId}", 'name' => $langExerciseManagement);
    } else {
        $pageName = q($objExercise->selectTitle());
    }
    include 'exercise_admin.inc.php';
    if (!isset($_GET['NewExercise']) && !isset($_GET['modifyExercise'])) {
        include 'question_list_admin.inc.php';
    }
}
draw($tool_content, 2, null, $head_content);
开发者ID:kostastzo,项目名称:openeclass,代码行数:31,代码来源:admin.php

示例5: copy_exercise

 /**
  * Copies an exercise (duplicate all questions and answers)
  */
 public function copy_exercise()
 {
     $original_exercise = $this;
     $exercise_obj = new Exercise();
     $exercise_obj->setCategoriesGrouping(false);
     $exercise_obj->read($this->id);
     // force the creation of a new exercise
     $exercise_obj->updateTitle($exercise_obj->selectTitle() . ' - ' . get_lang('Copy'));
     //Hides the new exercise
     $exercise_obj->updateStatus(false);
     $exercise_obj->updateId(0);
     $exercise_obj->save();
     $exercise_obj->save_exercise_list_order($this->course['real_id'], api_get_session_id());
     $new_exercise_id = $exercise_obj->selectId();
     if ($new_exercise_id) {
         $original_exercise->copy_exercise_categories($exercise_obj);
         $question_list = $exercise_obj->getQuestionListWithMediasUncompressed();
         if (!empty($question_list)) {
             //Question creation
             foreach ($question_list as $old_question_id) {
                 $old_question_obj = Question::read($old_question_id);
                 $new_id = $old_question_obj->duplicate();
                 if ($new_id) {
                     $new_question_obj = Question::read($new_id);
                     if (isset($new_question_obj) && $new_question_obj) {
                         $new_question_obj->addToList($new_exercise_id);
                         // This should be moved to the duplicate function
                         $new_answer_obj = new Answer($old_question_id);
                         //$new_answer_obj->read();
                         $new_answer_obj->duplicate($new_id);
                     }
                 }
             }
         }
     }
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:39,代码来源:exercise.class.php


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