Merge branch 'w42_MDL-29878_m22_typo3' of git://github.com/skodak/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 24 Oct 2011 21:04:54 +0000 (23:04 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 24 Oct 2011 21:04:54 +0000 (23:04 +0200)
16 files changed:
lang/en/moodle.php
lib/base32.php [deleted file]
lib/csshover.htc [deleted file]
lib/md5.js [deleted file]
lib/swfobject/swfobject.js [deleted file]
lib/thirdpartylibs.xml
mod/feedback/backup/moodle2/restore_feedback_activity_task.class.php
mod/lesson/locallib.php
mod/quiz/review.php
mod/scorm/userreport.php
mod/url/lang/en/url.php
mod/url/view.php
question/type/multichoice/edit_multichoice_form.php
question/type/multichoice/lang/en/qtype_multichoice.php
rss/renderer.php
webservice/amf/testclient/index.php

index dc1bc8f..446e8d7 100644 (file)
@@ -1391,6 +1391,7 @@ $string['rssarticles'] = 'Number of RSS recent articles';
 $string['rsserror'] = 'Error reading RSS data';
 $string['rsserrorauth'] = 'Your RSS link does not contain a valid authentication token.';
 $string['rsserrorguest'] = 'This feed uses guest access to access the data, but guest does not have permission to read the data. Visit the original location that this feed comes from (URL) as a valid user and get a new RSS link from there.';
+$string['rsskeyshelp'] = 'To ensure security and privacy, RSS feed URLs contain a special token that identifies the user they are for. This prevents other users from accessing areas of Moodle they shouldn\'t have access to via RSS feeds.</p><p>This token is automatically created the first time you access an area of Moodle that produces an RSS feed. If you feel that your RSS feed token has been compromised in some way you can request a new one by clicking the Reset link here. Please note that your current RSS feed URLs will then become invalid.';
 $string['rsstype'] = 'RSS feed for this activity';
 $string['saveandnext'] = 'Save and show next';
 $string['savedat'] = 'Saved at:';
diff --git a/lib/base32.php b/lib/base32.php
deleted file mode 100644 (file)
index 831c712..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-<?php
-//
-// +----------------------------------------------------------------------+
-// | Base32 Library                                                     |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 2001 The PHP Group                                     |
-// +----------------------------------------------------------------------+
-// | This source file is dual-licensed. It is available under the terms   | 
-// | of the GNU GPL v2.0 and under the terms of the PHP license version   |
-// | 2.02,  available at through the world-wide-web at                    |
-// | available at through the world-wide-web at                           |
-// | http://www.php.net/license/2_02.txt.                                 |
-// +----------------------------------------------------------------------+
-// |  Minor fixes and additional functions by Allan Hansen.               |
-// |  Moodle porting work by Martin Langhoff                              |
-// +----------------------------------------------------------------------+
-// | base32.php - based on race.php  - RACE encode and decode strings.    |
-// +----------------------------------------------------------------------+
-// | Authors: Allan Hansen  <All@nHansen.dk>                              |
-// |          Arjan Wekking <a.wekking@synantics.nl>                      |
-// |          Martin Langhoff <martin@catalyst.net.nz>                    |
-// +----------------------------------------------------------------------+
-//
-
-/**
- * @package moodlecore
- * @copyright (c) 2001 The PHP Group
- * @license GNU GPL v2.0 http://www.php.net/license/2_02.txt
- */
-
-/**
- * Base32 encode a binary string
- *
- * @param    $inString   Binary string to base32 encode
- *
- * @return   $outString  Base32 encoded $inString
- *
- * @access   private
- *
- */
-
-function base32_encode ($inString) 
-{ 
-    $outString = ""; 
-    $compBits = ""; 
-    $BASE32_TABLE = array( 
-                          '00000' => 0x61, 
-                          '00001' => 0x62, 
-                          '00010' => 0x63, 
-                          '00011' => 0x64, 
-                          '00100' => 0x65, 
-                          '00101' => 0x66, 
-                          '00110' => 0x67, 
-                          '00111' => 0x68, 
-                          '01000' => 0x69, 
-                          '01001' => 0x6a, 
-                          '01010' => 0x6b, 
-                          '01011' => 0x6c, 
-                          '01100' => 0x6d, 
-                          '01101' => 0x6e, 
-                          '01110' => 0x6f, 
-                          '01111' => 0x70, 
-                          '10000' => 0x71, 
-                          '10001' => 0x72, 
-                          '10010' => 0x73, 
-                          '10011' => 0x74, 
-                          '10100' => 0x75, 
-                          '10101' => 0x76, 
-                          '10110' => 0x77, 
-                          '10111' => 0x78, 
-                          '11000' => 0x79, 
-                          '11001' => 0x7a, 
-                          '11010' => 0x32, 
-                          '11011' => 0x33, 
-                          '11100' => 0x34, 
-                          '11101' => 0x35, 
-                          '11110' => 0x36, 
-                          '11111' => 0x37, 
-                          ); 
-    
-    /* Turn the compressed string into a string that represents the bits as 0 and 1. */
-    for ($i = 0; $i < strlen($inString); $i++) {
-        $compBits .= str_pad(decbin(ord(substr($inString,$i,1))), 8, '0', STR_PAD_LEFT);
-    }
-    
-    /* Pad the value with enough 0's to make it a multiple of 5 */
-    if((strlen($compBits) % 5) != 0) {
-        $compBits = str_pad($compBits, strlen($compBits)+(5-(strlen($compBits)%5)), '0', STR_PAD_RIGHT);
-    }
-    
-    /* Create an array by chunking it every 5 chars */
-    $fiveBitsArray = explode("\n",rtrim(chunk_split($compBits, 5, "\n"))); 
-    
-    /* Look-up each chunk and add it to $outstring */
-    foreach($fiveBitsArray as $fiveBitsString) { 
-        $outString .= chr($BASE32_TABLE[$fiveBitsString]); 
-    } 
-    
-    return $outString; 
-} 
-
-
-
-/**
- * Base32 decode to a binary string
- *
- * @param    $inString   String to base32 decode
- *
- * @return   $outString  Base32 decoded $inString
- *
- * @access   private
- *
- */
-
-function Base32_decode($inString) {
-    /* declaration */
-    $inputCheck = null;
-    $deCompBits = null;
-    
-    $BASE32_TABLE = array( 
-                          0x61 => '00000', 
-                          0x62 => '00001', 
-                          0x63 => '00010', 
-                          0x64 => '00011', 
-                          0x65 => '00100', 
-                          0x66 => '00101', 
-                          0x67 => '00110', 
-                          0x68 => '00111', 
-                          0x69 => '01000', 
-                          0x6a => '01001', 
-                          0x6b => '01010', 
-                          0x6c => '01011', 
-                          0x6d => '01100', 
-                          0x6e => '01101', 
-                          0x6f => '01110', 
-                          0x70 => '01111', 
-                          0x71 => '10000', 
-                          0x72 => '10001', 
-                          0x73 => '10010', 
-                          0x74 => '10011', 
-                          0x75 => '10100', 
-                          0x76 => '10101', 
-                          0x77 => '10110', 
-                          0x78 => '10111', 
-                          0x79 => '11000', 
-                          0x7a => '11001', 
-                          0x32 => '11010', 
-                          0x33 => '11011', 
-                          0x34 => '11100', 
-                          0x35 => '11101', 
-                          0x36 => '11110', 
-                          0x37 => '11111', 
-                          ); 
-    
-    /* Step 1 */
-    $inputCheck = strlen($inString) % 8;
-    if(($inputCheck == 1)||($inputCheck == 3)||($inputCheck == 6)) { 
-        trigger_error('input to Base32Decode was a bad mod length: '.$inputCheck);
-        return false; 
-        //return $this->raiseError('input to Base32Decode was a bad mod length: '.$inputCheck, null, 
-        // PEAR_ERROR_DIE, null, null, 'Net_RACE_Error', false );
-    }
-    
-    /* $deCompBits is a string that represents the bits as 0 and 1.*/
-    for ($i = 0; $i < strlen($inString); $i++) {
-        $inChar = ord(substr($inString,$i,1));
-        if(isset($BASE32_TABLE[$inChar])) {
-            $deCompBits .= $BASE32_TABLE[$inChar];
-        } else {
-            trigger_error('input to Base32Decode had a bad character: '.$inChar);
-            return false;
-            //return $this->raiseError('input to Base32Decode had a bad character: '.$inChar, null, 
-            //    PEAR_ERROR_DIE, null, null, 'Net_RACE_Error', false );
-        }
-    }
-    
-    /* Step 5 */
-    $padding = strlen($deCompBits) % 8;
-    $paddingContent = substr($deCompBits, (strlen($deCompBits) - $padding));
-    if(substr_count($paddingContent, '1')>0) { 
-        trigger_error('found non-zero padding in Base32Decode');
-        return false;
-        //return $this->raiseError('found non-zero padding in Base32Decode', null, 
-        //    PEAR_ERROR_DIE, null, null, 'Net_RACE_Error', false );
-    }
-    
-    /* Break the decompressed string into octets for returning */
-    $deArr = array();
-    for($i = 0; $i < (int)(strlen($deCompBits) / 8); $i++) {
-        $deArr[$i] = chr(bindec(substr($deCompBits, $i*8, 8)));
-    }
-    
-    $outString = join('',$deArr);
-    
-    return $outString;
-}
diff --git a/lib/csshover.htc b/lib/csshover.htc
deleted file mode 100644 (file)
index f00536d..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-<attach event="ondocumentready" handler="parseStylesheets" />
-<script type="text/javascript">
-/**
- *     Pseudos - V1.30.050121 - hover & active
- *     ---------------------------------------------
- *     Peterned - http://www.xs4all.nl/~peterned/
- *     (c) 2005 - Peter Nederlof
- *
- *     Credits  - Arnoud Berendsen 
- *              - Martin Reurings
- *           - Robert Hanson
- *
- *     howto: body { behavior:url("csshover.htc"); }
- *     ---------------------------------------------
- */
-
-var currentSheet, doc = window.document, activators = {
-       onhover:{on:'onmouseover', off:'onmouseout'},
-       onactive:{on:'onmousedown', off:'onmouseup'}
-}
-
-function parseStylesheets() {
-       var sheets = doc.styleSheets, l = sheets.length;
-       for(var i=0; i<l; i++) 
-               parseStylesheet(sheets[i]);
-}
-       function parseStylesheet(sheet) {
-               if(sheet.imports) {
-                       try {
-                               var imports = sheet.imports, l = imports.length;
-                               for(var i=0; i<l; i++) parseStylesheet(sheet.imports[i]);
-                       } catch(securityException){}
-               }
-
-               try {
-                       var rules = (currentSheet = sheet).rules, l = rules.length;
-                       for(var j=0; j<l; j++) parseCSSRule(rules[j]);
-               } catch(securityException){}
-       }
-
-       function parseCSSRule(rule) {
-               var select = rule.selectorText, style = rule.style.cssText;
-               if(!(/(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i).test(select) || !style) return;
-               
-               var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, 'on$1');
-               var newSelect = select.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi, '.$2' + pseudo);
-               var className = (/\.([a-z0-9_-]*on(hover|active))/i).exec(newSelect)[1];
-               var affected = select.replace(/:hover.*$/, '');
-               var elements = getElementsBySelect(affected);
-
-               currentSheet.addRule(newSelect, style);
-               for(var i=0; i<elements.length; i++)
-                       new HoverElement(elements[i], className, activators[pseudo]);
-       }
-
-function HoverElement(node, className, events) {
-       if(!node.hovers) node.hovers = {};
-       if(node.hovers[className]) return;
-       node.hovers[className] = true;
-       node.attachEvent(events.on,
-               function() { node.className += ' ' + className; });
-       node.attachEvent(events.off,
-               function() { node.className = 
-                       node.className.replace(new RegExp('\\s+'+className, 'g'),''); });
-}
-
-function getElementsBySelect(rule) {
-       var parts, nodes = [doc];
-       parts = rule.split(' ');
-       for(var i=0; i<parts.length; i++) {
-               nodes = getSelectedNodes(parts[i], nodes);
-       }       return nodes;
-}
-       function getSelectedNodes(select, elements) {
-               var result, node, nodes = [];
-               var classname = (/\.([a-z0-9_-]+)/i).exec(select);
-               var identify = (/\#([a-z0-9_-]+)/i).exec(select);
-               var tagName = select.replace(/(\.|\#|\:)[a-z0-9_-]+/i, '');
-               for(var i=0; i<elements.length; i++) {
-                       result = tagName? elements[i].all.tags(tagName):elements[i].all; 
-                       for(var j=0; j<result.length; j++) {
-                               node = result[j];
-                               if((identify && node.id != identify[1]) || (classname && !(new RegExp('\\b' +
-                                       classname[1] + '\\b').exec(node.className)))) continue;
-                               nodes[nodes.length] = node;
-                       }
-               }       return nodes;
-       }
-</script>
\ No newline at end of file
diff --git a/lib/md5.js b/lib/md5.js
deleted file mode 100644 (file)
index 46d2aab..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
- * Digest Algorithm, as defined in RFC 1321.
- * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
- * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
- * Distributed under the BSD License
- * See http://pajhome.org.uk/crypt/md5 for more info.
- */
-
-/*
- * Configurable variables. You may need to tweak these to be compatible with
- * the server-side, but the defaults work in most cases.
- */
-var hexcase = 0;  /* hex output format. 0 - lowercase; 1 - uppercase        */
-var b64pad  = ""; /* base-64 pad character. "=" for strict RFC compliance   */
-var chrsz   = 8;  /* bits per input character. 8 - ASCII; 16 - Unicode      */
-
-/*
- * These are the functions you'll usually want to call
- * They take string arguments and return either hex or base-64 encoded strings
- */
-function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));}
-function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));}
-function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));}
-function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); }
-function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); }
-function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); }
-
-/*
- * Perform a simple self-test to see if the VM is working
- */
-function md5_vm_test()
-{
-  return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
-}
-
-/*
- * Calculate the MD5 of an array of little-endian words, and a bit length
- */
-function core_md5(x, len)
-{
-  /* append padding */
-  x[len >> 5] |= 0x80 << ((len) % 32);
-  x[(((len + 64) >>> 9) << 4) + 14] = len;
-
-  var a =  1732584193;
-  var b = -271733879;
-  var c = -1732584194;
-  var d =  271733878;
-
-  for(var i = 0; i < x.length; i += 16)
-  {
-    var olda = a;
-    var oldb = b;
-    var oldc = c;
-    var oldd = d;
-
-    a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
-    d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
-    c = md5_ff(c, d, a, b, x[i+ 2], 17,  606105819);
-    b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
-    a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
-    d = md5_ff(d, a, b, c, x[i+ 5], 12,  1200080426);
-    c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
-    b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
-    a = md5_ff(a, b, c, d, x[i+ 8], 7 ,  1770035416);
-    d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
-    c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
-    b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
-    a = md5_ff(a, b, c, d, x[i+12], 7 ,  1804603682);
-    d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
-    c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
-    b = md5_ff(b, c, d, a, x[i+15], 22,  1236535329);
-
-    a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
-    d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
-    c = md5_gg(c, d, a, b, x[i+11], 14,  643717713);
-    b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
-    a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
-    d = md5_gg(d, a, b, c, x[i+10], 9 ,  38016083);
-    c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
-    b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
-    a = md5_gg(a, b, c, d, x[i+ 9], 5 ,  568446438);
-    d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
-    c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
-    b = md5_gg(b, c, d, a, x[i+ 8], 20,  1163531501);
-    a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
-    d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
-    c = md5_gg(c, d, a, b, x[i+ 7], 14,  1735328473);
-    b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
-
-    a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
-    d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
-    c = md5_hh(c, d, a, b, x[i+11], 16,  1839030562);
-    b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
-    a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
-    d = md5_hh(d, a, b, c, x[i+ 4], 11,  1272893353);
-    c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
-    b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
-    a = md5_hh(a, b, c, d, x[i+13], 4 ,  681279174);
-    d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
-    c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
-    b = md5_hh(b, c, d, a, x[i+ 6], 23,  76029189);
-    a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
-    d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
-    c = md5_hh(c, d, a, b, x[i+15], 16,  530742520);
-    b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
-
-    a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
-    d = md5_ii(d, a, b, c, x[i+ 7], 10,  1126891415);
-    c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
-    b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
-    a = md5_ii(a, b, c, d, x[i+12], 6 ,  1700485571);
-    d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
-    c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
-    b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
-    a = md5_ii(a, b, c, d, x[i+ 8], 6 ,  1873313359);
-    d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
-    c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
-    b = md5_ii(b, c, d, a, x[i+13], 21,  1309151649);
-    a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
-    d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
-    c = md5_ii(c, d, a, b, x[i+ 2], 15,  718787259);
-    b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
-
-    a = safe_add(a, olda);
-    b = safe_add(b, oldb);
-    c = safe_add(c, oldc);
-    d = safe_add(d, oldd);
-  }
-  return Array(a, b, c, d);
-
-}
-
-/*
- * These functions implement the four basic operations the algorithm uses.
- */
-function md5_cmn(q, a, b, x, s, t)
-{
-  return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
-}
-function md5_ff(a, b, c, d, x, s, t)
-{
-  return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
-}
-function md5_gg(a, b, c, d, x, s, t)
-{
-  return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
-}
-function md5_hh(a, b, c, d, x, s, t)
-{
-  return md5_cmn(b ^ c ^ d, a, b, x, s, t);
-}
-function md5_ii(a, b, c, d, x, s, t)
-{
-  return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
-}
-
-/*
- * Calculate the HMAC-MD5, of a key and some data
- */
-function core_hmac_md5(key, data)
-{
-  var bkey = str2binl(key);
-  if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz);
-
-  var ipad = Array(16), opad = Array(16);
-  for(var i = 0; i < 16; i++)
-  {
-    ipad[i] = bkey[i] ^ 0x36363636;
-    opad[i] = bkey[i] ^ 0x5C5C5C5C;
-  }
-
-  var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz);
-  return core_md5(opad.concat(hash), 512 + 128);
-}
-
-/*
- * Add integers, wrapping at 2^32. This uses 16-bit operations internally
- * to work around bugs in some JS interpreters.
- */
-function safe_add(x, y)
-{
-  var lsw = (x & 0xFFFF) + (y & 0xFFFF);
-  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
-  return (msw << 16) | (lsw & 0xFFFF);
-}
-
-/*
- * Bitwise rotate a 32-bit number to the left.
- */
-function bit_rol(num, cnt)
-{
-  return (num << cnt) | (num >>> (32 - cnt));
-}
-
-/*
- * Convert a string to an array of little-endian words
- * If chrsz is ASCII, characters >255 have their hi-byte silently ignored.
- */
-function str2binl(str)
-{
-  var bin = Array();
-  var mask = (1 << chrsz) - 1;
-  for(var i = 0; i < str.length * chrsz; i += chrsz)
-    bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32);
-  return bin;
-}
-
-/*
- * Convert an array of little-endian words to a string
- */
-function binl2str(bin)
-{
-  var str = "";
-  var mask = (1 << chrsz) - 1;
-  for(var i = 0; i < bin.length * 32; i += chrsz)
-    str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask);
-  return str;
-}
-
-/*
- * Convert an array of little-endian words to a hex string.
- */
-function binl2hex(binarray)
-{
-  var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
-  var str = "";
-  for(var i = 0; i < binarray.length * 4; i++)
-  {
-    str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) +
-           hex_tab.charAt((binarray[i>>2] >> ((i%4)*8  )) & 0xF);
-  }
-  return str;
-}
-
-/*
- * Convert an array of little-endian words to a base-64 string
- */
-function binl2b64(binarray)
-{
-  var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-  var str = "";
-  for(var i = 0; i < binarray.length * 4; i += 3)
-  {
-    var triplet = (((binarray[i   >> 2] >> 8 * ( i   %4)) & 0xFF) << 16)
-                | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 )
-                |  ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF);
-    for(var j = 0; j < 4; j++)
-    {
-      if(i * 8 + j * 6 > binarray.length * 32) str += b64pad;
-      else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
-    }
-  }
-  return str;
-}
diff --git a/lib/swfobject/swfobject.js b/lib/swfobject/swfobject.js
deleted file mode 100644 (file)
index 17481e4..0000000
+++ /dev/null
@@ -1,784 +0,0 @@
-//one change has been done related to http://code.google.com/p/swfobject/issues/detail?id=332
-//we added lines: 204, 205, 207, 208, 209 (try-catch)
-/*!    SWFObject v2.2 <http://code.google.com/p/swfobject/>
-       is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-
-var swfobject = function() {
-
-       var UNDEF = "undefined",
-               OBJECT = "object",
-               SHOCKWAVE_FLASH = "Shockwave Flash",
-               SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
-               FLASH_MIME_TYPE = "application/x-shockwave-flash",
-               EXPRESS_INSTALL_ID = "SWFObjectExprInst",
-               ON_READY_STATE_CHANGE = "onreadystatechange",
-
-               win = window,
-               doc = document,
-               nav = navigator,
-
-               plugin = false,
-               domLoadFnArr = [main],
-               regObjArr = [],
-               objIdArr = [],
-               listenersArr = [],
-               storedAltContent,
-               storedAltContentId,
-               storedCallbackFn,
-               storedCallbackObj,
-               isDomLoaded = false,
-               isExpressInstallActive = false,
-               dynamicStylesheet,
-               dynamicStylesheetMedia,
-               autoHideShow = true,
-
-       /* Centralized function for browser feature detection
-               - User agent string detection is only used when no good alternative is possible
-               - Is executed directly for optimal performance
-       */
-       ua = function() {
-               var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
-                       u = nav.userAgent.toLowerCase(),
-                       p = nav.platform.toLowerCase(),
-                       windows = p ? /win/.test(p) : /win/.test(u),
-                       mac = p ? /mac/.test(p) : /mac/.test(u),
-                       webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
-                       ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
-                       playerVersion = [0,0,0],
-                       d = null;
-               if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
-                       d = nav.plugins[SHOCKWAVE_FLASH].description;
-                       if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
-                               plugin = true;
-                               ie = false; // cascaded feature detection for Internet Explorer
-                               d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
-                               playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
-                               playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
-                               playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
-                       }
-               }
-               else if (typeof win.ActiveXObject != UNDEF) {
-                       try {
-                               var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
-                               if (a) { // a will return null when ActiveX is disabled
-                                       d = a.GetVariable("$version");
-                                       if (d) {
-                                               ie = true; // cascaded feature detection for Internet Explorer
-                                               d = d.split(" ")[1].split(",");
-                                               playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
-                                       }
-                               }
-                       }
-                       catch(e) {}
-               }
-               return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
-       }(),
-
-       /* Cross-browser onDomLoad
-               - Will fire an event as soon as the DOM of a web page is loaded
-               - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
-               - Regular onload serves as fallback
-       */
-       onDomLoad = function() {
-               if (!ua.w3) { return; }
-               if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
-                       callDomLoadFunctions();
-               }
-               if (!isDomLoaded) {
-                       if (typeof doc.addEventListener != UNDEF) {
-                               doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
-                       }
-                       if (ua.ie && ua.win) {
-                               doc.attachEvent(ON_READY_STATE_CHANGE, function() {
-                                       if (doc.readyState == "complete") {
-                                               doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
-                                               callDomLoadFunctions();
-                                       }
-                               });
-                               if (win == top) { // if not inside an iframe
-                                       (function(){
-                                               if (isDomLoaded) { return; }
-                                               try {
-                                                       doc.documentElement.doScroll("left");
-                                               }
-                                               catch(e) {
-                                                       setTimeout(arguments.callee, 0);
-                                                       return;
-                                               }
-                                               callDomLoadFunctions();
-                                       })();
-                               }
-                       }
-                       if (ua.wk) {
-                               (function(){
-                                       if (isDomLoaded) { return; }
-                                       if (!/loaded|complete/.test(doc.readyState)) {
-                                               setTimeout(arguments.callee, 0);
-                                               return;
-                                       }
-                                       callDomLoadFunctions();
-                               })();
-                       }
-                       addLoadEvent(callDomLoadFunctions);
-               }
-       }();
-
-       function callDomLoadFunctions() {
-               if (isDomLoaded) { return; }
-               try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
-                       var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
-                       t.parentNode.removeChild(t);
-               }
-               catch (e) { return; }
-               isDomLoaded = true;
-               var dl = domLoadFnArr.length;
-               for (var i = 0; i < dl; i++) {
-                       domLoadFnArr[i]();
-               }
-       }
-
-       function addDomLoadEvent(fn) {
-               if (isDomLoaded) {
-                       fn();
-               }
-               else {
-                       domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
-               }
-       }
-
-       /* Cross-browser onload
-               - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
-               - Will fire an event as soon as a web page including all of its assets are loaded
-        */
-       function addLoadEvent(fn) {
-               if (typeof win.addEventListener != UNDEF) {
-                       win.addEventListener("load", fn, false);
-               }
-               else if (typeof doc.addEventListener != UNDEF) {
-                       doc.addEventListener("load", fn, false);
-               }
-               else if (typeof win.attachEvent != UNDEF) {
-                       addListener(win, "onload", fn);
-               }
-               else if (typeof win.onload == "function") {
-                       var fnOld = win.onload;
-                       win.onload = function() {
-                               fnOld();
-                               fn();
-                       };
-               }
-               else {
-                       win.onload = fn;
-               }
-       }
-
-       /* Main function
-               - Will preferably execute onDomLoad, otherwise onload (as a fallback)
-       */
-       function main() {
-               if (plugin) {
-                       testPlayerVersion();
-               }
-               else {
-                       matchVersions();
-               }
-       }
-
-       /* Detect the Flash Player version for non-Internet Explorer browsers
-               - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
-                 a. Both release and build numbers can be detected
-                 b. Avoid wrong descriptions by corrupt installers provided by Adobe
-                 c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
-               - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
-       */
-       function testPlayerVersion() {
-               var b = doc.getElementsByTagName("body")[0];
-               var o = createElement(OBJECT);
-               o.setAttribute("type", FLASH_MIME_TYPE);
-               var t = b.appendChild(o);
-               if (t) {
-                       var counter = 0;
-                       (function(){
-                               if (typeof t.GetVariable != UNDEF) {
-                                    try
-                                    {
-                                       var d = t.GetVariable("$version");
-                                    } catch(err) {
-                                         //Handle errors here
-                                    }
-                                       if (d) {
-                                               d = d.split(" ")[1].split(",");
-                                               ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
-                                       }
-                               }
-                               else if (counter < 10) {
-                                       counter++;
-                                       setTimeout(arguments.callee, 10);
-                                       return;
-                               }
-                               b.removeChild(o);
-                               t = null;
-                               matchVersions();
-                       })();
-               }
-               else {
-                       matchVersions();
-               }
-       }
-
-       /* Perform Flash Player and SWF version matching; static publishing only
-       */
-       function matchVersions() {
-               var rl = regObjArr.length;
-               if (rl > 0) {
-                       for (var i = 0; i < rl; i++) { // for each registered object element
-                               var id = regObjArr[i].id;
-                               var cb = regObjArr[i].callbackFn;
-                               var cbObj = {success:false, id:id};
-                               if (ua.pv[0] > 0) {
-                                       var obj = getElementById(id);
-                                       if (obj) {
-                                               if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
-                                                       setVisibility(id, true);
-                                                       if (cb) {
-                                                               cbObj.success = true;
-                                                               cbObj.ref = getObjectById(id);
-                                                               cb(cbObj);
-                                                       }
-                                               }
-                                               else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
-                                                       var att = {};
-                                                       att.data = regObjArr[i].expressInstall;
-                                                       att.width = obj.getAttribute("width") || "0";
-                                                       att.height = obj.getAttribute("height") || "0";
-                                                       if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
-                                                       if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
-                                                       // parse HTML object param element's name-value pairs
-                                                       var par = {};
-                                                       var p = obj.getElementsByTagName("param");
-                                                       var pl = p.length;
-                                                       for (var j = 0; j < pl; j++) {
-                                                               if (p[j].getAttribute("name").toLowerCase() != "movie") {
-                                                                       par[p[j].getAttribute("name")] = p[j].getAttribute("value");
-                                                               }
-                                                       }
-                                                       showExpressInstall(att, par, id, cb);
-                                               }
-                                               else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
-                                                       displayAltContent(obj);
-                                                       if (cb) { cb(cbObj); }
-                                               }
-                                       }
-                               }
-                               else {  // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
-                                       setVisibility(id, true);
-                                       if (cb) {
-                                               var o = getObjectById(id); // test whether there is an HTML object element or not
-                                               if (o && typeof o.SetVariable != UNDEF) {
-                                                       cbObj.success = true;
-                                                       cbObj.ref = o;
-                                               }
-                                               cb(cbObj);
-                                       }
-                               }
-                       }
-               }
-       }
-
-       function getObjectById(objectIdStr) {
-               var r = null;
-               var o = getElementById(objectIdStr);
-               if (o && o.nodeName == "OBJECT") {
-                       if (typeof o.SetVariable != UNDEF) {
-                               r = o;
-                       }
-                       else {
-                               var n = o.getElementsByTagName(OBJECT)[0];
-                               if (n) {
-                                       r = n;
-                               }
-                       }
-               }
-               return r;
-       }
-
-       /* Requirements for Adobe Express Install
-               - only one instance can be active at a time
-               - fp 6.0.65 or higher
-               - Win/Mac OS only
-               - no Webkit engines older than version 312
-       */
-       function canExpressInstall() {
-               return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
-       }
-
-       /* Show the Adobe Express Install dialog
-               - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
-       */
-       function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
-               isExpressInstallActive = true;
-               storedCallbackFn = callbackFn || null;
-               storedCallbackObj = {success:false, id:replaceElemIdStr};
-               var obj = getElementById(replaceElemIdStr);
-               if (obj) {
-                       if (obj.nodeName == "OBJECT") { // static publishing
-                               storedAltContent = abstractAltContent(obj);
-                               storedAltContentId = null;
-                       }
-                       else { // dynamic publishing
-                               storedAltContent = obj;
-                               storedAltContentId = replaceElemIdStr;
-                       }
-                       att.id = EXPRESS_INSTALL_ID;
-                       if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
-                       if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
-                       doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
-                       var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
-                               fv = "MMredirectURL=" + win.location.toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
-                       if (typeof par.flashvars != UNDEF) {
-                               par.flashvars += "&" + fv;
-                       }
-                       else {
-                               par.flashvars = fv;
-                       }
-                       // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
-                       // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
-                       if (ua.ie && ua.win && obj.readyState != 4) {
-                               var newObj = createElement("div");
-                               replaceElemIdStr += "SWFObjectNew";
-                               newObj.setAttribute("id", replaceElemIdStr);
-                               obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
-                               obj.style.display = "none";
-                               (function(){
-                                       if (obj.readyState == 4) {
-                                               obj.parentNode.removeChild(obj);
-                                       }
-                                       else {
-                                               setTimeout(arguments.callee, 10);
-                                       }
-                               })();
-                       }
-                       createSWF(att, par, replaceElemIdStr);
-               }
-       }
-
-       /* Functions to abstract and display alternative content
-       */
-       function displayAltContent(obj) {
-               if (ua.ie && ua.win && obj.readyState != 4) {
-                       // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
-                       // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
-                       var el = createElement("div");
-                       obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
-                       el.parentNode.replaceChild(abstractAltContent(obj), el);
-                       obj.style.display = "none";
-                       (function(){
-                               if (obj.readyState == 4) {
-                                       obj.parentNode.removeChild(obj);
-                               }
-                               else {
-                                       setTimeout(arguments.callee, 10);
-                               }
-                       })();
-               }
-               else {
-                       obj.parentNode.replaceChild(abstractAltContent(obj), obj);
-               }
-       }
-
-       function abstractAltContent(obj) {
-               var ac = createElement("div");
-               if (ua.win && ua.ie) {
-                       ac.innerHTML = obj.innerHTML;
-               }
-               else {
-                       var nestedObj = obj.getElementsByTagName(OBJECT)[0];
-                       if (nestedObj) {
-                               var c = nestedObj.childNodes;
-                               if (c) {
-                                       var cl = c.length;
-                                       for (var i = 0; i < cl; i++) {
-                                               if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
-                                                       ac.appendChild(c[i].cloneNode(true));
-                                               }
-                                       }
-                               }
-                       }
-               }
-               return ac;
-       }
-
-       /* Cross-browser dynamic SWF creation
-       */
-       function createSWF(attObj, parObj, id) {
-               var r, el = getElementById(id);
-               if (ua.wk && ua.wk < 312) { return r; }
-               if (el) {
-                       if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
-                               attObj.id = id;
-                       }
-                       if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
-                               var att = "";
-                               for (var i in attObj) {
-                                       if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
-                                               if (i.toLowerCase() == "data") {
-                                                       parObj.movie = attObj[i];
-                                               }
-                                               else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
-                                                       att += ' class="' + attObj[i] + '"';
-                                               }
-                                               else if (i.toLowerCase() != "classid") {
-                                                       att += ' ' + i + '="' + attObj[i] + '"';
-                                               }
-                                       }
-                               }
-                               var par = "";
-                               for (var j in parObj) {
-                                       if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
-                                               par += '<param name="' + j + '" value="' + parObj[j] + '" />';
-                                       }
-                               }
-                               el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
-                               objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
-                               r = getElementById(attObj.id);
-                       }
-                       else { // well-behaving browsers
-                               var o = createElement(OBJECT);
-                               o.setAttribute("type", FLASH_MIME_TYPE);
-                               for (var m in attObj) {
-                                       if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
-                                               if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
-                                                       o.setAttribute("class", attObj[m]);
-                                               }
-                                               else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
-                                                       o.setAttribute(m, attObj[m]);
-                                               }
-                                       }
-                               }
-                               for (var n in parObj) {
-                                       if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
-                                               createObjParam(o, n, parObj[n]);
-                                       }
-                               }
-                               el.parentNode.replaceChild(o, el);
-                               r = o;
-                       }
-               }
-               return r;
-       }
-
-       function createObjParam(el, pName, pValue) {
-               var p = createElement("param");
-               p.setAttribute("name", pName);
-               p.setAttribute("value", pValue);
-               el.appendChild(p);
-       }
-
-       /* Cross-browser SWF removal
-               - Especially needed to safely and completely remove a SWF in Internet Explorer
-       */
-       function removeSWF(id) {
-               var obj = getElementById(id);
-               if (obj && obj.nodeName == "OBJECT") {
-                       if (ua.ie && ua.win) {
-                               obj.style.display = "none";
-                               (function(){
-                                       if (obj.readyState == 4) {
-                                               removeObjectInIE(id);
-                                       }
-                                       else {
-                                               setTimeout(arguments.callee, 10);
-                                       }
-                               })();
-                       }
-                       else {
-                               obj.parentNode.removeChild(obj);
-                       }
-               }
-       }
-
-       function removeObjectInIE(id) {
-               var obj = getElementById(id);
-               if (obj) {
-                       for (var i in obj) {
-                               if (typeof obj[i] == "function") {
-                                       obj[i] = null;
-                               }
-                       }
-                       obj.parentNode.removeChild(obj);
-               }
-       }
-
-       /* Functions to optimize JavaScript compression
-       */
-       function getElementById(id) {
-               var el = null;
-               try {
-                       el = doc.getElementById(id);
-               }
-               catch (e) {}
-               return el;
-       }
-
-       function createElement(el) {
-               return doc.createElement(el);
-       }
-
-       /* Updated attachEvent function for Internet Explorer
-               - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
-       */
-       function addListener(target, eventType, fn) {
-               target.attachEvent(eventType, fn);
-               listenersArr[listenersArr.length] = [target, eventType, fn];
-       }
-
-       /* Flash Player and SWF content version matching
-       */
-       function hasPlayerVersion(rv) {
-               var pv = ua.pv, v = rv.split(".");
-               v[0] = parseInt(v[0], 10);
-               v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
-               v[2] = parseInt(v[2], 10) || 0;
-               return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
-       }
-
-       /* Cross-browser dynamic CSS creation
-               - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
-       */
-       function createCSS(sel, decl, media, newStyle) {
-               if (ua.ie && ua.mac) { return; }
-               var h = doc.getElementsByTagName("head")[0];
-               if (!h) { return; } // to also support badly authored HTML pages that lack a head element
-               var m = (media && typeof media == "string") ? media : "screen";
-               if (newStyle) {
-                       dynamicStylesheet = null;
-                       dynamicStylesheetMedia = null;
-               }
-               if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
-                       // create dynamic stylesheet + get a global reference to it
-                       var s = createElement("style");
-                       s.setAttribute("type", "text/css");
-                       s.setAttribute("media", m);
-                       dynamicStylesheet = h.appendChild(s);
-                       if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
-                               dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
-                       }
-                       dynamicStylesheetMedia = m;
-               }
-               // add style rule
-               if (ua.ie && ua.win) {
-                       if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
-                               dynamicStylesheet.addRule(sel, decl);
-                       }
-               }
-               else {
-                       if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
-                               dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
-                       }
-               }
-       }
-
-       function setVisibility(id, isVisible) {
-               if (!autoHideShow) { return; }
-               var v = isVisible ? "visible" : "hidden";
-               if (isDomLoaded && getElementById(id)) {
-                       getElementById(id).style.visibility = v;
-               }
-               else {
-                       createCSS("#" + id, "visibility:" + v);
-               }
-       }
-
-       /* Filter to avoid XSS attacks
-       */
-       function urlEncodeIfNecessary(s) {
-               var regex = /[\\\"<>\.;]/;
-               var hasBadChars = regex.exec(s) != null;
-               return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
-       }
-
-       /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
-       */
-       var cleanup = function() {
-               if (ua.ie && ua.win) {
-                       window.attachEvent("onunload", function() {
-                               // remove listeners to avoid memory leaks
-                               var ll = listenersArr.length;
-                               for (var i = 0; i < ll; i++) {
-                                       listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
-                               }
-                               // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
-                               var il = objIdArr.length;
-                               for (var j = 0; j < il; j++) {
-                                       removeSWF(objIdArr[j]);
-                               }
-                               // cleanup library's main closures to avoid memory leaks
-                               for (var k in ua) {
-                                       ua[k] = null;
-                               }
-                               ua = null;
-                               for (var l in swfobject) {
-                                       swfobject[l] = null;
-                               }
-                               swfobject = null;
-                       });
-               }
-       }();
-
-       return {
-               /* Public API
-                       - Reference: http://code.google.com/p/swfobject/wiki/documentation
-               */
-               registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
-                       if (ua.w3 && objectIdStr && swfVersionStr) {
-                               var regObj = {};
-                               regObj.id = objectIdStr;
-                               regObj.swfVersion = swfVersionStr;
-                               regObj.expressInstall = xiSwfUrlStr;
-                               regObj.callbackFn = callbackFn;
-                               regObjArr[regObjArr.length] = regObj;
-                               setVisibility(objectIdStr, false);
-                       }
-                       else if (callbackFn) {
-                               callbackFn({success:false, id:objectIdStr});
-                       }
-               },
-
-               getObjectById: function(objectIdStr) {
-                       if (ua.w3) {
-                               return getObjectById(objectIdStr);
-                       }
-               },
-
-               embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
-                       var callbackObj = {success:false, id:replaceElemIdStr};
-                       if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
-                               setVisibility(replaceElemIdStr, false);
-                               addDomLoadEvent(function() {
-                                       widthStr += ""; // auto-convert to string
-                                       heightStr += "";
-                                       var att = {};
-                                       if (attObj && typeof attObj === OBJECT) {
-                                               for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
-                                                       att[i] = attObj[i];
-                                               }
-                                       }
-                                       att.data = swfUrlStr;
-                                       att.width = widthStr;
-                                       att.height = heightStr;
-                                       var par = {};
-                                       if (parObj && typeof parObj === OBJECT) {
-                                               for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
-                                                       par[j] = parObj[j];
-                                               }
-                                       }
-                                       if (flashvarsObj && typeof flashvarsObj === OBJECT) {
-                                               for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
-                                                       if (typeof par.flashvars != UNDEF) {
-                                                               par.flashvars += "&" + k + "=" + flashvarsObj[k];
-                                                       }
-                                                       else {
-                                                               par.flashvars = k + "=" + flashvarsObj[k];
-                                                       }
-                                               }
-                                       }
-                                       if (hasPlayerVersion(swfVersionStr)) { // create SWF
-                                               var obj = createSWF(att, par, replaceElemIdStr);
-                                               if (att.id == replaceElemIdStr) {
-                                                       setVisibility(replaceElemIdStr, true);
-                                               }
-                                               callbackObj.success = true;
-                                               callbackObj.ref = obj;
-                                       }
-                                       else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
-                                               att.data = xiSwfUrlStr;
-                                               showExpressInstall(att, par, replaceElemIdStr, callbackFn);
-                                               return;
-                                       }
-                                       else { // show alternative content
-                                               setVisibility(replaceElemIdStr, true);
-                                       }
-                                       if (callbackFn) { callbackFn(callbackObj); }
-                               });
-                       }
-                       else if (callbackFn) { callbackFn(callbackObj); }
-               },
-
-               switchOffAutoHideShow: function() {
-                       autoHideShow = false;
-               },
-
-               ua: ua,
-
-               getFlashPlayerVersion: function() {
-                       return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
-               },
-
-               hasFlashPlayerVersion: hasPlayerVersion,
-
-               createSWF: function(attObj, parObj, replaceElemIdStr) {
-                       if (ua.w3) {
-                               return createSWF(attObj, parObj, replaceElemIdStr);
-                       }
-                       else {
-                               return undefined;
-                       }
-               },
-
-               showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
-                       if (ua.w3 && canExpressInstall()) {
-                               showExpressInstall(att, par, replaceElemIdStr, callbackFn);
-                       }
-               },
-
-               removeSWF: function(objElemIdStr) {
-                       if (ua.w3) {
-                               removeSWF(objElemIdStr);
-                       }
-               },
-
-               createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
-                       if (ua.w3) {
-                               createCSS(selStr, declStr, mediaStr, newStyleBoolean);
-                       }
-               },
-
-               addDomLoadEvent: addDomLoadEvent,
-
-               addLoadEvent: addLoadEvent,
-
-               getQueryParamValue: function(param) {
-                       var q = doc.location.search || doc.location.hash;
-                       if (q) {
-                               if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
-                               if (param == null) {
-                                       return urlEncodeIfNecessary(q);
-                               }
-                               var pairs = q.split("&");
-                               for (var i = 0; i < pairs.length; i++) {
-                                       if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
-                                               return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
-                                       }
-                               }
-                       }
-                       return "";
-               },
-
-               // For internal usage only
-               expressInstallCallback: function() {
-                       if (isExpressInstallActive) {
-                               var obj = getElementById(EXPRESS_INSTALL_ID);
-                               if (obj && storedAltContent) {
-                                       obj.parentNode.replaceChild(storedAltContent, obj);
-                                       if (storedAltContentId) {
-                                               setVisibility(storedAltContentId, true);
-                                               if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
-                                       }
-                                       if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
-                               }
-                               isExpressInstallActive = false;
-                       }
-               }
-       };
-}();
index 713929f..e582b64 100644 (file)
@@ -60,7 +60,7 @@
     <location>PEAR_GeoIP</location>
     <name>GeoIP</name>
     <license>LGPL</license>
-    <version>1.0.0RC3</version>
+    <version>1.0.0</version>
     <licenseversion>2.1+</licenseversion>
   </library>
   <library>
     <version></version>
     <licenseversion>2.0+</licenseversion>
   </library>
-  <library>
-    <location>base32.php</location>
-    <name>Base32 Library</name>
-    <license>GPL/PHP</license>
-    <version></version>
-    <licenseversion>2.0+/2.0.2</licenseversion>
-  </library>
   <library>
     <location>odbc.php</location>
     <name>ODBC server/client</name>
index 1a288e5..362b3a8 100644 (file)
@@ -54,7 +54,7 @@ class restore_feedback_activity_task extends restore_activity_task {
     static public function define_decode_contents() {
         $contents = array();
 
-        $contents[] = new restore_decode_content('feedback', array('intro'), 'feedback');
+        $contents[] = new restore_decode_content('feedback', array('intro', 'site_after_submit', 'page_after_submit'), 'feedback');
         $contents[] = new restore_decode_content('feedback_item', array('presentation'), 'feedback_item');
         $contents[] = new restore_decode_content('feedback_value', array('value'), 'feedback_value');
 
index 8b73da0..0925fa0 100644 (file)
@@ -723,7 +723,7 @@ abstract class lesson_add_page_form_base extends moodleform {
 
         if ($this->standard === true) {
             $mform->addElement('hidden', 'qtype');
-            $mform->setType('qtype', PARAM_PLUGIN);
+            $mform->setType('qtype', PARAM_INT);
 
             $mform->addElement('text', 'title', get_string('pagetitle', 'lesson'), array('size'=>70));
             $mform->setType('title', PARAM_TEXT);
index 584e12c..8ecae89 100644 (file)
@@ -171,7 +171,7 @@ if ($attempt->timefinish) {
 if (!empty($overtime)) {
     $summarydata['overdue'] = array(
         'title'   => get_string('overdue', 'quiz'),
-        'content' => format_time($overtime),
+        'content' => $overtime,
     );
 }
 
index 1ba0791..06dcb37 100644 (file)
@@ -44,18 +44,18 @@ if ($attempt !== '1') {
 if (!empty($id)) {
     $url->param('id', $id);
     $cm = get_coursemodule_from_id('scorm', $id, 0, false, MUST_EXIST);
-    $course = $DB->get_record('course', array('id'=>$cm->course), '*', MUST_EXIST);
-    $scorm = $DB->get_record('scorm', array('id'=>$cm->instance), '*', MUST_EXIST);
+    $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
+    $scorm = $DB->get_record('scorm', array('id' => $cm->instance), '*', MUST_EXIST);
 } else {
     if (!empty($b)) {
         $url->param('b', $b);
-        $sco = $DB->get_record('scorm_scoes', array('id'=>$b), '*', MUST_EXIST);
-        $a = $sco->scorm;
+        $selsco = $DB->get_record('scorm_scoes', array('id' => $b), '*', MUST_EXIST);
+        $a = $selsco->scorm;
     }
     if (!empty($a)) {
         $url->param('a', $a);
-        $scorm = $DB->get_record('scorm', array('id'=>$a), '*', MUST_EXIST);
-        $course = $DB->get_record('course', array('id'=>$scorm->course), '*', MUST_EXIST);
+        $scorm = $DB->get_record('scorm', array('id' => $a), '*', MUST_EXIST);
+        $course = $DB->get_record('course', array('id' => $scorm->course), '*', MUST_EXIST);
         $cm = get_coursemodule_from_instance('scorm', $scorm->id, $course->id, false, MUST_EXIST);
     }
 }
@@ -84,7 +84,7 @@ if (empty($b)) {
     }
 } else {
     $PAGE->navbar->add("$strattempt $attempt - ".fullname($userdata), new moodle_url('/mod/scorm/userreport.php', array('a'=>$a, 'user'=>$user, 'attempt'=>$attempt)));
-    $PAGE->navbar->add($sco->title);
+    $PAGE->navbar->add($selsco->title);
 }
 echo $OUTPUT->header();
 echo $OUTPUT->heading(format_string($scorm->name));
@@ -153,10 +153,10 @@ if ($scoes = $DB->get_records_select('scorm_scoes', "scorm=? ORDER BY id", array
 
 if (!empty($b)) {
     echo $OUTPUT->box_start('generalbox boxaligncenter');
-    echo $OUTPUT->heading('<a href="'.$CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'&amp;mode=browse&amp;scoid='.$sco->id.'" target="_new">'.format_string($sco->title).'</a>');
+    echo $OUTPUT->heading('<a href="'.$CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'&amp;mode=browse&amp;scoid='.$selsco->id.'" target="_new">'.format_string($selsco->title).'</a>');
     echo '<div class="mdl-align">'."\n";
     $scoreview = '';
-    if ($trackdata = scorm_get_tracks($sco->id, $user, $attempt)) {
+    if ($trackdata = scorm_get_tracks($selsco->id, $user, $attempt)) {
         if ($trackdata->score_raw != '') {
             $scoreview = get_string('score', 'scorm').':&nbsp;'.$trackdata->score_raw;
         }
@@ -210,7 +210,7 @@ if (!empty($b)) {
                     $row[] = s(scorm_format_duration($trackdata->$element));
                 break;
                 default:
-                    s($trackdata->$element);
+                    $row[] = s($trackdata->$element);
                 break;
             }
             $table->data[] = $row;
@@ -337,7 +337,7 @@ if (!empty($b)) {
                 } else if (stristr($element, '.learner_response') !== false) {
                     $string="interactionslearnerresponse";
                 } else if (stristr($element, '.score.min') !== false) {
-                    $string="interactionslscoremin";
+                    $string="interactionsscoremin";
                 } else if (stristr($element, '.score.max') !== false) {
                     $string="interactionsscoremax";
                 } else if (stristr($element, '.score.raw') !== false) {
index 4498394..572b198 100644 (file)
@@ -44,6 +44,7 @@ $string['displayselect_help'] = 'This setting, together with the URL file type a
 $string['displayselectexplain'] = 'Choose display type, unfortunately not all types are suitable for all URLs.';
 $string['externalurl'] = 'External URL';
 $string['framesize'] = 'Frame height';
+$string['invalidstoredurl'] = 'Invalid URL';
 $string['chooseavariable'] = 'Choose a variable...';
 $string['invalidurl'] = 'Entered URL is invalid';
 $string['modulename'] = 'URL';
index a18093a..8996c22 100644 (file)
@@ -55,6 +55,12 @@ $completion->set_module_viewed($cm);
 
 $PAGE->set_url('/mod/url/view.php', array('id' => $cm->id));
 
+// Make sure URL is valid before generating output
+$url->externalurl = clean_param($url->externalurl, PARAM_URL);
+if (empty($url->externalurl)) {
+    print_error('invalidstoredurl', 'url');
+}
+
 if ($redirect) {
     // coming from course page or url index page,
     // the redirection is needed for completion tracking and logging
index e2367e6..e94c202 100644 (file)
@@ -109,9 +109,13 @@ class qtype_multichoice_edit_form extends question_edit_form {
         foreach ($answers as $key => $answer) {
             //check no of choices
             $trimmedanswer = trim($answer['text']);
-            if (empty($trimmedanswer)) {
+            $fraction = (float) $data['fraction'][$key];
+            if (empty($trimmedanswer) && empty($fraction)) {
                 continue;
             }
+            if (empty($trimmedanswer)) {
+                $errors['fraction['.$key.']'] = get_string('errgradesetanswerblank', 'qtype_multichoice');
+            }
 
             $answercount++;
 
index 091b62e..ae44717 100644 (file)
@@ -41,6 +41,7 @@ $string['clozeaid'] = 'Enter missing word';
 $string['correctansweris'] = 'The correct answer is: {$a}.';
 $string['correctfeedback'] = 'For any correct response';
 $string['editingmultichoice'] = 'Editing a Multiple choice question';
+$string['errgradesetanswerblank'] = 'Grade set, but the Answer is blank';
 $string['errfractionsaddwrong'] = 'The positive grades you have chosen do not add up to 100%<br />Instead, they add up to {$a}%';
 $string['errfractionsnomax'] = 'One of the choices should be 100%, so that it is<br />possible to get a full grade for this question.';
 $string['feedback'] = 'Feedback';
index 3cb4db5..862bec3 100644 (file)
@@ -60,7 +60,7 @@ class core_rss_renderer extends plugin_renderer_base {
         $return = $OUTPUT->heading(get_string('rss'), 3, 'main', true);
         $return .= $OUTPUT->box_start('generalbox webservicestokenui');
 
-        //$return .= get_string('keyshelp', 'webservice');
+        $return .= get_string('rsskeyshelp');
 
         $table = new html_table();
         $table->head  = array($strtoken, $stroperation);
@@ -82,4 +82,4 @@ class core_rss_renderer extends plugin_renderer_base {
         $return .= $OUTPUT->box_end();
         return $return;
     }
-}
\ No newline at end of file
+}
index 4d55557..7519151 100644 (file)
@@ -12,27 +12,32 @@ if ($node) {
 }
 $PAGE->navbar->add(get_string('amftestclient', 'webservice'));
 
-$flashvars = new stdClass();
-$flashvars->rooturl =$CFG->wwwroot;
-
-
-$PAGE->requires->js('/lib/swfobject/swfobject.js', true);
-
-$PAGE->requires->js_function_call('swfobject.embedSWF',
-                array($CFG->wwwroot.'/webservice/amf/testclient/AMFTester.swf', //movie
-                    'moodletestclient', // div id
-                    '100%', // width
-                    '1000', // height
-                    '9.0', // version
-                    false,//no express install swf
-                    $flashvars), //flash vars
-                true
-            );
-
 $PAGE->set_title('Test Client');
 $PAGE->set_heading('Test Client');
 echo $OUTPUT->header();
-echo '<div id="moodletestclient">
-      <p>You need to install Flash 9.0</p>
-    </div>';
+
+$url = $CFG->wwwroot.'/webservice/amf/testclient/AMFTester.swf';
+$output = <<<OET
+<div id="moodletestclient">
+<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="1000">
+<param name="movie" value="$url" />
+<param name="base" value="." />
+<param name="allowscriptaccess" value="sameDomain" />
+<param name="FlashVars" value="rooturl=$CFG->wwwroot" />
+<!--[if !IE]>-->
+<object type="application/x-shockwave-flash" data="$url" width="100%" height="1000">
+  <param name="base" value="." />
+  <param name="allowscriptaccess" value="sameDomain" />
+  <param name="FlashVars" value="rooturl=$CFG->wwwroot" />
+<!--<![endif]-->
+<p>You need to install Flash 9.0</p>
+<!--[if !IE]>-->
+</object>
+<!--<![endif]-->
+</object>
+</span>
+OET;
+
+echo $output;
+
 echo $OUTPUT->footer();