index.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  1. <?php
  2. /*
  3. DOKEOS - elearning and course management software
  4. For a full list of contributors, see documentation/credits.html
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. See "documentation/licence.html" more details.
  10. Contact:
  11. Dokeos
  12. Rue des Palais 44 Paleizenstraat
  13. B-1030 Brussels - Belgium
  14. Tel. +32 (2) 211 34 56
  15. */
  16. /**
  17. * @package dokeos.main
  18. * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Refactoring
  19. * @version $Id: index.php 12187 2007-04-30 04:28:25Z yannoo $
  20. * @todo check the different @todos in this page and really do them
  21. * @todo check if the news management works as expected
  22. */
  23. // only this script should have this constant defined. This is used to activate the javascript that
  24. // gives the login name automatic focus in header.inc.html.
  25. /** @todo Couldn't this be done using the $HtmlHeadXtra array? */
  26. define('DOKEOS_HOMEPAGE', true);
  27. // the language file
  28. $language_file = array ('courses', 'index');
  29. /* Flag forcing the 'current course' reset, as we're not inside a course anymore */
  30. // maybe we should change this into an api function? an example: Coursemanager::unset();
  31. $cidReset = true;
  32. /*
  33. -----------------------------------------------------------
  34. Included libraries
  35. -----------------------------------------------------------
  36. */
  37. /** @todo make all the library files consistent use filename.lib.php and not filename.lib.inc.php */
  38. require_once ('./main/inc/global.inc.php');
  39. include_once (api_get_path(LIBRARY_PATH).'course.lib.php');
  40. include_once (api_get_path(LIBRARY_PATH).'debug.lib.inc.php');
  41. include_once (api_get_path(LIBRARY_PATH).'events.lib.inc.php');
  42. include_once (api_get_path(LIBRARY_PATH).'system_announcements.lib.php');
  43. include_once (api_get_path(LIBRARY_PATH).'groupmanager.lib.php');
  44. include_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
  45. $loginFailed = isset($_GET['loginFailed']) ? true : isset($loginFailed);
  46. // the section (for the tabs)
  47. $this_section = SECTION_CAMPUS;
  48. /*
  49. -----------------------------------------------------------
  50. Action Handling
  51. -----------------------------------------------------------
  52. */
  53. /** @todo wouldn't it make more sense if this would be done in local.inc.php so that local.inc.php become the only place where authentication is done?
  54. * by doing this you could logout from any page instead of only from index.php. From the moment there is a logout=true in the url you will be logged out
  55. * this can be usefull when you are on an open course and you need to log in to edit something and you immediately want to check how anonymous users
  56. * will see it.
  57. */
  58. if ($_GET['logout'])
  59. {
  60. logout();
  61. }
  62. /*
  63. -----------------------------------------------------------
  64. Table definitions
  65. -----------------------------------------------------------
  66. */
  67. $main_course_table = Database :: get_main_table(TABLE_MAIN_COURSE);
  68. $main_category_table = Database :: get_main_table(TABLE_MAIN_CATEGORY);
  69. $track_login_table = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_LOGIN);
  70. /*
  71. -----------------------------------------------------------
  72. Constants and CONFIGURATION parameters
  73. -----------------------------------------------------------
  74. */
  75. /** @todo these configuration settings should move to the dokeos config settings */
  76. /** defines wether or not anonymous visitors can see a list of the courses on the Dokeos homepage that are open to the world */
  77. $_setting['display_courses_to_anonymous_users'] = 'true';
  78. /** defines weither empty course categories should appear in the list with the course categories */
  79. $_setting['show_empty_course_categories'] = 'true';
  80. /** defines weither the number of open courses has to appear after the course category (faculty) */
  81. /** remark: actually count are only for direct children */
  82. $_setting['show_number_of_courses'] = 'false';
  83. /** Show the back link on top of the tree */
  84. $_setting['show_back_link_on_top_of_tree'] = 'false';
  85. /** Show the course language if it is not the same as the platform lanugage */
  86. $_setting['show_different_course_language'] = 'true';
  87. /** @todo remove this piece of code because this is not used */
  88. if (isset ($_user['user_id']))
  89. {
  90. $nameTools = api_get_setting('siteName');
  91. }
  92. /*
  93. ==============================================================================
  94. LOGIN
  95. ==============================================================================
  96. */
  97. /**
  98. * @todo This piece of code should probably move to local.inc.php where the actual login / logout procedure is handled.
  99. * @todo consider removing this piece of code because does nothing.
  100. */
  101. if ($_GET["submitAuth"] == 1)
  102. {
  103. // nice lie!!!
  104. echo "Attempted breakin - sysadmins notified.";
  105. session_destroy();
  106. die();
  107. }
  108. /**
  109. * @todo This piece of code should probably move to local.inc.php where the actual login procedure is handled.
  110. * @todo check if this code is used. I think this code is never executed because after clicking the submit button
  111. * the code does the stuff in local.inc.php and then redirects to index.php or user_portal.php depending
  112. * on api_get_setting('page_after_login')
  113. */
  114. if ($_POST["submitAuth"])
  115. {
  116. // the user is already authenticated, we now find the last login of the user.
  117. if (isset ($_user['user_id']))
  118. {
  119. $sql_last_login = "SELECT UNIX_TIMESTAMP(login_date)
  120. FROM $track_login_table
  121. WHERE login_user_id = '".$_user['user_id']."'
  122. ORDER BY login_date DESC LIMIT 1";
  123. $result_last_login = api_sql_query($sql_last_login, __FILE__, __LINE__);
  124. if (!$result_last_login)
  125. if (mysql_num_rows($result_last_login) > 0)
  126. {
  127. $user_last_login_datetime = mysql_fetch_array($result_last_login);
  128. $user_last_login_datetime = $user_last_login_datetime[0];
  129. api_session_register('user_last_login_datetime');
  130. }
  131. mysql_free_result($result_last_login);
  132. //event_login();
  133. if (api_is_platform_admin())
  134. {
  135. // decode all open event informations and fill the track_c_* tables
  136. include (api_get_path(LIBRARY_PATH)."stats.lib.inc.php");
  137. decodeOpenInfos();
  138. }
  139. }
  140. } // end login -- if($_POST["submitAuth"])
  141. else
  142. {
  143. // only if login form was not sent because if the form is sent the user was already on the page.
  144. event_open();
  145. }
  146. // the header
  147. Display :: display_header('', 'dokeos');
  148. /*
  149. ==============================================================================
  150. MAIN CODE
  151. ==============================================================================
  152. */
  153. echo '<div class="maincontent" id="content">';
  154. // Plugins for loginpage_main AND campushomepage_main
  155. if (!api_get_user_id())
  156. {
  157. api_plugin('loginpage_main');
  158. }
  159. else
  160. {
  161. api_plugin('campushomepage_main');
  162. }
  163. // Including the page for the news
  164. $page_included = false;
  165. if (!empty ($_GET['include']) && !strstr($_GET['include'], '/') && !strstr($_GET['include'], '\\') && strstr($_GET['include'], '.html'))
  166. {
  167. include ('./home/'.$_GET['include']);
  168. $page_included = true;
  169. }
  170. else
  171. {
  172. if(!file_exists('home/home_news_'.$user_selected_language.'.html'))
  173. {
  174. $home_top_temp=file('home/home_top.html');
  175. $home_top_temp=implode('',$home_top_temp);
  176. $open=str_replace('{rel_path}',api_get_path(REL_PATH),$home_top_temp);
  177. echo $open;
  178. }
  179. else
  180. {
  181. include('home/home_top_'.$user_selected_language.'.html');
  182. }
  183. }
  184. // Display System announcements
  185. $announcement = $_GET['announcement'] ? $_GET['announcement'] : -1;
  186. $announcement = intval($announcement);
  187. SystemAnnouncementManager :: display_announcements(VISIBLE_GUEST, $announcement);
  188. // Display courses and category list
  189. if (!$page_included)
  190. {
  191. if (api_get_setting('display_courses_to_anonymous_users') == 'true')
  192. {
  193. echo '<div class="home_cats">';
  194. //display_anonymous_course_list();
  195. echo '</div>';
  196. }
  197. }
  198. echo '</div>';
  199. // display right menu: language form, login section + useful weblinks
  200. echo '<div class="menu" id="menu">';
  201. display_anonymous_right_menu();
  202. echo '</div>';
  203. /*
  204. ==============================================================================
  205. FOOTER
  206. ==============================================================================
  207. */
  208. Display :: display_footer();
  209. /**
  210. * This function handles the logout and is called whenever there is a $_GET['logout']
  211. *
  212. * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
  213. */
  214. function logout()
  215. {
  216. // variable initialisation
  217. $query_string='';
  218. if(!empty($_SESSION['user_language_choice']))
  219. {
  220. $query_string='?language='.$_SESSION['user_language_choice'];
  221. }
  222. // Database table definition
  223. $tbl_track_login = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_LOGIN);
  224. // selecting the last login of the user
  225. $uid = intval($_GET['uid']);
  226. $sql_last_connection="SELECT login_id, login_date FROM $tbl_track_login WHERE login_user_id='$uid' ORDER BY login_date DESC LIMIT 0,1";
  227. $q_last_connection=mysql_query($sql_last_connection);
  228. $i_id_last_connection=mysql_result($q_last_connection,0,"login_id");
  229. $s_sql_update_logout_date="UPDATE $tbl_track_login SET logout_date=NOW() WHERE login_id='$i_id_last_connection'";
  230. api_sql_query($s_sql_update_logout_date);
  231. LoginDelete($uid, $_configuration['statistics_database']);
  232. api_session_destroy();
  233. header("Location: index.php$query_string");
  234. exit();
  235. }
  236. /**
  237. * This function checks if there are courses that are open to the world in the platform course categories (=faculties)
  238. *
  239. * @param unknown_type $category
  240. * @return boolean
  241. */
  242. function category_has_open_courses($category)
  243. {
  244. $main_course_table = Database :: get_main_table(TABLE_MAIN_COURSE);
  245. $sql_query = "SELECT * FROM $main_course_table WHERE category_code='$category'";
  246. $sql_result = api_sql_query($sql_query, __FILE__, __LINE__);
  247. while ($course = mysql_fetch_array($sql_result))
  248. {
  249. if ($course['visibility'] == COURSE_VISIBILITY_OPEN_WORLD)
  250. {
  251. return true; //at least one open course
  252. }
  253. }
  254. return false;
  255. }
  256. function display_create_course_link()
  257. {
  258. echo "<li><a href=\"main/create_course/add_course.php\">".get_lang("CourseCreate")."</a></li>";
  259. }
  260. function display_edit_course_list_links()
  261. {
  262. echo "<li><a href=\"main/auth/courses.php\">".get_lang("CourseManagement")."</a></li>";
  263. }
  264. /**
  265. * Displays the right-hand menu for anonymous users:
  266. * login form, useful links, help section
  267. * Warning: function defines globals
  268. * @version 1.0.1
  269. * @todo does $_plugins need to be global?
  270. */
  271. function display_anonymous_right_menu()
  272. {
  273. global $loginFailed, $_plugins, $_user;
  274. $platformLanguage = api_get_setting('platformLanguage');
  275. if ( !($_user['user_id']) ) // only display if the user isn't logged in
  276. {
  277. api_display_language_form();
  278. echo '<br />';
  279. display_login_form();
  280. if ($loginFailed)
  281. {
  282. handle_login_failed();
  283. }
  284. if (api_get_setting('allow_lostpassword') == 'true' OR api_get_setting('allow_registration') == 'true')
  285. {
  286. echo '<div class="menusection"><span class="menusectioncaption">'.get_lang('MenuUser').'</span><ul class="menulist">';
  287. if (get_setting('allow_registration') <> 'false')
  288. {
  289. echo '<li><a href="main/auth/inscription.php">'.get_lang('Reg').'</a></li>';
  290. }
  291. if (get_setting('allow_lostpassword') == 'true')
  292. {
  293. display_lost_password_info();
  294. }
  295. echo '</ul></div>';
  296. }
  297. if(api_number_of_plugins('loginpage_menu') > 0)
  298. {
  299. echo '<div class="note" style="background: none">';
  300. api_plugin('loginpage_menu');
  301. echo '</div>';
  302. }
  303. }
  304. /*** hide right menu "general" and other parts on anonymous right menu *****/
  305. echo "<div class=\"menusection\">", "<span class=\"menusectioncaption\">".get_lang("MenuGeneral")."</span>";
  306. echo "<ul class=\"menulist\">";
  307. $user_selected_language = api_get_interface_language();
  308. if (!isset ($user_selected_language))
  309. $user_selected_language = $platformLanguage;
  310. if(!file_exists('home/home_menu_'.$user_selected_language.'.html'))
  311. {
  312. include ('home/home_menu.html');
  313. }
  314. else
  315. {
  316. include('home/home_menu_'.$user_selected_language.'.html');
  317. }
  318. echo '</ul>';
  319. echo '</div>';
  320. if ($_user['user_id'] && api_number_of_plugins('campushomepage_menu') > 0)
  321. {
  322. echo '<div class="note" style="background: none">';
  323. api_plugin('campushomepage_menu');
  324. echo '</div>';
  325. }
  326. /**
  327. * User section
  328. */
  329. if(isset($_SESSION['_user']['user_id']) && $_SESSION['_user']['user_id']!=0){
  330. echo "<div class=\"menusection\">";
  331. echo "<span class=\"menusectioncaption\">".get_lang("MenuUser")."</span>";
  332. echo "<ul class=\"menulist\">";
  333. $display_add_course_link = api_is_allowed_to_create_course() && ($_SESSION["studentview"] != "studentenview");
  334. if ($display_add_course_link)
  335. display_create_course_link();
  336. display_edit_course_list_links();
  337. $navigation=array();
  338. // Link to my profile
  339. $navigation['myprofile']['url'] = api_get_path(WEB_CODE_PATH).'auth/profile.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&amp;courseCode='.$_course['official_code'] : '' );
  340. $navigation['myprofile']['title'] = get_lang('ModifyProfile');
  341. // Link to my agenda
  342. $navigation['myagenda']['url'] = api_get_path(WEB_CODE_PATH).'calendar/myagenda.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&amp;courseCode='.$_course['official_code'] : '' );
  343. $navigation['myagenda']['title'] = get_lang('MyAgenda');
  344. foreach($navigation as $section => $navigation_info)
  345. {
  346. $current = ($section == $GLOBALS['this_section'] ? ' id="current"' : '');
  347. echo '<li'.$current.'>';
  348. echo '<a href="'.$navigation_info['url'].'" target="_top">'.$navigation_info['title'].'</a>';
  349. echo '</li>';
  350. echo "\n";
  351. }
  352. echo "</ul>";
  353. echo "</div>";
  354. }
  355. /**** use this comment to hide notice file section from right menu ****
  356. echo '<div class="note">';
  357. // includes for any files to be displayed below anonymous right menu
  358. if(!file_exists('home/home_notice_'.$user_selected_language.'.html'))
  359. {
  360. include ('home/home_notice.html');
  361. }
  362. else
  363. {
  364. include('home/home_notice_'.$user_selected_language.'.html');
  365. }
  366. echo '</div>';
  367. **** end of hide various right menu items on anonymous right menu ****/
  368. }
  369. /**
  370. * Reacts on a failed login:
  371. * displays an explanation with
  372. * a link to the registration form.
  373. *
  374. * @version 1.0.1
  375. */
  376. function handle_login_failed()
  377. {
  378. switch ($_GET['error'])
  379. {
  380. case '':
  381. $message = get_lang("InvalidId");
  382. if (api_is_self_registration_allowed())
  383. {
  384. $message = get_lang("InvalidForSelfRegistration");
  385. }
  386. break;
  387. case 'account_expired':
  388. $message=get_lang('AccountExpired');
  389. break;
  390. case 'account_inactive':
  391. $message=get_lang('AccountInactive');
  392. break;
  393. case 'user_password_incorrect':
  394. $message=get_lang('InvalidId');
  395. break;
  396. }
  397. echo "<div id=\"login_fail\">".$message."</div>";
  398. }
  399. /**
  400. * Adds a form to let users login
  401. * @version 1.1
  402. */
  403. function display_login_form()
  404. {
  405. $form = new FormValidator('formLogin');
  406. $form->addElement('text','login',get_lang('UserName'),array('size'=>15));
  407. $form->addElement('password','password',get_lang('Pass'),array('size'=>15));
  408. $form->addElement('submit','submitAuth',get_lang('Ok'));
  409. $renderer =& $form->defaultRenderer();
  410. $renderer->setElementTemplate('<div><label>{label}</label></div><div>{element}</div>');
  411. $form->display();
  412. }
  413. /**
  414. * Displays a link to the lost password section
  415. */
  416. function display_lost_password_info()
  417. {
  418. echo "<li><a href=\"main/auth/lostPassword.php\">".get_lang("LostPassword")."</a></li>";
  419. }
  420. /**
  421. * Display list of courses in a category.
  422. * (for anonymous users)
  423. *
  424. * @version 1.1
  425. * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University - refactoring and code cleaning
  426. */
  427. function display_anonymous_course_list()
  428. {
  429. //init
  430. $web_course_path = api_get_path(WEB_COURSE_PATH);
  431. $category = $_GET["category"];
  432. // Database table definitions
  433. $main_course_table = Database :: get_main_table(TABLE_MAIN_COURSE);
  434. $main_category_table = Database :: get_main_table(TABLE_MAIN_CATEGORY);
  435. $platformLanguage = api_get_setting('platformLanguage');
  436. //get list of courses in category $category
  437. $sql_get_course_list = "SELECT * FROM $main_course_table cours
  438. WHERE category_code = '".mysql_real_escape_string($_GET["category"])."'
  439. ORDER BY UPPER(visual_code)";
  440. //removed: AND cours.visibility='".COURSE_VISIBILITY_OPEN_WORLD."'
  441. $sql_result_courses = api_sql_query($sql_get_course_list, __FILE__, __LINE__);
  442. while ($course_result = mysql_fetch_array($sql_result_courses))
  443. {
  444. $course_list[] = $course_result;
  445. }
  446. $sqlGetSubCatList = "
  447. SELECT t1.name,t1.code,t1.parent_id,t1.children_count,COUNT(DISTINCT t3.code) AS nbCourse
  448. FROM $main_category_table t1
  449. LEFT JOIN $main_category_table t2 ON t1.code=t2.parent_id
  450. LEFT JOIN $main_course_table t3 ON (t3.category_code=t1.code AND t3.visibility='".COURSE_VISIBILITY_OPEN_WORLD."')
  451. WHERE t1.parent_id ". (empty ($category) ? "IS NULL" : "='$category'")."
  452. GROUP BY t1.name,t1.code,t1.parent_id,t1.children_count ORDER BY t1.tree_pos";
  453. $resCats = api_sql_query($sqlGetSubCatList, __FILE__, __LINE__);
  454. $thereIsSubCat = FALSE;
  455. if (mysql_num_rows($resCats) > 0)
  456. {
  457. $htmlListCat = "<h4 style=\"margin-top: 0px;\">".get_lang("CatList")."</h4>"."<ul>";
  458. while ($catLine = mysql_fetch_array($resCats))
  459. {
  460. if ($catLine['code'] != $category)
  461. {
  462. $htmlListCat .= "<li>";
  463. $category_has_open_courses = category_has_open_courses($catLine['code']);
  464. if ($category_has_open_courses)
  465. {
  466. //the category contains courses accessible to anonymous visitors
  467. $htmlListCat .= "<a href=\"".api_get_self()."?category=".$catLine['code']."\">".$catLine['name']."</a>";
  468. if (get_setting('show_number_of_courses') == 'true')
  469. {
  470. $htmlListCat .= " (".$catLine['nbCourse']." ".get_lang("Courses").")";
  471. }
  472. }
  473. elseif ($catLine['children_count'] > 0)
  474. {
  475. //the category has children, subcategories
  476. $htmlListCat .= "<a href=\"".api_get_self()."?category=".$catLine['code']."\">".$catLine['name']."</a>";
  477. }
  478. /************************************************************************
  479. end changed code to eliminate the (0 courses) after empty categories
  480. ************************************************************************/
  481. elseif (get_setting('show_empty_course_categories') == 'true')
  482. {
  483. $htmlListCat .= $catLine['name'];
  484. }
  485. $htmlListCat .= "</li>\n";
  486. $thereIsSubCat = true;
  487. }
  488. else
  489. {
  490. $htmlTitre = "<p>";
  491. if ($_setting['show_back_link_on_top_of_tree'] == 'true')
  492. {
  493. $htmlTitre .= "<a href=\"".api_get_self()."\">"."&lt;&lt; ".get_lang("BackToHomePage")."</a>";
  494. }
  495. if (!is_null($catLine['parent_id']) || ($_setting['show_back_link_on_top_of_tree'] <> 'true' && !is_null($catLine['code'])))
  496. {
  497. $htmlTitre .= "<a href=\"".api_get_self()."?category=".$catLine['parent_id']."\">"."&lt;&lt; ".get_lang("Up")."</a>";
  498. }
  499. $htmlTitre .= "</p>\n";
  500. if ($category != "" && !is_null($catLine['code']))
  501. {
  502. $htmlTitre .= "<h3>".$catLine['name']."</h3>\n";
  503. }
  504. else
  505. {
  506. $htmlTitre .= "<h3>".get_lang("Categories")."</h3>\n";
  507. }
  508. }
  509. }
  510. $htmlListCat .= "</ul>\n";
  511. }
  512. echo $htmlTitre;
  513. if ($thereIsSubCat)
  514. {
  515. echo $htmlListCat;
  516. }
  517. while ($categoryName = mysql_fetch_array($resCats))
  518. {
  519. echo "<h3>", $categoryName['name'], "</h3>\n";
  520. }
  521. $numrows = mysql_num_rows($sql_result_courses);
  522. if ($numrows > 0)
  523. {
  524. if ($thereIsSubCat)
  525. {
  526. echo "<hr size=\"1\" noshade=\"noshade\">\n";
  527. }
  528. echo "<h4 style=\"margin-top: 0px;\">", get_lang("CourseList"), "</h4>\n", "<ul>\n";
  529. while ($course = mysql_fetch_array($sql_result_courses))
  530. {
  531. echo "<li>\n";
  532. echo "<a href=\"".$web_course_path.$course['directory'], "/\">", $course['title'], "</a>";
  533. echo "<br/>", $course['visual_code'], " - ", $course['tutor_name'];
  534. if ($_setting['show_different_course_language'] == 'true' && $course['course_language'] <> api_get_setting('platformLanguage'))
  535. {
  536. echo ' - '.$course['course_language'];
  537. }
  538. echo "</li>\n";
  539. }
  540. echo "</ul>\n";
  541. }
  542. else
  543. {
  544. // echo "<blockquote>",get_lang('_No_course_publicly_available'),"</blockquote>\n";
  545. }
  546. if ($category != "")
  547. {
  548. echo "<p>", "<a href=\"".api_get_self()."\"><b>&lt;&lt;</b> ", get_lang("BackToHomePage"), "</a>", "</p>\n";
  549. }
  550. }
  551. ?>