当前位置: 首页>>代码示例>>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;未经允许,请勿转载。