[svn r18549] Logic change - Fixed difficulty of the question lost - see FS#3659

skala
Cristian Fasanando 16 years ago
parent 3d9f792a8b
commit e265e442ed
  1. 1
      documentation/changelog.html
  2. 4
      main/coursecopy/classes/CourseBuilder.class.php
  3. 6
      main/coursecopy/classes/CourseRestorer.class.php
  4. 9
      main/coursecopy/classes/QuizQuestion.class.php

@ -169,6 +169,7 @@
<li>Fixed qualification of themes into forum tool - see FS#3609</li> <li>Fixed qualification of themes into forum tool - see FS#3609</li>
<li>allow show results with floating point,in exercice tool - (partial FS#3630) - SVN#18367</li> <li>allow show results with floating point,in exercice tool - (partial FS#3630) - SVN#18367</li>
<li>Fixed event into agenda when it's sent from assignment and Improved display form when you create an assignment - see FS#3583</li> <li>Fixed event into agenda when it's sent from assignment and Improved display form when you create an assignment - see FS#3583</li>
<li>Fixed difficulty of the question lost - see FS#3659</li>
</ul> </ul>
<br /> <br />
<h3>CSS changes</h3> <h3>CSS changes</h3>

@ -1,4 +1,4 @@
<?php // $Id: CourseBuilder.class.php 17726 2009-01-14 21:42:50Z juliomontoya $ <?php // $Id: CourseBuilder.class.php 18549 2009-02-17 18:08:58Z cfasanando $
/* /*
============================================================================== ==============================================================================
Dokeos - elearning and course management software Dokeos - elearning and course management software
@ -290,7 +290,7 @@ class CourseBuilder
$db_result = api_sql_query($sql, __FILE__, __LINE__); $db_result = api_sql_query($sql, __FILE__, __LINE__);
while ($obj = Database::fetch_object($db_result)) while ($obj = Database::fetch_object($db_result))
{ {
$question = new QuizQuestion($obj->id, $obj->question, $obj->description, $obj->ponderation, $obj->type, $obj->position, $obj->picture); $question = new QuizQuestion($obj->id, $obj->question, $obj->description, $obj->ponderation, $obj->type, $obj->position, $obj->picture,$obj->level);
$sql = 'SELECT * FROM '.$table_ans.' WHERE question_id = '.$obj->id; $sql = 'SELECT * FROM '.$table_ans.' WHERE question_id = '.$obj->id;
$db_result2 = api_sql_query($sql, __FILE__, __LINE__); $db_result2 = api_sql_query($sql, __FILE__, __LINE__);
while ($obj2 = Database::fetch_object($db_result2)) while ($obj2 = Database::fetch_object($db_result2))

@ -1,4 +1,4 @@
<?php // $Id: CourseRestorer.class.php 17440 2008-12-23 20:21:04Z iflorespaz $ <?php // $Id: CourseRestorer.class.php 18549 2009-02-17 18:08:58Z cfasanando $
/* /*
============================================================================== ==============================================================================
Dokeos - elearning and course management software Dokeos - elearning and course management software
@ -632,7 +632,7 @@ class CourseRestorer
} }
$table_que = Database :: get_course_table(TABLE_QUIZ_QUESTION, $this->course->destination_db); $table_que = Database :: get_course_table(TABLE_QUIZ_QUESTION, $this->course->destination_db);
$table_ans = Database :: get_course_table(TABLE_QUIZ_ANSWER, $this->course->destination_db); $table_ans = Database :: get_course_table(TABLE_QUIZ_ANSWER, $this->course->destination_db);
$sql = "INSERT INTO ".$table_que." SET question = '".addslashes($question->question)."', description = '".addslashes($question->description)."', ponderation = '".addslashes($question->ponderation)."', position = '".addslashes($question->position)."', type='".addslashes($question->quiz_type)."', picture='".addslashes($question->picture)."'"; $sql = "INSERT INTO ".$table_que." SET question = '".addslashes($question->question)."', description = '".addslashes($question->description)."', ponderation = '".addslashes($question->ponderation)."', position = '".addslashes($question->position)."', type='".addslashes($question->quiz_type)."', picture='".addslashes($question->picture)."', level='".addslashes($question->level)."'";
api_sql_query($sql, __FILE__, __LINE__); api_sql_query($sql, __FILE__, __LINE__);
$new_id = Database::get_last_insert_id(); $new_id = Database::get_last_insert_id();
foreach ($question->answers as $index => $answer) foreach ($question->answers as $index => $answer)
@ -751,7 +751,7 @@ class CourseRestorer
// getting the information of the survey (used for when the survey is shared) // getting the information of the survey (used for when the survey is shared)
require_once(api_get_path(SYS_CODE_PATH).'survey/survey.lib.php'); require_once(api_get_path(SYS_CODE_PATH).'survey/survey.lib.php');
$sql_select_existing_survey = "SELECT * FROM $table_sur WHERE survey_id='".Database::escape_string(mysql_result($result_check,0,0))."'"; $sql_select_existing_survey = "SELECT * FROM $table_sur WHERE survey_id='".Database::escape_string(Database::result($result_check,0,0))."'";
$result = api_sql_query($sql_select_existing_survey, __FILE__, __LINE__); $result = api_sql_query($sql_select_existing_survey, __FILE__, __LINE__);
$survey_data = Database::fetch_array($result,'ASSOC'); $survey_data = Database::fetch_array($result,'ASSOC');

@ -1,4 +1,4 @@
<?php // $Id: QuizQuestion.class.php 13306 2007-09-27 07:16:52Z yannoo $ <?php // $Id: QuizQuestion.class.php 18549 2009-02-17 18:08:58Z cfasanando $
/* /*
============================================================================== ==============================================================================
Dokeos - elearning and course management software Dokeos - elearning and course management software
@ -50,6 +50,10 @@ class QuizQuestion extends Resource
* Position * Position
*/ */
var $position; var $position;
/**
* Level
*/
var $level;
/** /**
* Answers * Answers
*/ */
@ -62,7 +66,7 @@ class QuizQuestion extends Resource
* @param int $type * @param int $type
* @param int $position * @param int $position
*/ */
function QuizQuestion($id,$question,$description,$ponderation,$type,$position,$picture) function QuizQuestion($id,$question,$description,$ponderation,$type,$position,$picture,$level)
{ {
parent::Resource($id,RESOURCE_QUIZQUESTION); parent::Resource($id,RESOURCE_QUIZQUESTION);
$this->question = $question; $this->question = $question;
@ -71,6 +75,7 @@ class QuizQuestion extends Resource
$this->quiz_type = $type; $this->quiz_type = $type;
$this->position = $position; $this->position = $position;
$this->picture = $picture; $this->picture = $picture;
$this->level = $level;
$this->answers = array(); $this->answers = array();
} }
/** /**

Loading…
Cancel
Save