|
|
|
@ -126,8 +126,11 @@ class CourseDescription |
|
|
|
|
* @param int session id (optional) |
|
|
|
|
* @return array |
|
|
|
|
*/ |
|
|
|
|
public function get_data_by_description_type($description_type, $course_code = '', $session_id = null) |
|
|
|
|
{ |
|
|
|
|
public function get_data_by_description_type( |
|
|
|
|
$description_type, |
|
|
|
|
$course_code = '', |
|
|
|
|
$session_id = null |
|
|
|
|
) { |
|
|
|
|
$tbl_course_description = Database::get_course_table(TABLE_COURSE_DESCRIPTION); |
|
|
|
|
$course_id = api_get_course_int_id(); |
|
|
|
|
|
|
|
|
@ -262,7 +265,8 @@ class CourseDescription |
|
|
|
|
$description_id = $this->get_id_by_description_type($description_type); |
|
|
|
|
$course_id = api_get_real_course_id(); |
|
|
|
|
$course_code = api_get_course_id(); |
|
|
|
|
$item_property_id = api_get_item_property_id($course_code, TOOL_COURSE_DESCRIPTION, $description_id); |
|
|
|
|
$item_property_id = api_get_item_property_id($course_code, |
|
|
|
|
TOOL_COURSE_DESCRIPTION, $description_id); |
|
|
|
|
$sql = "INSERT IGNORE INTO $tbl_stats_item_property SET |
|
|
|
|
c_id = " . api_get_course_int_id() . ", |
|
|
|
|
course_id = '$course_id', |
|
|
|
@ -366,8 +370,10 @@ class CourseDescription |
|
|
|
|
* @param int Description type (optional) |
|
|
|
|
* @return string img html |
|
|
|
|
*/ |
|
|
|
|
public function get_progress_porcent($with_icon = false, $description_type = THEMATIC_ADVANCE) |
|
|
|
|
{ |
|
|
|
|
public function get_progress_porcent( |
|
|
|
|
$with_icon = false, |
|
|
|
|
$description_type = THEMATIC_ADVANCE |
|
|
|
|
) { |
|
|
|
|
$tbl_course_description = Database::get_course_table(TABLE_COURSE_DESCRIPTION); |
|
|
|
|
$session_id = api_get_session_id(); |
|
|
|
|
$course_id = api_get_course_int_id(); |
|
|
|
@ -388,7 +394,8 @@ class CourseDescription |
|
|
|
|
$image = 'level_' . $row['progress'] . '.png'; |
|
|
|
|
} |
|
|
|
|
if ($with_icon) { |
|
|
|
|
$img = Display::return_icon($image,get_lang('ThematicAdvance'),array('style'=>'vertical-align:middle')); |
|
|
|
|
$img = Display::return_icon($image, get_lang('ThematicAdvance'), |
|
|
|
|
array('style' => 'vertical-align:middle')); |
|
|
|
|
} |
|
|
|
|
$progress = $img . $progress; |
|
|
|
|
return $progress; |
|
|
|
|