|
|
|
@ -126,6 +126,11 @@ $default_description_title_editable[7] = true; |
|
|
|
MAIN CODE |
|
|
|
MAIN CODE |
|
|
|
============================================================================== |
|
|
|
============================================================================== |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
$sql = "SELECT id,title FROM $tbl_course_description ORDER BY id"; |
|
|
|
|
|
|
|
$result = api_sql_query($sql, __FILE__, __LINE__); |
|
|
|
|
|
|
|
while ($row = Database::fetch_array($result)) { |
|
|
|
|
|
|
|
$default_description_titles[$row['id']] = $row['title']; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (api_is_allowed_to_edit() && !is_null($description_id) || $action =='add') { |
|
|
|
if (api_is_allowed_to_edit() && !is_null($description_id) || $action =='add') { |
|
|
|
$description_id = intval($description_id); |
|
|
|
$description_id = intval($description_id); |
|
|
|
@ -270,9 +275,11 @@ if (api_is_allowed_to_edit() && !is_null($description_id) || $action =='add') { |
|
|
|
if ($show_description_list) { |
|
|
|
if ($show_description_list) { |
|
|
|
$sql = "SELECT * FROM $tbl_course_description ORDER BY id"; |
|
|
|
$sql = "SELECT * FROM $tbl_course_description ORDER BY id"; |
|
|
|
$result = api_sql_query($sql, __FILE__, __LINE__); |
|
|
|
$result = api_sql_query($sql, __FILE__, __LINE__); |
|
|
|
$descriptions; |
|
|
|
$descriptions = array();; |
|
|
|
while ($description = Database::fetch_object($result)) { |
|
|
|
while ($description = Database::fetch_object($result)) { |
|
|
|
$descriptions[$description->id] = $description; |
|
|
|
$descriptions[$description->id] = $description; |
|
|
|
|
|
|
|
//reload titles to ensure we have the last version (after edition) |
|
|
|
|
|
|
|
$default_description_titles[$description->id] = $description->title; |
|
|
|
} |
|
|
|
} |
|
|
|
if (api_is_allowed_to_edit()) { |
|
|
|
if (api_is_allowed_to_edit()) { |
|
|
|
$categories = array (); |
|
|
|
$categories = array (); |
|
|
|
|