Browse Source

https://support.dokeos.com/issues/5840

Patrick Cool 15 years ago
parent
commit
82a5b1820d
1 changed files with 3 additions and 2 deletions
  1. 3 2
      main/admin/course_list.php

+ 3 - 2
main/admin/course_list.php

@@ -107,6 +107,7 @@ function get_course_data($from, $number_of_items, $column, $direction)
 	$courses = array ();
 	while ($course = Database::fetch_row($res))
 	{
+		/** @todo this should be done using a filter in the sortable table like we did for the sortable table. Code has apparently been written by somebody who did not understand the sortable table */
 		//place colour icons in front of courses
 		//$course[1] = get_course_visibility_icon($course[9]).'<a href="'.api_get_path(WEB_COURSE_PATH).$course[9].'/index.php">'.$course[1].'</a>';
 		$course[1] = get_course_visibility_icon($course[9]).'<a href="'.api_get_path(WEB_COURSE_PATH).$course[8].'/index.php">'.$course[1].'</a>';
@@ -122,13 +123,13 @@ function get_course_data($from, $number_of_items, $column, $direction)
 /**
  * Filter to display the edit-buttons
  */
-function modify_filter($code)
+function modify_filter($code,$url_params,$row)
 {
 	global $charset;
 		return
 		'<a href="course_information.php?code='.$code.'">'.Display::return_icon('synthese_view.gif', get_lang('Info')).'</a>&nbsp;'.
 		//'<a href="../course_home/course_home.php?cidReq='.$code.'">'.Display::return_icon('course_home.gif', get_lang('CourseHomepage')).'</a>&nbsp;'. // This is not the preferable way to go to the homepage.
-		'<a href="'.api_get_path(WEB_COURSE_PATH).$code.'/index.php">'.Display::return_icon('course_home.gif', get_lang('CourseHomepage')).'</a>&nbsp;'.
+		'<a href="'.api_get_path(WEB_COURSE_PATH).$row[8].'/index.php">'.Display::return_icon('course_home.gif', get_lang('CourseHomepage')).'</a>&nbsp;'.
 		'<a href="../tracking/courseLog.php?cidReq='.$code.'">'.Display::return_icon('statistics.gif', get_lang('Tracking')).'</a>&nbsp;'.
 		'<a href="course_edit.php?course_code='.$code.'">'.Display::return_icon('edit.gif', get_lang('Edit')).'</a>&nbsp;'.
 		'<a href="course_list.php?delete_course='.$code.'"  onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.Display::return_icon('delete.gif', get_lang('Delete')).'</a>'.