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


PHP Question::getTitle方法代码示例

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


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

示例1: updateQuestion

 /**
  * @return int
  * @param Question $q
  */
 public static function updateQuestion($q)
 {
     $db = DB::getConn();
     $stm = $db->prepare('update Question set title=:title, category=:cate, point=:point, explain=:explain where id=:id');
     $stm->bindParam(':title', $q->getTitle());
     $stm->bindParam(':cate', $q->getCategory());
     $stm->bindParam(':point', $q->getPoint());
     $stm->bindParam(':explain', $q->getExplain());
     $stm->bindParam(':id', $q->getId());
     $stm->execute();
     return QuestionCtrl::getLastID();
 }
开发者ID:rmit-s3443163-quan-do,项目名称:its,代码行数:16,代码来源:QuestionCtrl.php

示例2: floor

        } else {
            $reminder = 26;
            $reminderChar = $alphas[$reminder];
            $floor = floor($numberColumns / 26);
            $floor--;
        }
        return divideBy26($floor) . $reminderChar;
    } else {
        return;
    }
}
// set sheets
foreach ($survey_questions as $survey_question_id) {
    $question = new Question();
    $question->get_from_db($survey_question_id);
    $question_title = $question->getTitle();
    $question_answers = $question->get_answers();
    // Add question title
    $objPHPExcel->setActiveSheetIndex($sheetId)->mergeCells('A1:N1');
    $objPHPExcel->setActiveSheetIndex($sheetId)->setCellValue('A1', $question_title);
    // list answers
    $columnId = 2;
    $alphabetIteration = 0;
    foreach ($question_answers as $question_answer_id) {
        $answer = new Answer();
        $answer->get_from_db($question_answer_id);
        $cell = divideBy26($columnId) . "2";
        $cell_value = $answer->getValue();
        // Add some data
        $objPHPExcel->setActiveSheetIndex($sheetId)->setCellValue($cell, $cell_value);
        $objPHPExcel->getActiveSheet()->getColumnDimension(divideBy26($columnId))->setWidth(15);
开发者ID:tttodorov13,项目名称:suSurvey,代码行数:31,代码来源:surveyReport.php

示例3: foreach

        </h4>
    </div>
    <?php 
$survey_questions = get_survey_questions($survey->getId());
if (!empty($survey_questions)) {
    ?>
        <div class="accordion">
            <?php 
    foreach ($survey_questions as $question_id) {
        $question = new Question();
        $question->get_from_db($question_id);
        if ($question->getType() == 1) {
            ?>
                </div>
                <h3 class="no-float ac"><?php 
            print_r($question->getTitle());
            ?>
</h3>
                <div class="al">
                    <?php 
            $answers = get_survey_answers($question->getId());
            foreach ($answers as $answer_id) {
                $answer = new Answer();
                $answer->get_from_db($answer_id);
                ?>
                        <p>&emsp;&emsp;&emsp;<?php 
                print_r($answer->getValue());
                ?>
</p>
                        <?php 
            }
开发者ID:tttodorov13,项目名称:suSurvey,代码行数:31,代码来源:survey.php

示例4: foreach

             if (!empty($rightCode) && !empty($leftCode)) {
                 if (isset($rowTitlePosition[$leftCode]) && isset($columnTitlePosition[$rightCode])) {
                     $results[$rowTitlePosition[$leftCode]][$columnTitlePosition[$rightCode]] = $trackedAnswer['nbr'];
                 }
             }
         }
     }
 }
 //-- DISPLAY (common)
 //-- display a resume of the selected question
 // several questions have to be shown on the page
 if (isset($questionIterator)) {
     $out .= '<tr class="headerX">' . "\n" . '<th>' . get_lang('Question') . ' ' . $questionIterator . '</th>' . "\n" . '</tr>' . "\n\n" . '<tr>' . '<td>' . "\n";
     $questionIterator++;
 }
 $out .= '<p><strong>' . $question->getTitle() . '</strong></p>' . "\n" . '<blockquote>' . $displayedStatement . '</blockquote>' . "\n\n" . '<center>';
 //-- DISPLAY (by question type)
 // prepare list to display
 if ($question->getType() == 'MCUA' || $question->getType() == 'MCMA') {
     // display tab header
     $out .= '<table class="claroTable emphaseLine" width="100%" border="0" cellspacing="2">' . "\n" . '<tr class="headerX" align="center" valign="top">' . "\n" . '<th>' . get_lang('Expected choice') . '</th>' . "\n" . '<th width="60%">' . get_lang('Answer') . '</th>' . "\n" . '<th colspan="2">#</th>' . "\n" . '</tr>' . "\n" . '<tbody>' . "\n\n";
     // display tab content
     foreach ($results as $result) {
         $out .= '<tr>' . "\n" . '<td align="center">';
         // expected choice image
         $out .= '<img src="';
         // choose image to display
         if ($question->getType() != 'MCMA') {
             if ($result['correct']) {
                 $out .= get_icon_url('radio_on') . '" alt="(X)"';
             } else {
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:track_questions.php


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