.row{ width:100%; } div.row div.label { width: 0%; } div.row div.formw { width: 100%; } "; if(!isset($cidReq)) { $cidReq = $dbname; // to provide compatibility. with previous system GLOBAL $error_msg,$error_no; $classError = "init"; $error_no[$classError][] = "2"; $error_level[$classError][] = "info"; $error_msg[$classError][] = "[".__FILE__."][".__LINE__."] cidReq was Missing $cidReq take $dbname;"; } // is this needed????? $section = "course"; // name of the language file that needs to be included $language_file = "course_home"; // inlcuding the global file include('../../main/inc/global.inc.php'); if(isset($_SESSION['_gid'])){ unset($_SESSION['_gid']); } // The section for the tabs $this_section=SECTION_COURSES; /* ----------------------------------------------------------- Libraries ----------------------------------------------------------- */ include_once(api_get_path(LIBRARY_PATH) . 'course.lib.php'); include_once(api_get_path(LIBRARY_PATH) . 'debug.lib.inc.php'); /* ----------------------------------------------------------- Constants ----------------------------------------------------------- */ define ("TOOL_PUBLIC", "Public"); define ("TOOL_PUBLIC_BUT_HIDDEN", "PublicButHide"); define ("TOOL_COURSE_ADMIN", "courseAdmin"); define ("TOOL_PLATFORM_ADMIN", "platformAdmin"); define ("TOOL_AUTHORING", "toolauthoring"); define ("TOOL_INTERACTION", "toolinteraction"); define ("TOOL_ADMIN", "tooladmin"); define ("TOOL_ADMIN_PLATEFORM", "tooladminplatform"); // ("TOOL_ADMIN_PLATFORM_VISIBLE", "tooladminplatformvisible"); //define ("TOOL_ADMIN_PLATFORM_INVISIBLE", "tooladminplatforminvisible"); //define ("TOOL_ADMIN_COURS_INVISIBLE", "tooladmincoursinvisible"); define ("TOOL_STUDENT_VIEW", "toolstudentview"); define ("TOOL_ADMIN_VISIBLE", "tooladminvisible"); /* ----------------------------------------------------------- Virtual course support code ----------------------------------------------------------- */ $user_id = api_get_user_id(); $course_code = $_course["sysCode"]; $course_info = Database::get_course_info($course_code); $return_result = CourseManager::determine_course_title_from_course_info($_user['user_id'], $course_info); $course_title = $return_result["title"]; $course_code = $return_result["code"]; $_course["name"] = $course_title; $_course['official_code'] = $course_code; api_session_unregister('toolgroup'); /* ----------------------------------------------------------- Header ----------------------------------------------------------- */ Display::display_header($course_title, "Home"); /* ----------------------------------------------------------- Is the user allowed here? ----------------------------------------------------------- */ if($is_allowed_in_course == false) { api_not_allowed(); } /* ----------------------------------------------------------- Session Management ----------------------------------------------------------- */ if(api_get_setting('use_session_mode')=='true' && $is_allowed_in_course) { // Database Table Definitions $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION); $tbl_user = Database::get_main_table(TABLE_MAIN_USER); $tbl_session_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); $tbl_session_course_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER); if(!empty($_GET['id_session'])) { $_SESSION['id_session'] = $_GET['id_session']; $sql = 'SELECT name FROM '.$tbl_session . ' WHERE id="'.$_SESSION['id_session'] . '"'; $rs = api_sql_query($sql,__FILE__,__LINE__); list($_SESSION['session_name']) = mysql_fetch_array($rs); } } /* ----------------------------------------------------------- STATISTICS ----------------------------------------------------------- */ if(!isset($coursesAlreadyVisited[$_cid]) ) { include(api_get_path(LIBRARY_PATH) . 'events.lib.inc.php'); event_access_course(); $coursesAlreadyVisited[$_cid] = 1; api_session_register('coursesAlreadyVisited'); } $tool_table = Database::get_course_table(TABLE_TOOL_LIST); $temps=time(); $reqdate="&reqdate=$temps"; /* ============================================================================== MAIN CODE ============================================================================== */ //display course title for course home page (similar to toolname for tool pages) //echo '