2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2002 - 2009 */
6 /* Inclusive Design Institute */
8 /* This program is free software. You can redistribute it and/or */
9 /* modify it under the terms of the GNU General Public License */
10 /* as published by the Free Software Foundation. */
11 /************************************************************************/
13 define('AT_INCLUDE_PATH', '../../../include/');
14 require (AT_INCLUDE_PATH.'vitals.inc.php');
16 $fha_student_tools = array();
18 $sql = "SELECT links FROM ".TABLE_PREFIX."fha_student_tools WHERE course_id=$_SESSION[course_id]";
19 $result = mysql_query($sql, $db);
20 if ($row = mysql_fetch_assoc($result)) {
21 $fha_student_tools = explode('|', $row['links']);
24 if($fha_student_tools[0] == "" ){
25 $msg->addInfo('NO_TOOLS_FOUND');
28 $sql = "SELECT home_view FROM ".TABLE_PREFIX."fha_student_tools WHERE course_id = $_SESSION[course_id]";
29 $result = mysql_query($sql,$db);
30 $row= mysql_fetch_assoc($result);
31 $home_view = $row['home_view'];
33 // Enable drag and drop to reorder displayed modules when the module view mode is
34 // set to "detail view" and user role is instructor
35 if ($home_view == 1 && authenticate(AT_PRIV_ADMIN,AT_PRIV_RETURN))
38 <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/framework/fss/css/fss-layout.css" />
39 <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/framework/fss/css/fss-text.css" />
40 <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/framework/fss/css/fss-theme-mist.css" />
41 <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/framework/fss/css/fss-theme-hc.css" />
42 <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/components/reorderer/css/Reorderer.css" />
44 <script type="text/javascript">
45 jQuery(document).ready(function () {
46 var reorder_example_grid = fluid.reorderGrid("#details_view", {
48 movables : ".home_box"
51 afterMove: function (item, requestedPosition, movables) {
52 //save the state to the db
53 var myDivs = jQuery ("div[class^=home_box]", "#details_view");
54 var moved_modules = "";
56 if (myDivs.constructor.toString().indexOf("Array")) // myDivs is an array
58 for (i=0; i<myDivs.length; i++)
59 moved_modules += myDivs[i].id+"|";
61 moved_modules = moved_modules.substring(0, moved_modules.length-1); // remove the last "|"
63 if (moved_modules != "")
64 jQuery.post("'.AT_BASE_HREF.'move_module.php", { "moved_modules":moved_modules, "from":"student_tools" }, function(data) {});
68 selected: "draggable_selected",
69 hover: "draggable_selected"
75 function remove_module(module)
77 jQuery.post("'.AT_BASE_HREF.'move_module.php", { "remove":module, "from":"student_tools" }, function(data) {});
78 jQuery("div[id="+module.replace(/\//g,"-")+"]").remove();
86 require (AT_INCLUDE_PATH.'header.inc.php');
88 $home_links = array();
90 if($fha_student_tools[0] != "" ){
91 //query reading the type of home viewable. 0: icon view 1: detail view
93 $savant->assign('view_mode', $home_view);
94 $savant->assign('home_links', get_home_navigation($fha_student_tools));
97 $savant->assign('num_pages', 0);
98 $savant->assign('current_page', 0);
99 $savant->display('index.tmpl.php');
104 <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>