@@ -126,7 +126,7 @@ function listCourses()
126126 $ tableCourse = Database::get_main_table (TABLE_MAIN_COURSE );
127127 $ sql = "SELECT a.course_id, a.visible, a.price, b.*
128128 FROM $ tableBuyCourse a, $ tableCourse b
129- WHERE a.course_id = b.id; " ;
129+ WHERE a.course_id = b.id AND a.session_id = 0 ; " ;
130130 $ res = Database::query ($ sql );
131131 $ aux = array ();
132132 while ($ row = Database::fetch_assoc ($ res )) {
@@ -170,7 +170,7 @@ function userSessionList()
170170 // get course of current session
171171 $ sql = "SELECT a.course_id, a.session_id, a.visible, a.price, b.*
172172 FROM $ tableBuyCourse a, $ tableCourse b
173- WHERE a.code = b.code AND a.code = ' " . $ rowSessionCourse ['course_code ' ] . "' AND a.visible = 1; " ;
173+ WHERE a.code = b.code AND a.code = ' " . $ rowSessionCourse ['course_code ' ] . "' " ;
174174 $ res = Database::query ($ sql );
175175 // loop inside a course of current session
176176 while ($ row = Database::fetch_assoc ($ res )) {
@@ -369,19 +369,19 @@ function getCourseVisibilityIcon($option)
369369 $ style = 'margin-bottom:-5px;margin-right:5px; ' ;
370370 switch ($ option ) {
371371 case 0 :
372- return Display::return_icon ('bullet_red.gif ' , get_lang ('CourseVisibilityClosed ' ), array ('style ' => $ style ));
372+ return Display::return_icon ('bullet_red.gif ' , get_plugin_lang ('CourseVisibilityClosed ' , ' BuyCoursesPlugin ' ), array ('style ' => $ style ));
373373 break ;
374374 case 1 :
375- return Display::return_icon ('bullet_orange.gif ' , get_lang ('Private ' ), array ('style ' => $ style ));
375+ return Display::return_icon ('bullet_orange.gif ' , get_plugin_lang ('Private ' , ' BuyCoursesPlugin ' ), array ('style ' => $ style ));
376376 break ;
377377 case 2 :
378- return Display::return_icon ('bullet_green.gif ' , get_lang ('OpenToThePlatform ' ), array ('style ' => $ style ));
378+ return Display::return_icon ('bullet_green.gif ' , get_plugin_lang ('OpenToThePlatform ' , ' BuyCoursesPlugin ' ), array ('style ' => $ style ));
379379 break ;
380380 case 3 :
381- return Display::return_icon ('bullet_blue.gif ' , get_lang ('OpenToTheWorld ' ), array ('style ' => $ style ));
381+ return Display::return_icon ('bullet_blue.gif ' , get_plugin_lang ('OpenToTheWorld ' , ' BuyCoursesPlugin ' ), array ('style ' => $ style ));
382382 break ;
383383 default :
384- return '' ;
384+ return Display:: return_icon ( ' bullet_grey.gif ' , get_plugin_lang ( ' CourseVisibilityHidden ' , ' BuyCoursesPlugin ' ), array ( ' style ' => $ style )); ;
385385 }
386386}
387387/**
0 commit comments