@@ -126,7 +126,7 @@ function listCourses()
126
126
$ tableCourse = Database::get_main_table (TABLE_MAIN_COURSE );
127
127
$ sql = "SELECT a.course_id, a.visible, a.price, b.*
128
128
FROM $ tableBuyCourse a, $ tableCourse b
129
- WHERE a.course_id = b.id; " ;
129
+ WHERE a.course_id = b.id AND a.session_id = 0 ; " ;
130
130
$ res = Database::query ($ sql );
131
131
$ aux = array ();
132
132
while ($ row = Database::fetch_assoc ($ res )) {
@@ -170,7 +170,7 @@ function userSessionList()
170
170
// get course of current session
171
171
$ sql = "SELECT a.course_id, a.session_id, a.visible, a.price, b.*
172
172
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 ' ] . "' " ;
174
174
$ res = Database::query ($ sql );
175
175
// loop inside a course of current session
176
176
while ($ row = Database::fetch_assoc ($ res )) {
@@ -369,19 +369,19 @@ function getCourseVisibilityIcon($option)
369
369
$ style = 'margin-bottom:-5px;margin-right:5px; ' ;
370
370
switch ($ option ) {
371
371
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 ));
373
373
break ;
374
374
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 ));
376
376
break ;
377
377
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 ));
379
379
break ;
380
380
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 ));
382
382
break ;
383
383
default :
384
- return '' ;
384
+ return Display:: return_icon ( ' bullet_grey.gif ' , get_plugin_lang ( ' CourseVisibilityHidden ' , ' BuyCoursesPlugin ' ), array ( ' style ' => $ style )); ;
385
385
}
386
386
}
387
387
/**
0 commit comments