+++ /dev/null
-Index: docs/themes/default/content.tmpl.php
-===================================================================
---- docs/themes/default/content.tmpl.php (revision 10276)
-+++ docs/themes/default/content.tmpl.php (working copy)
-@@ -95,8 +95,20 @@
- </div>\r
- <?php endif; ?>\r
- \r
-+<?php\r
-+if (!empty($this->proxy_ids)): ?>\r
-+<div id="content-proxy" class="input-form">\r
-+ <strong><?php echo _AT('proxy') . ':' ; ?></strong>\r
-+ <?php\r
-+ foreach ($this->proxy_ids as $id ) {\r
-+ echo '<iframe src="'.AT_BASE_HREF.'mods/basiclti/launch/launch.php?cid='.$id.'" height="1200" width="100%"></iframe>';\r
-+ }\r
-+ ?>\r
-+</div>\r
-+<?php endif; ?>\r
- \r
-+\r
- <div id="content-info">\r
- <?php echo $this->content_info; ?>\r
- \r
--</div>
-\ No newline at end of file
-+</div>\r
-Index: docs/content.php
-===================================================================
---- docs/content.php (revision 10276)
-+++ docs/content.php (working copy)
-@@ -135,6 +135,16 @@
- $content_forum_ids[] = $content_forum_row;
- }
-
-+// For Proxy Tools
-+$content_proxy_ids = array();
-+$sql = "SELECT * FROM ".TABLE_PREFIX."basiclti_content
-+ WHERE content_id=".$cid;
-+$contentresult = mysql_query($sql, $db);
-+$row = mysql_fetch_assoc($contentresult);
-+if ( $row ) {
-+ $content_proxy_ids[] = $cid;
-+}
-+
- // use any styles that were part of the imported document
- // $_custom_css = $_base_href.'headstuff.php?cid='.$cid.SEP.'path='.urlEncode($_base_href.$course_base_href.$content_base_href);
-
-@@ -167,7 +177,7 @@
-
- if ($released_status === TRUE || authenticate(AT_PRIV_CONTENT, AT_PRIV_RETURN)) {
- //if it has test and forum associated with it, still display it even if the content is empty
-- if ($content_row['text'] == '' && (empty($content_test_ids) && empty($content_forum_ids))){
-+ if ($content_row['text'] == '' && (empty($content_proxy_ids) && empty($content_test_ids) && empty($content_forum_ids))){
- $msg->addInfo('NO_PAGE_CONTENT');
- $savant->assign('body', '');
- } else {
-@@ -225,6 +235,8 @@
- $savant->assign('test_message', '');
- $savant->assign('test_ids', array());
- }
-+
-+ $savant->assign('proxy_ids', $content_proxy_ids);
-
- /*TODO***************BOLOGNA***************REMOVE ME**********/
- //assign forum pages if there are forums associated with this content page
-@@ -253,4 +265,4 @@
- $_SESSION['last_visited_page'] = $server_protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
-
- require (AT_INCLUDE_PATH.'footer.inc.php');
--?>
-\ No newline at end of file
-+?>
-Index: docs/mods/_core/editor/editor_tab_functions.inc.php
-===================================================================
---- docs/mods/_core/editor/editor_tab_functions.inc.php (revision 10276)
-+++ docs/mods/_core/editor/editor_tab_functions.inc.php (working copy)
-@@ -35,6 +35,7 @@
- $tabs[3] = array('alternative_content', 'alternatives.inc.php', 'l');
- //Harris: Extended test functionality into content export
- $tabs[4] = array('tests', 'tests.inc.php', 't');
-+ $tabs[5] = array('tools', 'tools.inc.php', 'o');
-
- return $tabs;
- }
-@@ -320,6 +321,29 @@
- }
- }
-
-+ // Add/Update The Tool
-+ if ( isset($_POST['toolid']) ) {
-+ $toolid = $_POST['toolid'];
-+ $sql = "SELECT * FROM ".TABLE_PREFIX."basiclti_content
-+ WHERE content_id=".$_POST[cid];
-+ $result = mysql_query($sql, $db);
-+ if ( $toolid == '--none--' ) {
-+ $sql = "DELETE FROM ". TABLE_PREFIX . "basiclti_content
-+ WHERE content_id=".$_POST[cid];
-+ $result = mysql_query($sql, $db);
-+ } else if ( mysql_num_rows($result) == 0 ) {
-+ $sql = "INSERT INTO ". TABLE_PREFIX . "basiclti_content
-+ SET toolid='".$toolid."', content_id=".$_POST[cid];
-+ $result = mysql_query($sql, $db);
-+ if ($result===false) $msg->addError('MYSQL_FAILED');
-+ } else {
-+ $sql = "UPDATE ". TABLE_PREFIX . "basiclti_content
-+ SET toolid='".$toolid."' WHERE content_id=".$_POST[cid];
-+ $result = mysql_query($sql, $db);
-+ if ($result===false) $msg->addError('MYSQL_FAILED');
-+ }
-+ }
-+
- //TODO*******************BOLOGNA****************REMOVE ME**************/
- if(isset($_SESSION['associated_forum']) && !$msg->containsErrors()){
- if($_SESSION['associated_forum']=='none'){
-Index: docs/include/header.inc.php
-===================================================================
---- docs/include/header.inc.php (revision 10276)
-+++ docs/include/header.inc.php (working copy)
-@@ -100,7 +100,11 @@
- $savant->assign('user_name', _AT('guest'));
- }
-
-+
- if (!isset($_pages[$current_page])) {
-+print_r($_pages);
-+echo($current_page);
-+exit();
- global $msg;
- $msg->addError('PAGE_NOT_FOUND'); // probably the wrong error
- header('location: '.AT_BASE_HREF.'index.php');
+++ /dev/null
-Index: content.php
-===================================================================
---- content.php (revision 10558)
-+++ content.php (working copy)
-@@ -256,7 +256,7 @@
- $module_list = $moduleFactory->getModules($module_status_bits, $module_type_bits, $sort = TRUE);
- $module_contents = '';
- foreach($module_list as $key=>$obj) {
-- $module_content = $obj->getContent();
-+ $module_content = $obj->getContent($cid);
- if (!empty($module_content)){
- $module_contents .= '<div id="'.str_replace('/', '-', $key).'" class="content-from-module">'.$module_content.'</div>';
- }
-@@ -280,4 +280,4 @@
- $_SESSION['last_visited_page'] = $server_protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
-
- require (AT_INCLUDE_PATH.'footer.inc.php');
--?>
-\ No newline at end of file
-+?>
-Index: mods/_core/modules/classes/Module.class.php
-===================================================================
---- mods/_core/modules/classes/Module.class.php (revision 10558)
-+++ mods/_core/modules/classes/Module.class.php (working copy)
-@@ -711,13 +711,13 @@
- * @author Cindy Li
- * @date Dec 7, 2010
- */
-- function getContent(){
-- if (file_exists(AT_MODULE_PATH . $this->_directoryName.'/moduleCallbacks.class.php') &&
-+ function getContent($cid){
-+ if (file_exists(AT_MODULE_PATH . $this->_directoryName.'/ModuleCallbacks.class.php') &&
- isset($this->_callbacks[$this->_directoryName]))
- {
-- require(AT_MODULE_PATH . $this->_directoryName.'/moduleCallbacks.class.php');
-+ require(AT_MODULE_PATH . $this->_directoryName.'/ModuleCallbacks.class.php');
- if (method_exists($this->_callbacks[$this->_directoryName], "appendContent")) {
-- eval('$output = '.$this->_callbacks[$this->_directoryName]."::appendContent();");
-+ eval('$output = '.$this->_callbacks[$this->_directoryName]."::appendContent($cid);");
- return $output;
- }
- }
-@@ -862,4 +862,4 @@
- }
- }
- }
--?>
-\ No newline at end of file
-+?>
+++ /dev/null
-<?php
-$_user_location = 'users';
-define('AT_INCLUDE_PATH', '../../include/');
-require (AT_INCLUDE_PATH.'vitals.inc.php');
-$_custom_css = $_base_path . 'mods/basiclti/module.css'; // use a custom stylesheet
-require (AT_INCLUDE_PATH.'header.inc.php');
-?>
-
-<div id="helloworld">
- This is a page of the Hello World module that requires a login session, but might contain a tool that is not a course tool :)
-</div>
-
-<?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>
+++ /dev/null
-<?php
-
-$_user_location = 'public';
-
-define('AT_INCLUDE_PATH', '../../include/');
-require (AT_INCLUDE_PATH.'vitals.inc.php');
-$_custom_css = $_base_path . 'mods/basiclti/module.css'; // use a custom stylesheet
-require (AT_INCLUDE_PATH.'header.inc.php');
-?>
-
-<div id="helloworld">
- This is a public page from the Hello World module, that does not require a login session to view. :)
-</div>
-
-<?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>
require(AT_INCLUDE_PATH.'../mods/basiclti/include/constants.inc.php');
$savant->addPath('template', AT_BL_INCLUDE.'html/');
-/*******
- * create a side menu box/stack.
- */
-$this->_stacks['basiclti'] = array('title_var'=>'basiclti', 'file'=>'mods/basiclti/side_menu.inc.php');
-
-// the text to display on module "detail view" when sublinks are not available
-$this->_pages['mods/basiclti/index.php']['text'] = _AT('basiclti_text');
-
-/*******
- * if this module is to be made available to students on the Home or Main Navigation.
- */
-$_group_tool = $_student_tool = 'mods/basiclti/index.php';
-
/*******
* add the admin pages when needed.
*/
$this->_pages['mods/basiclti/tool/instructor_delete.php']['parent'] = 'mods/basiclti/index_instructor.php';
}
-/*******
- * student page.
- */
-$this->_pages['mods/basiclti/index.php']['title_var'] = 'basiclti';
-$this->_pages['mods/basiclti/index.php']['img'] = 'mods/basiclti/basiclti.jpg';
-
-/* public pages */
-//$this->_pages[AT_NAV_PUBLIC] = array('mods/basiclti/index_public.php');
-//$this->_pages['mods/basiclti/index_public.php']['title_var'] = 'basiclti';
-//$this->_pages['mods/basiclti/index_public.php']['parent'] = AT_NAV_PUBLIC;
-
-/* my start page pages */
-//$this->_pages[AT_NAV_START] = array('mods/basiclti/index_mystart.php');
-//$this->_pages['mods/basiclti/index_mystart.php']['title_var'] = 'basiclti';
-//$this->_pages['mods/basiclti/index_mystart.php']['parent'] = AT_NAV_START;
-/* The element of content tool bar that is displayed on "Edit Content" => "Content" tab */
$this->_content_tools[] = array("id"=>"basiclti_tool",
"class"=>"fl-col clickable",
+++ /dev/null
-<?php
-/*******
- * This file extends the content string manipulation.
- * It affects the output of course content and news content at course home page.
- * Input parameter: global variable $_input. This variable contains the input
- * content/news string.
- * Output: $_input. Please make sure to assign the manipulated string back to $_input.
- */
-
-/*******
- * Global input string. DO NOT CHANGE.
- */
-global $_input;
-
-/*******
- * Example, replace special tag "[black][/black]" with html
- */
-$_input = str_replace('[black]','<span style="color: black;">',$_input);
-$_input = str_replace('[/black]','</span>',$_input);
-
-?>
\ No newline at end of file
+++ /dev/null
-<?php
-/* start output buffering: */
-ob_start(); ?>
-
-hello world
-
-<?php
-$savant->assign('dropdown_contents', ob_get_contents());
-ob_end_clean();
-
-$savant->assign('title', _AT('basiclti')); // the box title
-$savant->display('include/box.tmpl.php');
-?>
+++ /dev/null
-<?php
-
-if (!defined('AT_INCLUDE_PATH')) { exit; }
-
-/*****
-* Free form PHP can appear here to retreive current information
-* from the module, or a text description of the module where there is
-* not current information
-*****/
-
-global $db;
-
-$link_limit = 3; // Number of links to be displayed on "detail view" box
-
-$sql = "SELECT basiclti_id, value FROM ".TABLE_PREFIX."basiclti WHERE course_id=".$_SESSION[course_id].
- " ORDER BY value LIMIT $link_limit";
-$result = mysql_query($sql, $db);
-
-if (mysql_num_rows($result) > 0) {
- while ($row = mysql_fetch_assoc($result)) {
- /****
- * SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY are defined in include/lib/constance.lib.inc
- * SUBLINK_TEXT_LEN determins the maxium length of the string to be displayed on "detail view" box.
- *****/
- $list[] = '<a href="'.AT_BASE_HREF.url_rewrite('mods/basiclti/index.php?id='. $row['basiclti_id']).'"'.
- (strlen($row['value']) > SUBLINK_TEXT_LEN ? ' title="'.$row['value'].'"' : '') .'>'.
- validate_length($row['value'], SUBLINK_TEXT_LEN, VALIDATE_LENGTH_FOR_DISPLAY) .'</a>';
- }
- return $list;
-} else {
- return 0;
-}
-
-?>