diff --git a/main/coursecopy/classes/CourseBuilder.class.php b/main/coursecopy/classes/CourseBuilder.class.php index 25e1501f41..405513c1ee 100644 --- a/main/coursecopy/classes/CourseBuilder.class.php +++ b/main/coursecopy/classes/CourseBuilder.class.php @@ -534,7 +534,7 @@ class CourseBuilder $db_result = Database::query($sql, __FILE__, __LINE__); while ($obj = Database::fetch_object($db_result)) { - $cd = new CourseDescription($obj->id, $obj->title, $obj->content); + $cd = new CourseDescription($obj->id, $obj->title, $obj->content, $obj->description_type); $this->course->add_resource($cd); } } diff --git a/main/coursecopy/classes/CourseDescription.class.php b/main/coursecopy/classes/CourseDescription.class.php index d621a5b366..e597f9c3d0 100644 --- a/main/coursecopy/classes/CourseDescription.class.php +++ b/main/coursecopy/classes/CourseDescription.class.php @@ -7,7 +7,7 @@ Copyright (c) 2003 Ghent University (UGent) Copyright (c) 2001 Universite catholique de Louvain (UCL) Copyright (c) Bart Mollet (bart.mollet@hogent.be) - + Copyright (c) Isaac flores For a full list of contributors, see "credits.txt". The full license can be read in "license.txt". @@ -39,17 +39,22 @@ class CourseDescription extends Resource * The content */ var $content; + /** + * The description type + */ + var $description_type; /** * Create a new course description * @param int $id * @param string $title * @param string $content */ - function CourseDescription($id,$title,$content) + function CourseDescription($id,$title,$content,$description_type) { parent::Resource($id,RESOURCE_COURSEDESCRIPTION); $this->title = $title; $this->content = $content; + $this->description_type = $description_type; } /** * Show this Event diff --git a/main/coursecopy/classes/CourseRestorer.class.php b/main/coursecopy/classes/CourseRestorer.class.php index 977ee9431c..86e1997c31 100644 --- a/main/coursecopy/classes/CourseRestorer.class.php +++ b/main/coursecopy/classes/CourseRestorer.class.php @@ -748,8 +748,7 @@ class CourseRestorer $session_id = intval($session_id); $condition_session = " , session_id = '$session_id' "; } - - $sql = "INSERT INTO ".$table." SET title = '".Database::escape_string($cd->title)."', content = '".Database::escape_string($description_content)."' $condition_session"; + $sql = "INSERT INTO ".$table." SET description_type = '".Database::escape_string($cd->description_type)."',title = '".Database::escape_string($cd->title)."', content = '".Database::escape_string($description_content)."' $condition_session"; Database::query($sql, __FILE__, __LINE__); $this->course->resources[RESOURCE_COURSEDESCRIPTION][$id]->destination_id = Database::insert_id(); }