2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2002 - 2010 */
6 /* Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or */
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /************************************************************************/
15 // This file is essentially a javascript file, but needs to be terminated with
16 // a .php extension so that php calls can be used within it. Please put pure javascript
19 ATutor = ATutor || {};
20 ATutor.course = ATutor.course || {};
24 ATutor.base_href = "<?php echo AT_BASE_HREF; ?>";
25 ATutor.course.show = "<?php echo _AT('show'); ?>";
26 ATutor.course.hide = "<?php echo _AT('hide'); ?>";
27 ATutor.course.theme = "<?php echo $_SESSION['prefs']['PREF_THEME']; ?>";
29 //everything in the document.ready block executes after the page is fully loaded
30 jQuery(document).ready( function () {
31 ATutor.users.preferences.setStyles(
32 '<?php echo $_SESSION["prefs"]["PREF_BG_COLOUR"]; ?>',
33 '<?php echo $_SESSION["prefs"]["PREF_FG_COLOUR"]; ?>',
34 '<?php echo $_SESSION["prefs"]["PREF_HL_COLOUR"]; ?>',
35 '<?php echo $_SESSION["prefs"]["PREF_FONT_FACE"]; ?>',
36 '<?php echo $_SESSION["prefs"]["PREF_FONT_TIMES"]; ?>');
38 ATutor.users.preferences.addPrefWizClickHandler();
39 ATutor.users.preferences.course_id = "<?php echo $_SESSION['course_id']; ?>";
41 if (isset($_SESSION['course_id']) && ($_SESSION['course_id'] > 0)) {
43 var myName = self.name;
44 if (myName != "prefWizWindow" && myName != "progWin") {
45 ATutor.course.doSideMenus();
46 ATutor.course.doMenuToggle();