當前位置: 首頁>>代碼示例>>PHP>>正文


PHP assQuestion::syncWithOriginal方法代碼示例

本文整理匯總了PHP中assQuestion::syncWithOriginal方法的典型用法代碼示例。如果您正苦於以下問題:PHP assQuestion::syncWithOriginal方法的具體用法?PHP assQuestion::syncWithOriginal怎麽用?PHP assQuestion::syncWithOriginal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在assQuestion的用法示例。


在下文中一共展示了assQuestion::syncWithOriginal方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: syncWithOriginal

 function syncWithOriginal()
 {
     if ($this->getOriginalId()) {
         parent::syncWithOriginal();
     }
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:6,代碼來源:class.assImagemapQuestion.php

示例2: syncWithOriginal

 function syncWithOriginal()
 {
     global $ilDB;
     if ($this->original_id) {
         $complete = 0;
         if ($this->isComplete()) {
             $complete = 1;
         }
         $estw_time = $this->getEstimatedWorkingTime();
         $estw_time = sprintf("%02d:%02d:%02d", $estw_time['h'], $estw_time['m'], $estw_time['s']);
         $query = sprintf("UPDATE qpl_questions SET obj_fi = %s, title = %s, description = %s, author = %s, question_text = %s, points = %s, working_time=%s, complete = %s WHERE question_id = %s", $ilDB->quote($this->obj_id . ""), $ilDB->quote($this->title . ""), $ilDB->quote($this->comment . ""), $ilDB->quote($this->author . ""), $ilDB->quote($this->question . ""), $ilDB->quote($this->getMaximumPoints() . ""), $ilDB->quote($estw_time . ""), $ilDB->quote($complete . ""), $ilDB->quote($this->original_id . ""));
         $result = $ilDB->query($query);
         $query = sprintf("UPDATE il_qpl_qst_st_quest SET textgap_rating = %s, correctanswers = %s WHERE question_fi = %s", $ilDB->quote($this->getTextRating() . ""), $ilDB->quote($this->getCorrectAnswers() . ""), $ilDB->quote($this->original_id . ""));
         $result = $ilDB->query($query);
         if (PEAR::isError($result)) {
             global $ilias;
             $ilias->raiseError($result->getMessage());
         } else {
             // Write Ranges to the database
             // 1. delete old ranges
             $query = sprintf("DELETE FROM il_qpl_qst_st_answer WHERE question_fi = %s", $ilDB->quote($this->original_id));
             $result = $ilDB->query($query);
             // 2. write ranges
             foreach ($this->answers as $key => $value) {
                 $answer_obj = $this->answers[$key];
                 $query = sprintf("INSERT INTO il_qpl_qst_st_answer (answer_id, question_fi, answertext, points, aorder) VALUES (NULL, %s, %s, %s, %s)", $ilDB->quote($this->original_id . ""), $ilDB->quote($answer_obj->getAnswertext() . ""), $ilDB->quote($answer_obj->getPoints() . ""), $ilDB->quote($answer_obj->getOrder() . ""));
                 $answer_result = $ilDB->query($query);
             }
         }
         parent::syncWithOriginal();
     }
 }
開發者ID:prometoys,項目名稱:fourtree,代碼行數:32,代碼來源:class.SyntaxTree.php

示例3: syncWithOriginal

 function syncWithOriginal()
 {
     if ($this->getOriginalId()) {
         $this->syncImages();
         parent::syncWithOriginal();
     }
 }
開發者ID:Walid-Synakene,項目名稱:ilias,代碼行數:7,代碼來源:class.assSingleChoice.php

示例4: syncWithOriginal

 function syncWithOriginal()
 {
     if ($this->getOriginalId()) {
         parent::syncWithOriginal();
         $this->syncFeedbackSingleAnswers();
     }
 }
開發者ID:khanhnnvn,項目名稱:ilias_E-learning,代碼行數:7,代碼來源:class.assImagemapQuestion.php


注:本文中的assQuestion::syncWithOriginal方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。