|
|
|
@ -1,17 +1,5 @@ |
|
|
|
|
<?php |
|
|
|
|
/** |
|
|
|
|
* Chamilo LMS |
|
|
|
|
* |
|
|
|
|
* For a full list of contributors, see "credits.txt". |
|
|
|
|
* The full license can be read in "license.txt". |
|
|
|
|
* |
|
|
|
|
* This program is free software; you can redistribute it and/or |
|
|
|
|
* modify it under the terms of the GNU General Public License |
|
|
|
|
* as published by the Free Software Foundation; either version 2 |
|
|
|
|
* of the License, or (at your option) any later version. |
|
|
|
|
* |
|
|
|
|
* See the GNU General Public License for more details. |
|
|
|
|
*/ |
|
|
|
|
/* For licensing terms, see /license.txt */ |
|
|
|
|
|
|
|
|
|
// Setting the encoding to UTF-8. |
|
|
|
|
header('Content-Type: text/xml; charset=utf-8'); |
|
|
|
@ -204,16 +192,16 @@ function load_personal_templates($user_id = 0) { |
|
|
|
|
|
|
|
|
|
$table_template = Database::get_main_table(TABLE_MAIN_TEMPLATES); |
|
|
|
|
$table_document = Database::get_course_table(TABLE_DOCUMENT); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$course_id = api_get_course_int_id(); |
|
|
|
|
|
|
|
|
|
// The sql statement for getting all the user defined templates |
|
|
|
|
$sql = "SELECT template.id, template.title, template.description, template.image, template.ref_doc, document.path |
|
|
|
|
FROM ".$table_template." template, ".$table_document." document |
|
|
|
|
WHERE |
|
|
|
|
user_id='".Database::escape_string($user_id)."' AND |
|
|
|
|
WHERE |
|
|
|
|
user_id='".Database::escape_string($user_id)."' AND |
|
|
|
|
course_code='".Database::escape_string(api_get_course_id())."' AND |
|
|
|
|
document.c_id = $course_id AND |
|
|
|
|
document.c_id = $course_id AND |
|
|
|
|
document.id = template.ref_doc"; |
|
|
|
|
|
|
|
|
|
$result_template = Database::query($sql); |
|
|
|
@ -252,7 +240,7 @@ function load_empty_template() { |
|
|
|
|
<![CDATA[ |
|
|
|
|
<html> |
|
|
|
|
<head> |
|
|
|
|
<meta charset="<?php echo api_get_system_encoding(); ?>" />
|
|
|
|
|
<meta charset="<?php echo api_get_system_encoding(); ?>" />
|
|
|
|
|
</head> |
|
|
|
|
<body dir="<?php echo api_get_text_direction(); ?>">
|
|
|
|
|
</body> |
|
|
|
|