$savant->assign('forum_message', '');
$savant->assign('forum_ids', array());
}
+
+ // get the content that the standard and add-on modules want to display on the content page
+ $module_status_bits = AT_MODULE_STATUS_ENABLED;
+ $module_type_bits = AT_MODULE_TYPE_STANDARD + AT_MODULE_TYPE_EXTRA;
+
+ $module_list = $moduleFactory->getModules($module_status_bits, $module_type_bits, $sort = TRUE);
+ $module_contents = '';
+ foreach($module_list as $key=>$obj) {
+ $module_content = $obj->getContent();
+ if (!empty($module_content)){
+ $module_contents .= '<div id="'.str_replace('/', '-', $key).'" class="content-from-module">'.$module_content.'</div>';
+ }
+ }
+ if ($module_contents <> '') $savant->assign('module_contents', $module_contents);
}
}
} else {
function load() {
if (is_file(AT_MODULE_PATH . $this->_directoryName.'/module.php')) {
- global $_modules, $_pages, $_stacks, $_list, $_tool, $_content_tools; // $_list is for sublinks on "detail view"
+ global $_modules, $_pages, $_stacks, $_list, $_tool, $_content_tools, $_callbacks; // $_list is for sublinks on "detail view"
require(AT_MODULE_PATH . $this->_directoryName.'/module.php');
$_content_tools = array_merge((array)$_content_tools, $this->_content_tools);
}
+ if(isset($this->_callbacks)) {
+ $_callbacks = array_merge((array)$_callbacks, $this->_callbacks);
+ }
+
//TODO***********BOLOGNA***********REMOVE ME***********/
//tool manager (content editing)
if(isset($this->_tool)) {
}
-
/**
* Get the latest news from the Module.
* @access public
}
}
+ /**
+ * Get the output that this module wants to add onto content page.
+ * @access public
+ * @author Cindy Li
+ * @date Dec 7, 2010
+ */
+ function getContent(){
+ 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');
+ if (method_exists($this->_callbacks[$this->_directoryName], "appendContent")) {
+ eval('$output = '.$this->_callbacks[$this->_directoryName]."::appendContent();");
+ return $output;
+ }
+ }
+ return NULL;
+ }
+
private function convertContent164($course_id) {
global $db;