iflores 15 years ago
parent
commit
ad76fd670d

+ 1 - 1
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);
 		}
 	}

+ 7 - 2
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 <florespaz_isaac@hotmail.com>
 	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

+ 1 - 2
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();
 			}