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');
15 require ('classes/StudentToolsUtil.class.php');
17 $fha_student_tools = StudentToolsUtil::getStudentTools($_SESSION['course_id']);
19 if(count($fha_student_tools) == "" ){
20 $msg->addInfo('NO_TOOLS_FOUND');
23 $sql = "SELECT home_view FROM ".TABLE_PREFIX."fha_student_tools WHERE course_id = $_SESSION[course_id]";
24 $result = mysql_query($sql,$db);
25 $row= mysql_fetch_assoc($result);
26 $home_view = $row['home_view'];
28 // Enable drag and drop to reorder displayed modules when the module view mode is
29 // set to "detail view" and user role is instructor
30 if ($home_view == 1 && authenticate(AT_PRIV_ADMIN,AT_PRIV_RETURN))
33 <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/framework/fss/css/fss-layout.css" />
34 <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/framework/fss/css/fss-text.css" />
35 <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/framework/fss/css/fss-theme-mist.css" />
36 <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/framework/fss/css/fss-theme-hc.css" />
37 <link rel="stylesheet" type="text/css" href="'.AT_BASE_HREF.'jscripts/infusion/components/reorderer/css/Reorderer.css" />
39 <script type="text/javascript">
40 jQuery(document).ready(function () {
41 var reorder_example_grid = fluid.reorderGrid("#details_view", {
43 movables : ".home_box"
46 afterMove: function (item, requestedPosition, movables) {
47 //save the state to the db
48 var myDivs = jQuery ("div[class^=home_box]", "#details_view");
49 var moved_modules = "";
51 if (myDivs.constructor.toString().indexOf("Array")) // myDivs is an array
53 for (i=0; i<myDivs.length; i++)
54 moved_modules += myDivs[i].id+"|";
56 moved_modules = moved_modules.substring(0, moved_modules.length-1); // remove the last "|"
58 if (moved_modules != "")
59 jQuery.post("'.AT_BASE_HREF.'move_module.php", { "moved_modules":moved_modules, "from":"student_tools" }, function(data) {});
63 selected: "draggable_selected",
64 hover: "draggable_selected"
70 function remove_module(module)
72 jQuery.post("'.AT_BASE_HREF.'move_module.php", { "remove":module, "from":"student_tools" }, function(data) {});
73 jQuery("div[id=\""+module.replace(/\//g,"-")+"\"]").remove();
81 require (AT_INCLUDE_PATH.'header.inc.php');
83 $home_links = array();
85 if($fha_student_tools[0] != "" ){
86 //query reading the type of home viewable. 0: icon view 1: detail view
88 $savant->assign('view_mode', $home_view);
89 $savant->assign('home_links', get_home_navigation($fha_student_tools));
92 $savant->assign('num_pages', 0);
93 $savant->assign('current_page', 0);
94 $savant->display('index.tmpl.php');
99 <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>