2 if (!defined('AT_INCLUDE_PATH')) { exit; }
\r
3 if (!isset($this) || (isset($this) && (strtolower(get_class($this)) != 'module'))) { exit(__FILE__ . ' is not a Module'); }
\r
5 define('AT_PRIV_LINKS', $this->getPrivilege());
\r
7 // if this module is to be made available to students on the Home or Main Navigation
\r
8 $_group_tool = $_student_tool = 'links/index.php';
\r
10 /*$this->_pages['tools/links/index.php']['title_var'] = 'links';
\r
11 $this->_pages['tools/links/index.php']['parent'] = 'tools/index.php';
\r
12 $this->_pages['tools/links/index.php']['children'] = array('tools/links/add.php', 'tools/links/categories.php', 'tools/links/categories_create.php');
\r
13 $this->_pages['tools/links/index.php']['guide'] = 'instructor/?p=links.php';
\r
15 $this->_pages['tools/links/add.php']['title_var'] = 'add_link';
\r
16 $this->_pages['tools/links/add.php']['parent'] = 'tools/links/index.php';
\r
18 $this->_pages['tools/links/edit.php']['title_var'] = 'edit_link';
\r
19 $this->_pages['tools/links/edit.php']['parent'] = 'tools/links/index.php';
\r
21 $this->_pages['tools/links/delete.php']['title_var'] = 'delete_link';
\r
22 $this->_pages['tools/links/delete.php']['parent'] = 'tools/links/index.php';
\r
24 $this->_pages['tools/links/categories.php']['title_var'] = 'categories';
\r
25 $this->_pages['tools/links/categories.php']['parent'] = 'tools/links/index.php';
\r
27 $this->_pages['tools/links/categories_create.php']['title_var'] = 'create_category';
\r
28 $this->_pages['tools/links/categories_create.php']['parent'] = 'tools/links/index.php';
\r
30 $this->_pages['tools/links/categories_edit.php']['title_var'] = 'edit_category';
\r
31 $this->_pages['tools/links/categories_edit.php']['parent'] = 'tools/links/categories.php';
\r
33 $this->_pages['tools/links/categories_delete.php']['title_var'] = 'delete_category';
\r
34 $this->_pages['tools/links/categories_delete.php']['parent'] = 'tools/links/categories.php';
\r
37 //instructor & group pages
\r
38 $this->_pages['tools/links/index.php']['title_var'] = 'manage_links';
\r
39 $this->_pages['tools/links/index.php']['parent'] = 'links/index.php';
\r
40 $this->_pages['tools/links/index.php']['children'] = array('tools/links/add.php', 'tools/links/categories.php', 'tools/links/categories_create.php');
\r
41 $this->_pages['tools/links/index.php']['guide'] = 'instructor/?p=links.php';
\r
43 $this->_pages['tools/links/add.php']['title_var'] = 'add_link';
\r
44 $this->_pages['tools/links/add.php']['parent'] = 'tools/links/index.php';
\r
46 $this->_pages['tools/links/edit.php']['title_var'] = 'edit_link';
\r
47 $this->_pages['tools/links/edit.php']['parent'] = 'tools/links/index.php';
\r
49 $this->_pages['tools/links/delete.php']['title_var'] = 'delete_link';
\r
50 $this->_pages['tools/links/delete.php']['parent'] = 'tools/links/index.php';
\r
52 $this->_pages['tools/links/categories.php']['title_var'] = 'categories';
\r
53 $this->_pages['tools/links/categories.php']['parent'] = 'tools/links/index.php';
\r
55 $this->_pages['tools/links/categories_create.php']['title_var'] = 'create_category';
\r
56 $this->_pages['tools/links/categories_create.php']['parent'] = 'tools/links/index.php';
\r
58 $this->_pages['tools/links/categories_edit.php']['title_var'] = 'edit_category';
\r
59 $this->_pages['tools/links/categories_edit.php']['parent'] = 'tools/links/categories.php';
\r
61 $this->_pages['tools/links/categories_delete.php']['title_var'] = 'delete_category';
\r
62 $this->_pages['tools/links/categories_delete.php']['parent'] = 'tools/links/categories.php';
\r
65 $this->_pages['links/index.php']['title_var'] = 'links';
\r
66 $this->_pages['links/index.php']['children'] = array('links/add.php', 'tools/links/index.php');
\r
67 $this->_pages['links/index.php']['img'] = 'images/home-links.gif';
\r
69 $this->_pages['links/add.php']['title_var'] = 'suggest_link';
\r
70 $this->_pages['links/add.php']['parent'] = 'links/index.php';
\r
73 function links_get_group_url($group_id) {
\r
75 $sql = "SELECT cat_id FROM ".TABLE_PREFIX."links_categories WHERE owner_id=$group_id and owner_type=".LINK_CAT_GROUP;
\r
76 $result = mysql_query($sql, $db);
\r
77 if ($row = mysql_fetch_assoc($result)) {
\r
78 return 'links/index.php?cat_parent_id='.$row['cat_id'].'&search=&filter=Filter';
\r
81 return 'links/index.php';
\r