+++ /dev/null
-ACTIVITY MODULES
-----------------
-
-These are main modules in Moodle, allowing various activities.
-
-
-Each of these modules contains a number of expected components:
-
- mod_form.php: a form to setup/update a module instance
-
- version.php: defines some meta-info and provides upgrading code
-
- icon.gif: a 16x16 icon for the module
-
- db/mysql.sql: an SQL dump of all the required db tables and data
-
- index.php: a page to list all instances in a course
-
- view.php: a page to view a particular instance
-
- lib.php: any/all functions defined by the module should be in here.
- constants should be defined using MODULENAME_xxxxxx
- functions should be defined using modulename_xxxxxx
-
- There are a number of standard functions:
-
- modulename_add_instance()
- modulename_update_instance()
- modulename_delete_instance()
-
- modulename_user_complete()
- modulename_user_outline()
-
- modulename_cron()
-
- modulename_print_recent_activity()
-
-
-If you are a developer and interested in developing new Modules see:
-
- Moodle Documentation: http://moodle.org/doc
- Moodle Community: http://moodle.org/community
+++ /dev/null
-/**
- * CSSClass.js: utilities for manipulating the CSS class of an HTML element.
- *
- * This module defines a single global symbol named CSSClass. This object
- * contains utility functions for working with the class attribute (className
- * property) of HTML elements. All functions take two arguments: the element
- * e being tested or manipulated and the CSS class c that is to be tested,
- * added, or removed. If element e is a string, it is taken as an element
- * id and passed to document.getElementById().
- */
-var CSSClass = {}; // Create our namespace object
-
-// Return true if element e is a member of the class c; false otherwise
-CSSClass.is = function(e, c) {
- if (typeof e == "string") e = document.getElementById(e); // element id
-
- // Before doing a regexp search, optimize for a couple of common cases.
- var classes = e.className;
- if (!classes) return false; // Not a member of any classes
- if (classes == c) return true; // Member of just this one class
-
- // Otherwise, use a regular expression to search for c as a word by itself
- // \b in a regular expression requires a match at a word boundary.
- return e.className.search("\\b" + c + "\\b") != -1;
-};
-
-// Add class c to the className of element e if it is not already there.
-CSSClass.add = function(e, c) {
- if (typeof e == "string") e = document.getElementById(e); // element id
- if (CSSClass.is(e, c)) return; // If already a member, do nothing
- if (e.className) c = " " + c; // Whitespace separator, if needed
- e.className += c; // Append the new class to the end
-};
-
-// Remove all occurrences (if any) of class c from the className of element e
-CSSClass.remove = function(e, c) {
- if (typeof e == "string") e = document.getElementById(e); // element id
- // Search the className for all occurrences of c and replace with "".
- // \s* matches any number of whitespace characters.
- // "g" makes the regular expression match any number of occurrences
- e.className = e.className.replace(new RegExp("\\b"+ c+"\\b\\s*", "g"), "");
-};
\ No newline at end of file
+++ /dev/null
-<script type="text/javascript" charset="utf-8">
-/* <![CDATA[ */
- var CSSClass={};CSSClass.is=function(e,c){if(typeof e=="string")e=document.getElementById(e);var classes=e.className;if(!classes)return false;if(classes==c)return true;return e.className.search("\\b"+c+"\\b")!=-1;};CSSClass.add=function(e,c){if(typeof e=="string")e=document.getElementById(e);if(CSSClass.is(e,c))return;if(e.className)c=" "+c;e.className+=c;};CSSClass.remove=function(e,c){if(typeof e=="string")e=document.getElementById(e);e.className=e.className.replace(new RegExp("\\b"+c+"\\b\\s*","g"),"");};
-
- var jsscript = {
-
- corrections: function () {
- if (top.user) {
- top.document.getElementsByTagName('frameset')[0].rows = "117,30%,0,200";
- }
-
- // check for layouttabel and add haslayouttable class to body
- function setbodytag () {
- var bd = document.getElementsByTagName('body')[0];
- if (bd) {
- var tagname = 'nolayouttable';
- if (document.getElementById('middle-column')) {
- var lc = document.getElementById('left-column');
- var rc = document.getElementById('right-column');
- if ( lc && rc ) {
- tagname = 'haslayouttable rightandleftcolumn';
- } else if (lc) {
- tagname = 'haslayouttable onlyleftcolumn';
- } else if (rc) {
- tagname = 'haslayouttable onlyrightcolumn';
- } else {
- tagname = 'haslayouttable onlymiddlecolumn';
- }
- }
- CSSClass.add(bd, tagname);
- } else {
- setTimeout(function() { setbodytag() }, 10);
- }
- };
-
- setbodytag();
- },
-
- init: function() {
- jsscript.corrections();
- }
- };
-
- jsscript.init();
-/* ]]> */
-</script>
\ No newline at end of file
+++ /dev/null
-/**
- * CSSClass.js: utilities for manipulating the CSS class of an HTML element.
- *
- * This module defines a single global symbol named CSSClass. This object
- * contains utility functions for working with the class attribute (className
- * property) of HTML elements. All functions take two arguments: the element
- * e being tested or manipulated and the CSS class c that is to be tested,
- * added, or removed. If element e is a string, it is taken as an element
- * id and passed to document.getElementById().
- */
-var CSSClass = {}; // Create our namespace object
-
-// Return true if element e is a member of the class c; false otherwise
-CSSClass.is = function(e, c) {
- if (typeof e == "string") e = document.getElementById(e); // element id
-
- // Before doing a regexp search, optimize for a couple of common cases.
- var classes = e.className;
- if (!classes) return false; // Not a member of any classes
- if (classes == c) return true; // Member of just this one class
-
- // Otherwise, use a regular expression to search for c as a word by itself
- // \b in a regular expression requires a match at a word boundary.
- return e.className.search("\\b" + c + "\\b") != -1;
-};
-
-// Add class c to the className of element e if it is not already there.
-CSSClass.add = function(e, c) {
- if (typeof e == "string") e = document.getElementById(e); // element id
- if (CSSClass.is(e, c)) return; // If already a member, do nothing
- if (e.className) c = " " + c; // Whitespace separator, if needed
- e.className += c; // Append the new class to the end
-};
-
-// Remove all occurrences (if any) of class c from the className of element e
-CSSClass.remove = function(e, c) {
- if (typeof e == "string") e = document.getElementById(e); // element id
- // Search the className for all occurrences of c and replace with "".
- // \s* matches any number of whitespace characters.
- // "g" makes the regular expression match any number of occurrences
- e.className = e.className.replace(new RegExp("\\b"+ c+"\\b\\s*", "g"), "");
-};
\ No newline at end of file
+++ /dev/null
-<script type="text/javascript" charset="utf-8">
-/* <![CDATA[ */
- var CSSClass={};CSSClass.is=function(e,c){if(typeof e=="string")e=document.getElementById(e);var classes=e.className;if(!classes)return false;if(classes==c)return true;return e.className.search("\\b"+c+"\\b")!=-1;};CSSClass.add=function(e,c){if(typeof e=="string")e=document.getElementById(e);if(CSSClass.is(e,c))return;if(e.className)c=" "+c;e.className+=c;};CSSClass.remove=function(e,c){if(typeof e=="string")e=document.getElementById(e);e.className=e.className.replace(new RegExp("\\b"+c+"\\b\\s*","g"),"");};
-
- var script = {
- corrections: function () {
- if (top.user) {
- top.document.getElementsByTagName('frameset')[0].rows = "117,30%,0,200";
- }
-
- // check for layouttabel and add layouttable classes to body
- var tagname = 'nolayouttable';
- if (document.getElementById('middle-column')) {
- var lc = document.getElementById('left-column');
- var rc = document.getElementById('right-column');
- if ( lc && rc ) {
- tagname = 'haslayouttable rightandleftcolumn';
- } else if (lc) {
- tagname = 'haslayouttable onlyleftcolumn';
- } else if (rc) {
- tagname = 'haslayouttable onlyrightcolumn';
- } else {
- tagname = 'haslayouttable onlymiddlecolumn';
- }
- } else if(document.getElementsByTagName('body')[0].id.substring(0,9)=='calendar-') {
- tagname='haslayouttable onlyrightcolumn';
- }
-
- function setbodytag (tagname) {
- var bd = document.getElementsByTagName('body')[0];
- if (bd) {
- CSSClass.add(bd, tagname);
- } else {
- setTimeout(function() { setbodytag(tagname) }, 30);
- }
- }
-
- setTimeout(function() { setbodytag(tagname) }, 30);
- },
-
- init: function() {
- script.corrections();
- }
- };
-/* ]]> */
-</script>
\ No newline at end of file