--- /dev/null
+/***********************************************************************/\r
+/* ATutor */\r
+/***********************************************************************/\r
+/* Copyright (c) 2002-2010 */\r
+/* Inclusive Design Institute */\r
+/* http://atutor.ca */\r
+/* */\r
+/* This program is free software. You can redistribute it and/or */\r
+/* modify it under the terms of the GNU General Public License */\r
+/* as published by the Free Software Foundation. */\r
+/***********************************************************************/\r
+// $Id: login.php 10143 2010-08-19 19:26:05Z cindy $\r
+\r
+/* The javascript is used in module.php @ $this->_content_tools["js"] */\r
+\r
+/*global jQuery*/\r
+/*global ATutor */\r
+/*global tinyMCE */\r
+/*global window */\r
+\r
+ATutor = ATutor || {};\r
+ATutor.mods = ATutor.mods || {};\r
+ATutor.mods.hello_world = ATutor.mods.hello_world || {};\r
+\r
+(function () {\r
+ var helloWorldOnClick = function () {\r
+ alert("Clicked on hello world tool icon!");\r
+ }\r
+ \r
+ //set up click handlers and show/hide appropriate tools\r
+ var initialize = function () {\r
+ jQuery("#helloworld_tool").click(helloWorldOnClick);\r
+ };\r
+ \r
+ jQuery(document).ready(initialize);\r
+})();
\ No newline at end of file
$this->_pages['mods/hello_world/index_mystart.php']['title_var'] = 'hello_world';
$this->_pages['mods/hello_world/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"=>"helloworld_tool",
+ "class"=>"fl-col clickable",
+ "src"=>AT_BASE_HREF."mods/hello_world/hello_world.jpg",
+ "title"=>_AT('hello_world_tool'),
+ "alt"=>_AT('hello_world_tool'),
+ "text"=>_AT('hello_world'),
+ "js"=>AT_BASE_HREF."mods/hello_world/content_tool_action.js");
+
function hello_world_get_group_url($group_id) {
return 'mods/hello_world/index.php';
}
);\r
\r
INSERT INTO `language_text` VALUES ('en', '_module','hello_world','Hello World',NOW(),'');\r
+INSERT INTO `language_text` VALUES ('en', '_module','hello_world_tool','Hello World Content Tool',NOW(),'');\r
INSERT INTO `language_text` VALUES ('en', '_module','hello_world_text','A sample Hello World text for detailed homepage.',NOW(),'');
\ No newline at end of file
<license>BSD</license> \r
<release> \r
<version>0.6</version> \r
- <date>2010-10-25</date> \r
+ <date>2010-12-06</date> \r
<state>stable</state> \r
<notes></notes> \r
</release> \r
*/
function helloworld_news() {
+ global $db;
$sql = "SELECT something FROM a table WHERE date < NOW() LIMIT 3";
- if($result = mysql_query($sql, $db){
- while($row = mysql_fetch_assoc($result)){
- $news[] = $row['something'];
- }
+ if ($result = mysql_query($sql, $db)) {
+ while($row = mysql_fetch_assoc($result)){
+ $news[] = $row['something'];
+ }
}
return $news;
}