Ignore:
Timestamp:
May 2, 2016, 12:09:23 PM (3 years ago)
Author:
jrpelegrina
Message:

Updated to moodle 3.0.3

Location:
moodle/trunk/fuentes/filter
Files:
2 added
40 edited

Legend:

Unmodified
Added
Removed
  • moodle/trunk/fuentes/filter/activitynames/version.php

    r136 r1331  
    2626defined('MOODLE_INTERNAL') || die();
    2727
    28 $plugin->version   = 2014111000;        // The current plugin version (Date: YYYYMMDDXX)
    29 $plugin->requires  = 2014110400;        // Requires this Moodle version
     28$plugin->version   = 2015111600;        // The current plugin version (Date: YYYYMMDDXX)
     29$plugin->requires  = 2015111000;        // Requires this Moodle version
    3030$plugin->component = 'filter_activitynames'; // Full name of the plugin (used for diagnostics)
  • moodle/trunk/fuentes/filter/algebra/algebradebug.php

    r136 r1331  
    44      // and uses mimeTeX to create the image file
    55
    6     define('NO_MOODLE_COOKIES', true); // Because it interferes with caching
    7 
    86    require_once("../../config.php");
    97
     
    1513    require_once($CFG->dirroot.'/filter/tex/lib.php');
    1614
     15    $action = optional_param('action', '', PARAM_ALPHANUM);
     16    $algebra = optional_param('algebra', '', PARAM_RAW);
     17
    1718    require_login();
    1819    require_capability('moodle/site:config', context_system::instance());
    19 
    20     $query = urldecode($_SERVER['QUERY_STRING']);
    21 
    22     if ($query) {
    23       $output = $query;
    24       $splitpos = strpos($query,'&')-8;
    25       $algebra = substr($query,8,$splitpos);
     20    if ($action || $algebra) {
     21        require_sesskey();
     22    }
     23
     24    if ($algebra && $action) {
    2625      $md5 = md5($algebra);
    27       if (strpos($query,'ShowDB') || strpos($query,'DeleteDB')) {
     26      if ($action == 'ShowDB' || $action == 'DeleteDB') {
    2827        $texcache = $DB->get_record("cache_filters", array("filter"=>"algebra", "md5key"=>$md5));
    2928      }
    30       if (strpos($query,'ShowDB')) {
     29      if ($action == 'ShowDB') {
    3130        if ($texcache) {
    3231          $output = "DB cache_filters entry for $algebra\n";
     
    4140        }
    4241      }
    43       if (strpos($query,'DeleteDB')) {
     42      if ($action == 'DeleteDB') {
    4443        if ($texcache) {
    4544          $output = "Deleting DB cache_filters entry for $algebra\n";
     
    5554        }
    5655      }
    57       if (strpos($query,'TeXStage1')) {
     56      if ($action == 'TeXStage1') {
    5857        $output = algebra2tex($algebra);
    5958      }
    60       if (strpos($query,'TeXStage2')) {
     59      if ($action == 'TexStage2') {
    6160        $output = algebra2tex($algebra);
    6261        $output = refineTeX($output);
    6362      }
    64       if (strpos($query,'ShowImage')||strpos($query,'SlashArguments')) {
     63      if ($action == 'ShowImage'|| $action == 'SlashArguments') {
    6564        $output = algebra2tex($algebra);
    6665        $output = refineTeX($output);
    67         if (strpos($query,'ShowImage')) {
     66        if ($action == 'ShowImage') {
    6867          tex2image($output, $md5);
    6968        } else {
     
    286285            </center>
    287286           <ol>
    288            <li>First click on this button <input type="submit" name="ShowDB" value="Show DB Entry" />
     287           <li>First click on this button <button type="submit" name="action" value="ShowDB">Show DB Entry</button>
    289288               to see the cache_filters database entry for this expression.</li>
    290289           <li>If the database entry looks corrupt, click on this button to delete it:
    291                <input type="submit" name="DeleteDB" value="Delete DB Entry" /></li>
    292            <li>Now click on this button <input type="submit" name="TeXStage1" value="First Stage Tex Translation" />.
     290               <button type="submit" name="action" value="DeleteDB">Delete DB Entry</button></li>
     291           <li>Now click on this button <button type="submit" name="action" value="TeXStage1">First Stage Tex Translation</button>.
    293292               A preliminary translation into TeX will appear in the box below.</li>
    294            <li>Next click on this button <input type="submit" name="TeXStage2" value="Second Stage Tex Translation" />.
     293           <li>Next click on this button <button type="submit" name="action" value="TexStage2">Second Stage Tex Translation</button>.
    295294               A more refined translation into TeX will appear in the box below.</li>
    296            <li>Then click on this button <input type="submit" name="ShowImage" value="Show Image" />
     295           <li>Then click on this button <button type="submit" name="action" value="ShowImage">Show Image</button>
    297296               to show a graphic image of the algebraic expression.</li>
    298297           <li>Finally check your slash arguments setting
    299                <input type="submit" name="SlashArguments" value="Check Slash Arguments" /></li>
     298               <button type="submit" name="action" value="SlashArguments">Check Slash Arguments</button></li>
    300299           </ol>
     300           <input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
    301301          </form> <br /> <br />
    302302       <center>
  • moodle/trunk/fuentes/filter/algebra/version.php

    r136 r1331  
    2626defined('MOODLE_INTERNAL') || die();
    2727
    28 $plugin->version   = 2014111000;        // The current plugin version (Date: YYYYMMDDXX)
    29 $plugin->requires  = 2014110400;        // Requires this Moodle version
     28$plugin->version   = 2015111600;        // The current plugin version (Date: YYYYMMDDXX)
     29$plugin->requires  = 2015111000;        // Requires this Moodle version
    3030$plugin->component = 'filter_algebra';  // Full name of the plugin (used for diagnostics)
  • moodle/trunk/fuentes/filter/censor/version.php

    r136 r1331  
    2626defined('MOODLE_INTERNAL') || die();
    2727
    28 $plugin->version   = 2014111000;        // The current plugin version (Date: YYYYMMDDXX)
    29 $plugin->requires  = 2014110400;        // Requires this Moodle version
     28$plugin->version   = 2015111600;        // The current plugin version (Date: YYYYMMDDXX)
     29$plugin->requires  = 2015111000;        // Requires this Moodle version
    3030$plugin->component = 'filter_censor';   // Full name of the plugin (used for diagnostics)
  • moodle/trunk/fuentes/filter/data/filter.php

    r136 r1331  
    3333
    3434    public function filter($text, array $options = array()) {
    35         global $CFG, $DB;
     35        global $CFG, $DB, $USER;
    3636
    37         // Trivial-cache - keyed on $cachedcontextid
    38         static $cachedcontextid;
    39         static $contentlist;
     37        // Trivial-cache - keyed on $cachedcourseid + $cacheduserid.
     38        static $cachedcourseid = null;
     39        static $cacheduserid = null;
     40        static $coursecontentlist = array();
     41        static $sitecontentlist = array();
    4042
    4143        static $nothingtodo;
     
    4446        $coursectx = $this->context->get_course_context(false);
    4547        if (!$coursectx) {
     48            // We could be in a course category so no entries for courseid == 0 will be found.
    4649            $courseid = 0;
    4750        } else {
     
    4952        }
    5053
    51         // Initialise/invalidate our trivial cache if dealing with a different context
    52         if (!isset($cachedcontextid) || $cachedcontextid !== $this->context->id) {
    53             $cachedcontextid = $this->context->id;
    54             $contentlist = array();
     54        if ($cacheduserid !== $USER->id) {
     55            // Invalidate all caches if the user changed.
     56            $coursecontentlist = array();
     57            $sitecontentlist = array();
     58            $cacheduserid = $USER->id;
     59            $cachedcourseid = $courseid;
     60            $nothingtodo = false;
     61        } else if ($courseid != get_site()->id && $courseid != 0 && $cachedcourseid != $courseid) {
     62            // Invalidate course-level caches if the course id changed.
     63            $coursecontentlist = array();
     64            $cachedcourseid = $courseid;
    5565            $nothingtodo = false;
    5666        }
     
    5868        if ($nothingtodo === true) {
    5969            return $text;
     70        }
     71
     72        // If courseid == 0 only site entries will be returned.
     73        if ($courseid == get_site()->id || $courseid == 0) {
     74            $contentlist = & $sitecontentlist;
     75        } else {
     76            $contentlist = & $coursecontentlist;
    6077        }
    6178
  • moodle/trunk/fuentes/filter/data/version.php

    r136 r1331  
    2626defined('MOODLE_INTERNAL') || die();
    2727
    28 $plugin->version  = 2014111000;
    29 $plugin->requires = 2014110400;  // Requires this Moodle version
     28$plugin->version  = 2015111600;
     29$plugin->requires = 2015111000;  // Requires this Moodle version.
    3030$plugin->component= 'filter_data';
    3131
    32 $plugin->dependencies = array('mod_data' => 2014110400);
     32$plugin->dependencies = array('mod_data' => 2015111000);
  • moodle/trunk/fuentes/filter/emailprotect/version.php

    r136 r1331  
    2626defined('MOODLE_INTERNAL') || die();
    2727
    28 $plugin->version   = 2014111000;        // The current plugin version (Date: YYYYMMDDXX)
    29 $plugin->requires  = 2014110400;        // Requires this Moodle version
     28$plugin->version   = 2015111600;        // The current plugin version (Date: YYYYMMDDXX)
     29$plugin->requires  = 2015111000;        // Requires this Moodle version
    3030$plugin->component = 'filter_emailprotect'; // Full name of the plugin (used for diagnostics)
  • moodle/trunk/fuentes/filter/emoticon/filter.php

    r136 r1331  
    3434
    3535    /**
    36      * @var array global configuration for this filter
    37      *
    38      * This might be eventually moved into parent class if we found it
    39      * useful for other filters, too.
    40      */
    41     protected static $globalconfig;
    42 
    43     /**
    4436     * Apply the filter to the text
    4537     *
     
    5749            return $text;
    5850        }
    59         if (in_array($options['originalformat'], explode(',', $this->get_global_config('formats')))) {
     51        if (in_array($options['originalformat'], explode(',', get_config('filter_emoticon', 'formats')))) {
    6052            $this->replace_emoticons($text);
    6153        }
     
    6658    // internal implementation starts here
    6759    ////////////////////////////////////////////////////////////////////////////
    68 
    69     /**
    70      * Returns the global filter setting
    71      *
    72      * If the $name is provided, returns single value. Otherwise returns all
    73      * global settings in object. Returns null if the named setting is not
    74      * found.
    75      *
    76      * @param mixed $name optional config variable name, defaults to null for all
    77      * @return string|object|null
    78      */
    79     protected function get_global_config($name=null) {
    80         $this->load_global_config();
    81         if (is_null($name)) {
    82             return self::$globalconfig;
    83 
    84         } elseif (array_key_exists($name, self::$globalconfig)) {
    85             return self::$globalconfig->{$name};
    86 
    87         } else {
    88             return null;
    89         }
    90     }
    91 
    92     /**
    93      * Makes sure that the global config is loaded in $this->globalconfig
    94      *
    95      * @return void
    96      */
    97     protected function load_global_config() {
    98         if (is_null(self::$globalconfig)) {
    99             self::$globalconfig = get_config(get_class($this));
    100         }
    101     }
    10260
    10361    /**
  • moodle/trunk/fuentes/filter/emoticon/tests/filter_test.php

    r136 r1331  
    7070        $this->context = context_system::instance();
    7171        // Define FORMAT_HTML as only one filtering in DB.
    72         set_config('formats', implode(',', array(FORMAT_HTML)), get_class($this));
     72        set_config('formats', implode(',', array(FORMAT_HTML)), 'filter_emoticon');
    7373    }
    7474}
  • moodle/trunk/fuentes/filter/emoticon/version.php

    r136 r1331  
    2626defined('MOODLE_INTERNAL') || die();
    2727
    28 $plugin->version   = 2014111000;        // The current plugin version (Date: YYYYMMDDXX)
    29 $plugin->requires  = 2014110400;        // Requires this Moodle version
     28$plugin->version   = 2015111600;        // The current plugin version (Date: YYYYMMDDXX)
     29$plugin->requires  = 2015111000;        // Requires this Moodle version
    3030$plugin->component = 'filter_emoticon'; // Full name of the plugin (used for diagnostics)
  • moodle/trunk/fuentes/filter/glossary/version.php

    r136 r1331  
    2626defined('MOODLE_INTERNAL') || die();
    2727
    28 $plugin->version  = 2014111000;
    29 $plugin->requires = 2014110400;  // Requires this Moodle version
     28$plugin->version  = 2015111600;
     29$plugin->requires = 2015111000;  // Requires this Moodle version.
    3030$plugin->component= 'filter_glossary';
    3131
    32 $plugin->dependencies = array('mod_glossary' => 2014110400);
     32$plugin->dependencies = array('mod_glossary' => 2015111000);
  • moodle/trunk/fuentes/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-debug.js

    r136 r1331  
    2020Y.extend(AUTOLINKER, Y.Base, {
    2121    overlay : null,
     22    alertpanels: {},
    2223    initializer : function() {
    2324        var self = this;
    24         Y.delegate('click', function(e){
    25             e.preventDefault();
     25        require(['core/event'], function(event) {
     26            Y.delegate('click', function(e){
     27                e.preventDefault();
    2628
    27             //display a progress indicator
    28             var title = '',
    29                 content = Y.Node.create('<div id="glossaryfilteroverlayprogress"><img src="'+M.cfg.loadingicon+'" class="spinner" /></div>'),
    30                 o = new Y.Overlay({
    31                     headerContent :  title,
    32                     bodyContent : content
    33                 }),
    34                 fullurl,
    35                 cfg;
    36             self.overlay = o;
    37             o.render(Y.one(document.body));
     29                //display a progress indicator
     30                var title = '',
     31                    content = Y.Node.create('<div id="glossaryfilteroverlayprogress">' +
     32                                            '<img src="' + M.cfg.loadingicon + '" class="spinner" />' +
     33                                            '</div>'),
     34                    o = new Y.Overlay({
     35                        headerContent :  title,
     36                        bodyContent : content
     37                    }),
     38                    fullurl,
     39                    cfg;
     40                self.overlay = o;
     41                o.render(Y.one(document.body));
    3842
    39             //Switch over to the ajax url and fetch the glossary item
    40             fullurl = this.getAttribute('href').replace('showentry.php','showentry_ajax.php');
    41             cfg = {
    42                 method: 'get',
    43                 context : self,
    44                 on: {
    45                     success: function(id, o) {
    46                         this.display_callback(o.responseText);
    47                     },
    48                     failure: function(id, o) {
    49                         var debuginfo = o.statusText;
    50                         if (M.cfg.developerdebug) {
    51                             o.statusText += ' (' + fullurl + ')';
     43                //Switch over to the ajax url and fetch the glossary item
     44                fullurl = this.getAttribute('href').replace('showentry.php','showentry_ajax.php');
     45                cfg = {
     46                    method: 'get',
     47                    context : self,
     48                    on: {
     49                        success: function(id, o) {
     50                            this.display_callback(o.responseText, event);
     51                        },
     52                        failure: function(id, o) {
     53                            var debuginfo = o.statusText;
     54                            if (M.cfg.developerdebug) {
     55                                o.statusText += ' (' + fullurl + ')';
     56                            }
     57                            new M.core.exception({ message: debuginfo });
    5258                        }
    53                         this.display_callback('bodyContent',debuginfo);
    5459                    }
    55                 }
    56             };
    57             Y.io(fullurl, cfg);
     60                };
     61                Y.io(fullurl, cfg);
    5862
    59         }, Y.one(document.body), 'a.glossary.autolink.concept');
     63            }, Y.one(document.body), 'a.glossary.autolink.concept');
     64        });
    6065    },
    61     display_callback : function(content) {
     66    /**
     67     * @method display_callback
     68     * @param {String} content - Content to display
     69     * @param {Object} event The amd event module used to fire events for jquery and yui.
     70     */
     71    display_callback : function(content, event) {
    6272        var data,
    6373            key,
    64             alertpanel;
     74            alertpanel,
     75            alertpanelid,
     76            definition,
     77            position;
    6578        try {
    6679            data = Y.JSON.parse(content);
     
    7083                for (key in data.entries) {
    7184                    definition = data.entries[key].definition + data.entries[key].attachments;
    72                     alertpanel = new M.core.alert({title:data.entries[key].concept,
     85                    alertpanel = new M.core.alert({title:data.entries[key].concept, draggable: true,
    7386                        message:definition, modal:false, yesLabel: M.util.get_string('ok', 'moodle')});
    74                     alertpanel.show();
    75                     Y.fire(M.core.event.FILTER_CONTENT_UPDATED, {nodes: (new Y.NodeList(alertpanel.get('boundingBox')))});
     87                    // Notify the filters about the modified nodes.
     88                    event.notifyFilterContentUpdated(alertpanel.get('boundingBox').getDOMNode());
     89                    Y.Node.one('#id_yuialertconfirm-' + alertpanel.get('COUNT')).focus();
    7690
    77                     Y.Node.one('#id_yuialertconfirm-' + alertpanel.get('COUNT')).focus();
     91                    // Register alertpanel for stacking.
     92                    alertpanelid = '#moodle-dialogue-' + alertpanel.get('COUNT');
     93                    alertpanel.on('complete', this._deletealertpanel, this, alertpanelid);
     94
     95                    // We already have some windows opened, so set the right position...
     96                    if (!Y.Object.isEmpty(this.alertpanels)){
     97                        position = this._getLatestWindowPosition();
     98                        Y.Node.one(alertpanelid).setXY([position[0] + 10, position[1] + 10]);
     99                    }
     100
     101                    this.alertpanels[alertpanelid] = Y.Node.one(alertpanelid).getXY();
    78102                }
    79103
     
    86110        }
    87111        return false;
     112    },
     113    _getLatestWindowPosition : function() {
     114        var lastPosition = [0, 0];
     115        Y.Object.each(this.alertpanels, function(position) {
     116            if (position[0] > lastPosition[0]){
     117                lastPosition = position;
     118            }
     119        });
     120        return lastPosition;
     121    },
     122    _deletealertpanel : function(ev, alertpanelid) {
     123        delete this.alertpanels[alertpanelid];
    88124    }
    89125}, {
     
    145181        "overlay",
    146182        "moodle-core-event",
    147         "moodle-core-notification-alert"
     183        "moodle-core-notification-alert",
     184        "moodle-core-notification-exception",
     185        "moodle-core-notification-ajaxexception"
    148186    ]
    149187});
  • moodle/trunk/fuentes/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker-min.js

    r136 r1331  
    1 YUI.add("moodle-filter_glossary-autolinker",function(e,t){var n="Glossary filter autolinker",r="width",i="height",s="menubar",o="location",u="scrollbars",a="resizable",f="toolbar",l="status",c="directories",h="fullscreen",p="dependent",d;d=function(){d.superclass.constructor.apply(this,arguments)},e.extend(d,e.Base,{overlay:null,initializer:function(){var t=this;e.delegate("click",function(n){n.preventDefault();var r="",i=e.Node.create('<div id="glossaryfilteroverlayprogress"><img src="'+M.cfg.loadingicon+'" class="spinner" /></div>'),s=new e.Overlay({headerContent:r,bodyContent:i}),o,u;t.overlay=s,s.render(e.one(document.body)),o=this.getAttribute("href").replace("showentry.php","showentry_ajax.php"),u={method:"get",context:t,on:{success:function(e,t){this.display_callback(t.responseText)},failure:function(e,t){var n=t.statusText;M.cfg.developerdebug&&(t.statusText+=" ("+o+")"),this.display_callback("bodyContent",n)}}},e.io(o,u)},e.one(document.body),"a.glossary.autolink.concept")},display_callback:function(t){var n,r,i;try{n=e.JSON.parse(t);if(n.success){this.overlay.hide();for(r in n.entries)definition=n.entries[r].definition+n.entries[r].attachments,i=new M.core.alert({title:n.entries[r].concept,message:definition,modal:!1,yesLabel:M.util.get_string("ok","moodle")}),i.show(),e.fire(M.core.event.FILTER_CONTENT_UPDATED,{nodes:new e.NodeList(i.get("boundingBox"))}),e.Node.one("#id_yuialertconfirm-"+i.get("COUNT")).focus();return!0}n.error&&new M.core.ajaxException(n)}catch(s){new M.core.exception(s)}return!1}},{NAME:n,ATTRS:{url:{validator:e.Lang.isString,value:M.cfg.wwwroot+"/mod/glossary/showentry.php"},name:{validator:e.Lang.isString,value:"glossaryconcept"},options:{getter:function(){return{width:this.get(r),height:this.get(i),menubar:this.get(s),location:this.get(o),scrollbars:this.get(u),resizable:this.get(a),toolbar:this.get(f),status:this.get(l),directories:this.get(c),fullscreen:this.get(h),dependent:this.get(p)}},readOnly:!0},width:{value:600},height:{value:450},menubar:{value:!1},location:{value:!1},scrollbars:{value:!0},resizable:{value:!0},toolbar:{value:!0},status:{value:!0},directories:{value:!1},fullscreen:{value:!1},dependent:{value:!0}}}),M.filter_glossary=M.filter_glossary||{},M.filter_glossary.init_filter_autolinking=function(e){return new d(e)}},"@VERSION@",{requires:["base","node","io-base","json-parse","event-delegate","overlay","moodle-core-event","moodle-core-notification-alert"]});
     1YUI.add("moodle-filter_glossary-autolinker",function(e,t){var n="Glossary filter autolinker",r="width",i="height",s="menubar",o="location",u="scrollbars",a="resizable",f="toolbar",l="status",c="directories",h="fullscreen",p="dependent",d;d=function(){d.superclass.constructor.apply(this,arguments)},e.extend(d,e.Base,{overlay:null,alertpanels:{},initializer:function(){var t=this;require(["core/event"],function(n){e.delegate("click",function(r){r.preventDefault();var i="",s=e.Node.create('<div id="glossaryfilteroverlayprogress"><img src="'+M.cfg.loadingicon+'" class="spinner" />'+"</div>"),o=new e.Overlay({headerContent:i,bodyContent:s}),u,a;t.overlay=o,o.render(e.one(document.body)),u=this.getAttribute("href").replace("showentry.php","showentry_ajax.php"),a={method:"get",context:t,on:{success:function(e,t){this.display_callback(t.responseText,n)},failure:function(e,t){var n=t.statusText;M.cfg.developerdebug&&(t.statusText+=" ("+u+")"),new M.core.exception({message:n})}}},e.io(u,a)},e.one(document.body),"a.glossary.autolink.concept")})},display_callback:function(t,n){var r,i,s,o,u,a;try{r=e.JSON.parse(t);if(r.success){this.overlay.hide();for(i in r.entries)u=r.entries[i].definition+r.entries[i].attachments,s=new M.core.alert({title:r.entries[i].concept,draggable:!0,message:u,modal:!1,yesLabel:M.util.get_string("ok","moodle")}),n.notifyFilterContentUpdated(s.get("boundingBox").getDOMNode()),e.Node.one("#id_yuialertconfirm-"+s.get("COUNT")).focus(),o="#moodle-dialogue-"+s.get("COUNT"),s.on("complete",this._deletealertpanel,this,o),e.Object.isEmpty(this.alertpanels)||(a=this._getLatestWindowPosition(),e.Node.one(o).setXY([a[0]+10,a[1]+10])),this.alertpanels[o]=e.Node.one(o).getXY();return!0}r.error&&new M.core.ajaxException(r)}catch(f){new M.core.exception(f)}return!1},_getLatestWindowPosition:function(){var t=[0,0];return e.Object.each(this.alertpanels,function(e){e[0]>t[0]&&(t=e)}),t},_deletealertpanel:function(e,t){delete this.alertpanels[t]}},{NAME:n,ATTRS:{url:{validator:e.Lang.isString,value:M.cfg.wwwroot+"/mod/glossary/showentry.php"},name:{validator:e.Lang.isString,value:"glossaryconcept"},options:{getter:function(){return{width:this.get(r),height:this.get(i),menubar:this.get(s),location:this.get(o),scrollbars:this.get(u),resizable:this.get(a),toolbar:this.get(f),status:this.get(l),directories:this.get(c),fullscreen:this.get(h),dependent:this.get(p)}},readOnly:!0},width:{value:600},height:{value:450},menubar:{value:!1},location:{value:!1},scrollbars:{value:!0},resizable:{value:!0},toolbar:{value:!0},status:{value:!0},directories:{value:!1},fullscreen:{value:!1},dependent:{value:!0}}}),M.filter_glossary=M.filter_glossary||{},M.filter_glossary.init_filter_autolinking=function(e){return new d(e)}},"@VERSION@",{requires:["base","node","io-base","json-parse","event-delegate","overlay","moodle-core-event","moodle-core-notification-alert","moodle-core-notification-exception","moodle-core-notification-ajaxexception"]});
  • moodle/trunk/fuentes/filter/glossary/yui/build/moodle-filter_glossary-autolinker/moodle-filter_glossary-autolinker.js

    r136 r1331  
    2020Y.extend(AUTOLINKER, Y.Base, {
    2121    overlay : null,
     22    alertpanels: {},
    2223    initializer : function() {
    2324        var self = this;
    24         Y.delegate('click', function(e){
    25             e.preventDefault();
     25        require(['core/event'], function(event) {
     26            Y.delegate('click', function(e){
     27                e.preventDefault();
    2628
    27             //display a progress indicator
    28             var title = '',
    29                 content = Y.Node.create('<div id="glossaryfilteroverlayprogress"><img src="'+M.cfg.loadingicon+'" class="spinner" /></div>'),
    30                 o = new Y.Overlay({
    31                     headerContent :  title,
    32                     bodyContent : content
    33                 }),
    34                 fullurl,
    35                 cfg;
    36             self.overlay = o;
    37             o.render(Y.one(document.body));
     29                //display a progress indicator
     30                var title = '',
     31                    content = Y.Node.create('<div id="glossaryfilteroverlayprogress">' +
     32                                            '<img src="' + M.cfg.loadingicon + '" class="spinner" />' +
     33                                            '</div>'),
     34                    o = new Y.Overlay({
     35                        headerContent :  title,
     36                        bodyContent : content
     37                    }),
     38                    fullurl,
     39                    cfg;
     40                self.overlay = o;
     41                o.render(Y.one(document.body));
    3842
    39             //Switch over to the ajax url and fetch the glossary item
    40             fullurl = this.getAttribute('href').replace('showentry.php','showentry_ajax.php');
    41             cfg = {
    42                 method: 'get',
    43                 context : self,
    44                 on: {
    45                     success: function(id, o) {
    46                         this.display_callback(o.responseText);
    47                     },
    48                     failure: function(id, o) {
    49                         var debuginfo = o.statusText;
    50                         if (M.cfg.developerdebug) {
    51                             o.statusText += ' (' + fullurl + ')';
     43                //Switch over to the ajax url and fetch the glossary item
     44                fullurl = this.getAttribute('href').replace('showentry.php','showentry_ajax.php');
     45                cfg = {
     46                    method: 'get',
     47                    context : self,
     48                    on: {
     49                        success: function(id, o) {
     50                            this.display_callback(o.responseText, event);
     51                        },
     52                        failure: function(id, o) {
     53                            var debuginfo = o.statusText;
     54                            if (M.cfg.developerdebug) {
     55                                o.statusText += ' (' + fullurl + ')';
     56                            }
     57                            new M.core.exception({ message: debuginfo });
    5258                        }
    53                         this.display_callback('bodyContent',debuginfo);
    5459                    }
    55                 }
    56             };
    57             Y.io(fullurl, cfg);
     60                };
     61                Y.io(fullurl, cfg);
    5862
    59         }, Y.one(document.body), 'a.glossary.autolink.concept');
     63            }, Y.one(document.body), 'a.glossary.autolink.concept');
     64        });
    6065    },
    61     display_callback : function(content) {
     66    /**
     67     * @method display_callback
     68     * @param {String} content - Content to display
     69     * @param {Object} event The amd event module used to fire events for jquery and yui.
     70     */
     71    display_callback : function(content, event) {
    6272        var data,
    6373            key,
    64             alertpanel;
     74            alertpanel,
     75            alertpanelid,
     76            definition,
     77            position;
    6578        try {
    6679            data = Y.JSON.parse(content);
     
    7083                for (key in data.entries) {
    7184                    definition = data.entries[key].definition + data.entries[key].attachments;
    72                     alertpanel = new M.core.alert({title:data.entries[key].concept,
     85                    alertpanel = new M.core.alert({title:data.entries[key].concept, draggable: true,
    7386                        message:definition, modal:false, yesLabel: M.util.get_string('ok', 'moodle')});
    74                     alertpanel.show();
    75                     Y.fire(M.core.event.FILTER_CONTENT_UPDATED, {nodes: (new Y.NodeList(alertpanel.get('boundingBox')))});
     87                    // Notify the filters about the modified nodes.
     88                    event.notifyFilterContentUpdated(alertpanel.get('boundingBox').getDOMNode());
     89                    Y.Node.one('#id_yuialertconfirm-' + alertpanel.get('COUNT')).focus();
    7690
    77                     Y.Node.one('#id_yuialertconfirm-' + alertpanel.get('COUNT')).focus();
     91                    // Register alertpanel for stacking.
     92                    alertpanelid = '#moodle-dialogue-' + alertpanel.get('COUNT');
     93                    alertpanel.on('complete', this._deletealertpanel, this, alertpanelid);
     94
     95                    // We already have some windows opened, so set the right position...
     96                    if (!Y.Object.isEmpty(this.alertpanels)){
     97                        position = this._getLatestWindowPosition();
     98                        Y.Node.one(alertpanelid).setXY([position[0] + 10, position[1] + 10]);
     99                    }
     100
     101                    this.alertpanels[alertpanelid] = Y.Node.one(alertpanelid).getXY();
    78102                }
    79103
     
    86110        }
    87111        return false;
     112    },
     113    _getLatestWindowPosition : function() {
     114        var lastPosition = [0, 0];
     115        Y.Object.each(this.alertpanels, function(position) {
     116            if (position[0] > lastPosition[0]){
     117                lastPosition = position;
     118            }
     119        });
     120        return lastPosition;
     121    },
     122    _deletealertpanel : function(ev, alertpanelid) {
     123        delete this.alertpanels[alertpanelid];
    88124    }
    89125}, {
     
    145181        "overlay",
    146182        "moodle-core-event",
    147         "moodle-core-notification-alert"
     183        "moodle-core-notification-alert",
     184        "moodle-core-notification-exception",
     185        "moodle-core-notification-ajaxexception"
    148186    ]
    149187});
  • moodle/trunk/fuentes/filter/glossary/yui/src/autolinker/js/autolinker.js

    r136 r1331  
    1818Y.extend(AUTOLINKER, Y.Base, {
    1919    overlay : null,
     20    alertpanels: {},
    2021    initializer : function() {
    2122        var self = this;
    22         Y.delegate('click', function(e){
    23             e.preventDefault();
     23        require(['core/event'], function(event) {
     24            Y.delegate('click', function(e){
     25                e.preventDefault();
    2426
    25             //display a progress indicator
    26             var title = '',
    27                 content = Y.Node.create('<div id="glossaryfilteroverlayprogress"><img src="'+M.cfg.loadingicon+'" class="spinner" /></div>'),
    28                 o = new Y.Overlay({
    29                     headerContent :  title,
    30                     bodyContent : content
    31                 }),
    32                 fullurl,
    33                 cfg;
    34             self.overlay = o;
    35             o.render(Y.one(document.body));
     27                //display a progress indicator
     28                var title = '',
     29                    content = Y.Node.create('<div id="glossaryfilteroverlayprogress">' +
     30                                            '<img src="' + M.cfg.loadingicon + '" class="spinner" />' +
     31                                            '</div>'),
     32                    o = new Y.Overlay({
     33                        headerContent :  title,
     34                        bodyContent : content
     35                    }),
     36                    fullurl,
     37                    cfg;
     38                self.overlay = o;
     39                o.render(Y.one(document.body));
    3640
    37             //Switch over to the ajax url and fetch the glossary item
    38             fullurl = this.getAttribute('href').replace('showentry.php','showentry_ajax.php');
    39             cfg = {
    40                 method: 'get',
    41                 context : self,
    42                 on: {
    43                     success: function(id, o) {
    44                         this.display_callback(o.responseText);
    45                     },
    46                     failure: function(id, o) {
    47                         var debuginfo = o.statusText;
    48                         if (M.cfg.developerdebug) {
    49                             o.statusText += ' (' + fullurl + ')';
     41                //Switch over to the ajax url and fetch the glossary item
     42                fullurl = this.getAttribute('href').replace('showentry.php','showentry_ajax.php');
     43                cfg = {
     44                    method: 'get',
     45                    context : self,
     46                    on: {
     47                        success: function(id, o) {
     48                            this.display_callback(o.responseText, event);
     49                        },
     50                        failure: function(id, o) {
     51                            var debuginfo = o.statusText;
     52                            if (M.cfg.developerdebug) {
     53                                o.statusText += ' (' + fullurl + ')';
     54                            }
     55                            new M.core.exception({ message: debuginfo });
    5056                        }
    51                         this.display_callback('bodyContent',debuginfo);
    5257                    }
    53                 }
    54             };
    55             Y.io(fullurl, cfg);
     58                };
     59                Y.io(fullurl, cfg);
    5660
    57         }, Y.one(document.body), 'a.glossary.autolink.concept');
     61            }, Y.one(document.body), 'a.glossary.autolink.concept');
     62        });
    5863    },
    59     display_callback : function(content) {
     64    /**
     65     * @method display_callback
     66     * @param {String} content - Content to display
     67     * @param {Object} event The amd event module used to fire events for jquery and yui.
     68     */
     69    display_callback : function(content, event) {
    6070        var data,
    6171            key,
    62             alertpanel;
     72            alertpanel,
     73            alertpanelid,
     74            definition,
     75            position;
    6376        try {
    6477            data = Y.JSON.parse(content);
     
    6881                for (key in data.entries) {
    6982                    definition = data.entries[key].definition + data.entries[key].attachments;
    70                     alertpanel = new M.core.alert({title:data.entries[key].concept,
     83                    alertpanel = new M.core.alert({title:data.entries[key].concept, draggable: true,
    7184                        message:definition, modal:false, yesLabel: M.util.get_string('ok', 'moodle')});
    72                     alertpanel.show();
    73                     Y.fire(M.core.event.FILTER_CONTENT_UPDATED, {nodes: (new Y.NodeList(alertpanel.get('boundingBox')))});
     85                    // Notify the filters about the modified nodes.
     86                    event.notifyFilterContentUpdated(alertpanel.get('boundingBox').getDOMNode());
     87                    Y.Node.one('#id_yuialertconfirm-' + alertpanel.get('COUNT')).focus();
    7488
    75                     Y.Node.one('#id_yuialertconfirm-' + alertpanel.get('COUNT')).focus();
     89                    // Register alertpanel for stacking.
     90                    alertpanelid = '#moodle-dialogue-' + alertpanel.get('COUNT');
     91                    alertpanel.on('complete', this._deletealertpanel, this, alertpanelid);
     92
     93                    // We already have some windows opened, so set the right position...
     94                    if (!Y.Object.isEmpty(this.alertpanels)){
     95                        position = this._getLatestWindowPosition();
     96                        Y.Node.one(alertpanelid).setXY([position[0] + 10, position[1] + 10]);
     97                    }
     98
     99                    this.alertpanels[alertpanelid] = Y.Node.one(alertpanelid).getXY();
    76100                }
    77101
     
    84108        }
    85109        return false;
     110    },
     111    _getLatestWindowPosition : function() {
     112        var lastPosition = [0, 0];
     113        Y.Object.each(this.alertpanels, function(position) {
     114            if (position[0] > lastPosition[0]){
     115                lastPosition = position;
     116            }
     117        });
     118        return lastPosition;
     119    },
     120    _deletealertpanel : function(ev, alertpanelid) {
     121        delete this.alertpanels[alertpanelid];
    86122    }
    87123}, {
  • moodle/trunk/fuentes/filter/glossary/yui/src/autolinker/meta/autolinker.json

    r136 r1331  
    99        "overlay",
    1010        "moodle-core-event",
    11         "moodle-core-notification-alert"
     11        "moodle-core-notification-alert",
     12        "moodle-core-notification-exception",
     13        "moodle-core-notification-ajaxexception"
    1214    ]
    1315  }
  • moodle/trunk/fuentes/filter/local_settings_form.php

    r136 r1331  
    3434        $this->filter = $filter;
    3535        $this->context = $context;
    36         parent::moodleform($submiturl);
     36        parent::__construct($submiturl);
    3737    }
    3838
  • moodle/trunk/fuentes/filter/mathjaxloader/db/upgrade.php

    r136 r1331  
    4848    // Put any upgrade step following this.
    4949
     50    if ($oldversion < 2015021200) {
     51
     52        $httpurl = get_config('filter_mathjaxloader', 'httpurl');
     53        // Don't change the config if it has been manually changed to something besides the default setting value.
     54        if ($httpurl === "http://cdn.mathjax.org/mathjax/2.3-latest/MathJax.js") {
     55            set_config('httpurl', 'http://cdn.mathjax.org/mathjax/2.5-latest/MathJax.js', 'filter_mathjaxloader');
     56        }
     57
     58        $httpsurl = get_config('filter_mathjaxloader', 'httpsurl');
     59        // Don't change the config if it has been manually changed to something besides the default setting value.
     60        if ($httpsurl === "https://cdn.mathjax.org/mathjax/2.3-latest/MathJax.js") {
     61            set_config('httpsurl', 'https://cdn.mathjax.org/mathjax/2.5-latest/MathJax.js', 'filter_mathjaxloader');
     62        }
     63
     64        upgrade_plugin_savepoint(true, 2015021200, 'filter', 'mathjaxloader');
     65    }
     66
     67    if ($oldversion < 2015021700) {
     68
     69        $oldconfig = get_config('filter_mathjaxloader', 'mathjaxconfig');
     70        $olddefault = 'MathJax.Hub.Config({
     71    config: ["MMLorHTML.js", "Safe.js"],
     72    jax: ["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML"],
     73    extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js"],
     74    TeX: {
     75        extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
     76    },
     77    menuSettings: {
     78        zoom: "Double-Click",
     79        mpContext: true,
     80        mpMouse: true
     81    },
     82    errorSettings: { message: ["!"] },
     83    skipStartupTypeset: true,
     84    messageStyle: "none"
     85});
     86';
     87        $newdefault = '
     88MathJax.Hub.Config({
     89    config: ["Accessible.js", "Safe.js"],
     90    errorSettings: { message: ["!"] },
     91    skipStartupTypeset: true,
     92    messageStyle: "none"
     93});
     94';
     95
     96        // Ignore white space changes.
     97        $oldconfig = trim(preg_replace('/\s+/', ' ', $oldconfig));
     98        $olddefault = trim(preg_replace('/\s+/', ' ', $olddefault));
     99
     100        // Update the default config for mathjax only if it has not been customised.
     101
     102        if ($oldconfig == $olddefault) {
     103            set_config('mathjaxconfig', $newdefault, 'filter_mathjaxloader');
     104        }
     105
     106        upgrade_plugin_savepoint(true, 2015021700, 'filter', 'mathjaxloader');
     107    }
     108
     109    // Moodle v2.9.0 release upgrade line.
     110    // Put any upgrade step following this.
     111
     112    // Moodle v3.0.0 release upgrade line.
     113    // Put any upgrade step following this.
     114
    50115    return true;
    51116}
  • moodle/trunk/fuentes/filter/mathjaxloader/filter.php

    r136 r1331  
    144144            $text = str_replace('[/tex]', '\\)', $text);
    145145            // E.g. "$$ blah $$".
    146             $text = preg_replace('|\$\$[\S\s]\$\$|u', '\\(\1\\)', $text);
     146            $text = preg_replace('|\$\$([\S\s]*?)\$\$|u', '\\(\1\\)', $text);
    147147            // E.g. "\[ blah \]".
    148148            $text = str_replace('\\[', '\\(', $text);
  • moodle/trunk/fuentes/filter/mathjaxloader/settings.php

    r136 r1331  
    3434                                         new lang_string('httpurl', 'filter_mathjaxloader'),
    3535                                         new lang_string('httpurl_help', 'filter_mathjaxloader'),
    36                                          'http://cdn.mathjax.org/mathjax/2.3-latest/MathJax.js',
     36                                         'http://cdn.mathjax.org/mathjax/2.5-latest/MathJax.js',
    3737                                         PARAM_RAW);
    3838    $settings->add($item);
     
    4141                                         new lang_string('httpsurl', 'filter_mathjaxloader'),
    4242                                         new lang_string('httpsurl_help', 'filter_mathjaxloader'),
    43                                          'https://cdn.mathjax.org/mathjax/2.3-latest/MathJax.js',
     43                                         'https://cdn.mathjax.org/mathjax/2.5-latest/MathJax.js',
    4444                                         PARAM_RAW);
    4545    $settings->add($item);
     
    5353    $default = '
    5454MathJax.Hub.Config({
    55     config: ["MMLorHTML.js", "Safe.js"],
    56     jax: ["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML"],
    57     extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js"],
    58     TeX: {
    59         extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
    60     },
    61     menuSettings: {
    62         zoom: "Double-Click",
    63         mpContext: true,
    64         mpMouse: true
    65     },
     55    config: ["Accessible.js", "Safe.js"],
    6656    errorSettings: { message: ["!"] },
    6757    skipStartupTypeset: true,
  • moodle/trunk/fuentes/filter/mathjaxloader/upgrade.txt

    r136 r1331  
     1=== 2.9 ===
     2
     3* Update to the latest version of MathJax setting "httpurl" and "httpsurl" to:
     4  http://cdn.mathjax.org/mathjax/2.5-latest/MathJax.js
     5
     6  and
     7
     8  https://cdn.mathjax.org/mathjax/2.5-latest/MathJax.js
     9
     10=== Before 2.9 ===
     11
    112Setting "httpsurl" default changed from:
    213
  • moodle/trunk/fuentes/filter/mathjaxloader/version.php

    r136 r1331  
    2525defined('MOODLE_INTERNAL') || die();
    2626
    27 $plugin->version  = 2014111000;
    28 $plugin->requires = 2014110400;  // Requires this Moodle version
     27$plugin->version  = 2015111600;
     28$plugin->requires = 2015111000;  // Requires this Moodle version.
    2929$plugin->component= 'filter_mathjaxloader';
  • moodle/trunk/fuentes/filter/mathjaxloader/yui/build/moodle-filter_mathjaxloader-loader/moodle-filter_mathjaxloader-loader-debug.js

    r136 r1331  
    7777        if (!this._configured) {
    7878            var lang = this._lang;
    79             if (typeof MathJax !== "undefined") {
    80                 MathJax.Hub.Queue(function () {
    81                     MathJax.Localization.setLocale(lang);
     79            if (typeof window.MathJax !== "undefined") {
     80                window.MathJax.Hub.Queue(function () {
     81                    window.MathJax.Localization.setLocale(lang);
    8282                });
    83                 MathJax.Hub.Configured();
     83                window.MathJax.Hub.Configured();
    8484                this._configured = true;
    8585            }
     
    9898                self._setLocale();
    9999                Y.all('.filter_mathjaxloader_equation').each(function(node) {
    100                     if (typeof MathJax !== "undefined") {
    101                         MathJax.Hub.Queue(["Typeset", MathJax.Hub, node.getDOMNode()]);
     100                    if (typeof window.MathJax !== "undefined") {
     101                        window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub, node.getDOMNode()]);
    102102                    }
    103103                });
     
    114114        var self = this;
    115115        Y.use('mathjax', function() {
     116            if (typeof window.MathJax === "undefined") {
     117                return;
     118            }
     119            var processdelay = window.MathJax.Hub.processSectionDelay;
     120            // Set the process section delay to 0 when updating the formula.
     121            window.MathJax.Hub.processSectionDelay = 0;
    116122            self._setLocale();
    117123            event.nodes.each(function (node) {
    118124                node.all('.filter_mathjaxloader_equation').each(function(node) {
    119                     if (typeof MathJax !== "undefined") {
    120                         MathJax.Hub.Queue(["Typeset", MathJax.Hub, node.getDOMNode()]);
    121                     }
     125                    window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub, node.getDOMNode()]);
    122126                });
    123127            });
     128            // Set the delay back to normal after processing.
     129            window.MathJax.Hub.processSectionDelay = processdelay;
    124130        });
    125131    }
  • moodle/trunk/fuentes/filter/mathjaxloader/yui/build/moodle-filter_mathjaxloader-loader/moodle-filter_mathjaxloader-loader-min.js

    r136 r1331  
    1 YUI.add("moodle-filter_mathjaxloader-loader",function(e,t){M.filter_mathjaxloader=M.filter_mathjaxloader||{_lang:"",_configured:!1,configure:function(t){var n=document.createElement("script");n.type="text/x-mathjax-config",n[window.opera?"innerHTML":"text"]=t.mathjaxconfig,document.getElementsByTagName("head")[0].appendChild(n),this._lang=t.lang,e.on(M.core.event.FILTER_CONTENT_UPDATED,this.contentUpdated,this)},_setLocale:function(){if(!this._configured){var e=this._lang;typeof MathJax!="undefined"&&(MathJax.Hub.Queue(function(){MathJax.Localization.setLocale(e)}),MathJax.Hub.Configured(),this._configured=!0)}},typeset:function(){if(!this._configured){var t=this;e.use("mathjax",function(){t._setLocale(),e.all(".filter_mathjaxloader_equation").each(function(e){typeof MathJax!="undefined"&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,e.getDOMNode()])})})}},contentUpdated:function(t){var n=this;e.use("mathjax",function(){n._setLocale(),t.nodes.each(function(e){e.all(".filter_mathjaxloader_equation").each(function(e){typeof MathJax!="undefined"&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,e.getDOMNode()])})})})}}},"@VERSION@",{requires:["moodle-core-event"]});
     1YUI.add("moodle-filter_mathjaxloader-loader",function(e,t){M.filter_mathjaxloader=M.filter_mathjaxloader||{_lang:"",_configured:!1,configure:function(t){var n=document.createElement("script");n.type="text/x-mathjax-config",n[window.opera?"innerHTML":"text"]=t.mathjaxconfig,document.getElementsByTagName("head")[0].appendChild(n),this._lang=t.lang,e.on(M.core.event.FILTER_CONTENT_UPDATED,this.contentUpdated,this)},_setLocale:function(){if(!this._configured){var e=this._lang;typeof window.MathJax!="undefined"&&(window.MathJax.Hub.Queue(function(){window.MathJax.Localization.setLocale(e)}),window.MathJax.Hub.Configured(),this._configured=!0)}},typeset:function(){if(!this._configured){var t=this;e.use("mathjax",function(){t._setLocale(),e.all(".filter_mathjaxloader_equation").each(function(e){typeof window.MathJax!="undefined"&&window.MathJax.Hub.Queue(["Typeset",window.MathJax.Hub,e.getDOMNode()])})})}},contentUpdated:function(t){var n=this;e.use("mathjax",function(){if(typeof window.MathJax=="undefined")return;var e=window.MathJax.Hub.processSectionDelay;window.MathJax.Hub.processSectionDelay=0,n._setLocale(),t.nodes.each(function(e){e.all(".filter_mathjaxloader_equation").each(function(e){window.MathJax.Hub.Queue(["Typeset",window.MathJax.Hub,e.getDOMNode()])})}),window.MathJax.Hub.processSectionDelay=e})}}},"@VERSION@",{requires:["moodle-core-event"]});
  • moodle/trunk/fuentes/filter/mathjaxloader/yui/build/moodle-filter_mathjaxloader-loader/moodle-filter_mathjaxloader-loader.js

    r136 r1331  
    7777        if (!this._configured) {
    7878            var lang = this._lang;
    79             if (typeof MathJax !== "undefined") {
    80                 MathJax.Hub.Queue(function () {
    81                     MathJax.Localization.setLocale(lang);
     79            if (typeof window.MathJax !== "undefined") {
     80                window.MathJax.Hub.Queue(function () {
     81                    window.MathJax.Localization.setLocale(lang);
    8282                });
    83                 MathJax.Hub.Configured();
     83                window.MathJax.Hub.Configured();
    8484                this._configured = true;
    8585            }
     
    9898                self._setLocale();
    9999                Y.all('.filter_mathjaxloader_equation').each(function(node) {
    100                     if (typeof MathJax !== "undefined") {
    101                         MathJax.Hub.Queue(["Typeset", MathJax.Hub, node.getDOMNode()]);
     100                    if (typeof window.MathJax !== "undefined") {
     101                        window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub, node.getDOMNode()]);
    102102                    }
    103103                });
     
    114114        var self = this;
    115115        Y.use('mathjax', function() {
     116            if (typeof window.MathJax === "undefined") {
     117                return;
     118            }
     119            var processdelay = window.MathJax.Hub.processSectionDelay;
     120            // Set the process section delay to 0 when updating the formula.
     121            window.MathJax.Hub.processSectionDelay = 0;
    116122            self._setLocale();
    117123            event.nodes.each(function (node) {
    118124                node.all('.filter_mathjaxloader_equation').each(function(node) {
    119                     if (typeof MathJax !== "undefined") {
    120                         MathJax.Hub.Queue(["Typeset", MathJax.Hub, node.getDOMNode()]);
    121                     }
     125                    window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub, node.getDOMNode()]);
    122126                });
    123127            });
     128            // Set the delay back to normal after processing.
     129            window.MathJax.Hub.processSectionDelay = processdelay;
    124130        });
    125131    }
  • moodle/trunk/fuentes/filter/mathjaxloader/yui/src/loader/js/loader.js

    r136 r1331  
    7575        if (!this._configured) {
    7676            var lang = this._lang;
    77             if (typeof MathJax !== "undefined") {
    78                 MathJax.Hub.Queue(function () {
    79                     MathJax.Localization.setLocale(lang);
     77            if (typeof window.MathJax !== "undefined") {
     78                window.MathJax.Hub.Queue(function () {
     79                    window.MathJax.Localization.setLocale(lang);
    8080                });
    81                 MathJax.Hub.Configured();
     81                window.MathJax.Hub.Configured();
    8282                this._configured = true;
    8383            }
     
    9696                self._setLocale();
    9797                Y.all('.filter_mathjaxloader_equation').each(function(node) {
    98                     if (typeof MathJax !== "undefined") {
    99                         MathJax.Hub.Queue(["Typeset", MathJax.Hub, node.getDOMNode()]);
     98                    if (typeof window.MathJax !== "undefined") {
     99                        window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub, node.getDOMNode()]);
    100100                    }
    101101                });
     
    112112        var self = this;
    113113        Y.use('mathjax', function() {
     114            if (typeof window.MathJax === "undefined") {
     115                return;
     116            }
     117            var processdelay = window.MathJax.Hub.processSectionDelay;
     118            // Set the process section delay to 0 when updating the formula.
     119            window.MathJax.Hub.processSectionDelay = 0;
    114120            self._setLocale();
    115121            event.nodes.each(function (node) {
    116122                node.all('.filter_mathjaxloader_equation').each(function(node) {
    117                     if (typeof MathJax !== "undefined") {
    118                         MathJax.Hub.Queue(["Typeset", MathJax.Hub, node.getDOMNode()]);
    119                     }
     123                    window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub, node.getDOMNode()]);
    120124                });
    121125            });
     126            // Set the delay back to normal after processing.
     127            window.MathJax.Hub.processSectionDelay = processdelay;
    122128        });
    123129    }
  • moodle/trunk/fuentes/filter/mediaplugin/db/upgrade.php

    r136 r1331  
    7676    // Put any upgrade step following this.
    7777
     78    // Moodle v2.9.0 release upgrade line.
     79    // Put any upgrade step following this.
     80
     81    // Moodle v3.0.0 release upgrade line.
     82    // Put any upgrade step following this.
     83
    7884    return true;
    7985}
  • moodle/trunk/fuentes/filter/mediaplugin/filter.php

    r136 r1331  
    6969        $this->trusted = !empty($options['noclean']) or !empty($CFG->allowobjectembed);
    7070
    71         // Handle all links that contain any 'embeddable' marker text (it could
    72         // do all links, but the embeddable markers thing should make it faster
    73         // by meaning for most links it doesn't drop into PHP code).
    74         $newtext = preg_replace_callback($re = '~<a\s[^>]*href="([^"]*(?:' .
    75                 $this->embedmarkers . ')[^"]*)"[^>]*>([^>]*)</a>~is',
    76                 array($this, 'callback'), $text);
     71        // Looking for tags.
     72        $matches = preg_split('/(<[^>]*>)/i', $text, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
    7773
    78         if (empty($newtext) or $newtext === $text) {
    79             // error or not filtered
     74        if (!$matches) {
    8075            return $text;
    8176        }
    8277
     78        // Regex to find media extensions in an <a> tag.
     79        $re = '~<a\s[^>]*href="([^"]*(?:' .  $this->embedmarkers . ')[^"]*)"[^>]*>([^>]*)</a>~is';
     80
     81        $newtext = '';
     82        $validtag = '';
     83        $sizeofmatches = count($matches);
     84
     85        // We iterate through the given string to find valid <a> tags
     86        // and build them so that the callback function can check it for
     87        // embedded content. Then we rebuild the string.
     88        foreach ($matches as $idx => $tag) {
     89            if (preg_match('|</a>|', $tag) && !empty($validtag)) {
     90                $validtag .= $tag;
     91
     92                // Given we now have a valid <a> tag to process it's time for
     93                // ReDoS protection. Stop processing if a word is too large.
     94                if (strlen($validtag) < 4096) {
     95                    $processed = preg_replace_callback($re, array($this, 'callback'), $validtag);
     96                }
     97                // Rebuilding the string with our new processed text.
     98                $newtext .= !empty($processed) ? $processed : $validtag;
     99                // Wipe it so we can catch any more instances to filter.
     100                $validtag = '';
     101                $processed = '';
     102            } else if (preg_match('/<a\s[^>]*/', $tag) && $sizeofmatches > 1) {
     103                // Looking for a starting <a> tag.
     104                $validtag = $tag;
     105            } else {
     106                // If we have a validtag add to that to process later,
     107                // else add straight onto our newtext string.
     108                if (!empty($validtag)) {
     109                    $validtag .= $tag;
     110                } else {
     111                    $newtext .= $tag;
     112                }
     113            }
     114        }
     115
     116        // Return the same string except processed by the above.
    83117        return $newtext;
    84118    }
  • moodle/trunk/fuentes/filter/mediaplugin/tests/filter_test.php

    r136 r1331  
    5252        $filterplugin = new filter_mediaplugin(null, array());
    5353
     54        $longurl = '<a href="http://moodle/.mp4">my test file</a>';
     55        $longhref = '';
     56
     57        do {
     58            $longhref .= 'a';
     59        } while(strlen($longhref) + strlen($longurl) < 4095);
     60
     61        $longurl = '<a href="http://moodle/' . $longhref . '.mp4">my test file</a>';
     62
    5463        $validtexts = array (
    5564            '<a href="http://moodle.org/testfile/test.mp3">test mp3</a>',
     
    7786                            href="http://moodle.org/testfile/test.avi">test mp3
    7887                                    </a>',
    79             '<a             href="http://www.youtube.com/watch?v=JghQgA2HMX8?d=200x200"     >youtube\'s</a>'
     88            '<a             href="http://www.youtube.com/watch?v=JghQgA2HMX8?d=200x200"     >youtube\'s</a>',
     89            // Test a long URL under 4096 characters.
     90            $longurl
    8091        );
    8192
     
    8697            $this->assertNotEquals($text, $filter, $msg);
    8798        }
     99
     100        $insertpoint = strrpos($longurl, 'http://');
     101        $longurl = substr_replace($longurl, 'http://pushover4096chars', $insertpoint, 0);
     102
     103        $originalurl = '<p>Some text.</p><pre style="color: rgb(0, 0, 0); line-height: normal;">' .
     104            '<a href="https://www.youtube.com/watch?v=uUhWl9Lm3OM">Valid link</a></pre><pre style="color: rgb(0, 0, 0); line-height: normal;">';
     105        $paddedurl = str_pad($originalurl, 6000, 'z');
     106        $validpaddedurl = '<p>Some text.</p><pre style="color: rgb(0, 0, 0); line-height: normal;"><span class="mediaplugin mediaplugin_youtube">
     107<iframe title="Valid link" width="400" height="300"
     108  src="https://www.youtube.com/embed/uUhWl9Lm3OM?rel=0&wmode=transparent" frameborder="0" allowfullscreen="1"></iframe>
     109</span></pre><pre style="color: rgb(0, 0, 0); line-height: normal;">';
     110        $validpaddedurl = str_pad($validpaddedurl, 6000 + (strlen($validpaddedurl) - strlen($originalurl)), 'z');
    88111
    89112        $invalidtexts = array(
     
    102125            '<abbr href="http://moodle.org/testfile/test.mp3">test mp3</abbr>',
    103126            '<ahref="http://moodle.org/testfile/test.mp3">test mp3</a>',
    104             '<aclass="content" href="http://moodle.org/testfile/test.mp3">test mp3</a>'
     127            '<aclass="content" href="http://moodle.org/testfile/test.mp3">test mp3</a>',
     128            // Test a long URL over 4096 characters.
     129            $longurl
    105130        );
    106131
     
    111136            $this->assertEquals($text, $filter, $msg);
    112137        }
     138
     139        // Valid mediaurl followed by a longurl.
     140        $precededlongurl = '<a href="http://moodle.org/testfile/test.mp3">test.mp3</a>'. $longurl;
     141        $filter = $filterplugin->filter($precededlongurl);
     142        $this->assertEquals(1, substr_count($filter, 'M.util.add_audio_player'));
     143        $this->assertContains($longurl, $filter);
     144
     145        // Testing for cases where: to be filtered content has 6+ text afterwards.
     146        $filter = $filterplugin->filter($paddedurl);
     147        $this->assertEquals($validpaddedurl, $filter, $msg);
    113148    }
    114149}
  • moodle/trunk/fuentes/filter/mediaplugin/version.php

    r136 r1331  
    2626defined('MOODLE_INTERNAL') || die();
    2727
    28 $plugin->version   = 2014111000;        // The current plugin version (Date: YYYYMMDDXX)
    29 $plugin->requires  = 2014110400;        // Requires this Moodle version
     28$plugin->version   = 2015111600;        // The current plugin version (Date: YYYYMMDDXX)
     29$plugin->requires  = 2015111000;        // Requires this Moodle version
    3030$plugin->component = 'filter_mediaplugin'; // Full name of the plugin (used for diagnostics)
  • moodle/trunk/fuentes/filter/multilang/version.php

    r136 r1331  
    2626defined('MOODLE_INTERNAL') || die();
    2727
    28 $plugin->version   = 2014111000;        // The current plugin version (Date: YYYYMMDDXX)
    29 $plugin->requires  = 2014110400;        // Requires this Moodle version
     28$plugin->version   = 2015111600;        // The current plugin version (Date: YYYYMMDDXX)
     29$plugin->requires  = 2015111000;        // Requires this Moodle version
    3030$plugin->component = 'filter_multilang'; // Full name of the plugin (used for diagnostics)
  • moodle/trunk/fuentes/filter/tex/db/upgrade.php

    r136 r1331  
    7272    // Put any upgrade step following this.
    7373
     74    // Moodle v2.9.0 release upgrade line.
     75    // Put any upgrade step following this.
     76
     77    // Moodle v3.0.0 release upgrade line.
     78    // Put any upgrade step following this.
     79
    7480    return true;
    7581}
  • moodle/trunk/fuentes/filter/tex/latex.php

    r136 r1331  
    1616         * Other platforms could/should be added
    1717         */
    18         function latex() {
     18        public function __construct() {
    1919            global $CFG;
    2020
     
    2222            $this->temp_dir = $CFG->tempdir . "/latex";
    2323            make_temp_directory('latex');
     24        }
     25
     26        /**
     27         * Old syntax of class constructor. Deprecated in PHP7.
     28         */
     29        public function latex() {
     30            self::__construct();
    2431        }
    2532
     
    124131            // run dvips (.dvi to .ps)
    125132            $pathdvips = escapeshellarg(trim(get_config('filter_tex', 'pathdvips'), " '\""));
    126             $command = "$pathdvips -E $dvi -o $ps";
     133            $command = "$pathdvips -q -E $dvi -o $ps";
    127134            if ($this->execute($command, $log )) {
    128135                return false;
  • moodle/trunk/fuentes/filter/tex/texdebug.php

    r136 r1331  
    4242    require_login();
    4343    require_capability('moodle/site:config', context_system::instance(), $USER->id); /// Required cap to run this. MDL-18552
     44    if ($action || $texexp) {
     45        require_sesskey();
     46    }
    4447
    4548    $output = '';
     
    9093    if ($action=='SlashArguments') {
    9194        slasharguments($texexp);
     95        exit;
    9296    }
    9397
     
    336340           </ol>
    337341           <input type="submit" value="Do it!" />
     342           <input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
    338343          </form> <br /> <br />
    339344       <center>
  • moodle/trunk/fuentes/filter/tex/version.php

    r136 r1331  
    2626defined('MOODLE_INTERNAL') || die();
    2727
    28 $plugin->version   = 2014111000;        // The current plugin version (Date: YYYYMMDDXX)
    29 $plugin->requires  = 2014110400;        // Requires this Moodle version
     28$plugin->version   = 2015111600;        // The current plugin version (Date: YYYYMMDDXX)
     29$plugin->requires  = 2015111000;        // Requires this Moodle version
    3030$plugin->component = 'filter_tex';      // Full name of the plugin (used for diagnostics)
  • moodle/trunk/fuentes/filter/tidy/version.php

    r136 r1331  
    2626defined('MOODLE_INTERNAL') || die();
    2727
    28 $plugin->version   = 2014111000;        // The current plugin version (Date: YYYYMMDDXX)
    29 $plugin->requires  = 2014110400;        // Requires this Moodle version
     28$plugin->version   = 2015111600;        // The current plugin version (Date: YYYYMMDDXX)
     29$plugin->requires  = 2015111000;        // Requires this Moodle version
    3030$plugin->component = 'filter_tidy';     // Full name of the plugin (used for diagnostics)
  • moodle/trunk/fuentes/filter/upgrade.txt

    r136 r1331  
    11This file describes API changes in core filter API and plugins,
    22information provided here is intended especially for developers.
     3
     4=== 3.0 ===
     5
     6* New argument $skipfilters to filter_manager::filter_text to allow applying
     7  the filters with a given one omitted.
     8
     9* New admin setting class admin_setting_filter_types which can be used if you
     10  want to make the disablefilters value in your code configurable.
     11
     12* Methods filter_manager::text_filtering_hash and moodle_text_filter::hash have been
     13  deprecated. There were use by the old Moodle filtered text caching system
     14  that was removed several releases ago.
    315
    416=== 2.7 ===
  • moodle/trunk/fuentes/filter/urltolink/filter.php

    r136 r1331  
    5252            return $text;
    5353        }
    54         if (in_array($options['originalformat'], explode(',', $this->get_global_config('formats')))) {
     54        if (in_array($options['originalformat'], explode(',', get_config('filter_urltolink', 'formats')))) {
    5555            $this->convert_urls_into_links($text);
    5656        }
     
    6161    // internal implementation starts here
    6262    ////////////////////////////////////////////////////////////////////////////
    63 
    64     /**
    65      * Returns the global filter setting
    66      *
    67      * If the $name is provided, returns single value. Otherwise returns all
    68      * global settings in object. Returns null if the named setting is not
    69      * found.
    70      *
    71      * @param mixed $name optional config variable name, defaults to null for all
    72      * @return string|object|null
    73      */
    74     protected function get_global_config($name=null) {
    75         $this->load_global_config();
    76         if (is_null($name)) {
    77             return self::$globalconfig;
    78 
    79         } elseif (array_key_exists($name, self::$globalconfig)) {
    80             return self::$globalconfig->{$name};
    81 
    82         } else {
    83             return null;
    84         }
    85     }
    86 
    87     /**
    88      * Makes sure that the global config is loaded in $this->globalconfig
    89      *
    90      * @return void
    91      */
    92     protected function load_global_config() {
    93         if (is_null(self::$globalconfig)) {
    94             self::$globalconfig = get_config('filter_urltolink');
    95         }
    96     }
    9763
    9864    /**
     
    135101        // Lookbehind assertions.
    136102        // Is not HTML attribute or CSS URL property. Unfortunately legit text like "url(http://...)" will not be a link.
    137         $lookbehindstart = "(?<!=[\"']|\burl\([\"' ]|\burl\()";
    138103        $lookbehindend = "(?<![]),.;])";
    139104
    140         $regex = "$lookbehindstart$urlstart((?:$domainsegment\.)+$domainsegment|$numericip)" .
     105        $regex = "$urlstart((?:$domainsegment\.)+$domainsegment|$numericip)" .
    141106                "($port?$path$querystring?$fragment?)$lookbehindend";
    142107        if ($unicoderegexp) {
     
    146111        }
    147112
    148         $text = preg_replace($regex, '<a href="http$1://$2$3$4" class="_blanktarget">$0</a>', $text);
     113        // Locate any HTML tags.
     114        $matches = preg_split('/(<[^<|>]*>)/i', $text, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
     115
     116        // Iterate through the tokenized text to handle chunks (html and content).
     117        foreach ($matches as $idx => $chunk) {
     118            // Nothing to do. We skip completely any html chunk.
     119            if (strpos(trim($chunk), '<') === 0) {
     120                continue;
     121            }
     122
     123            // Nothing to do. We skip any content chunk having any of these attributes.
     124            if (preg_match('#(background=")|(action=")|(style="background)|(href=")|(src=")|(url [(])#', $chunk)) {
     125                continue;
     126            }
     127
     128            // Arrived here, we want to process every word in this chunk.
     129            $text = $chunk;
     130            $words = explode(' ', $text);
     131
     132            foreach ($words as $idx2 => $word) {
     133                // ReDoS protection. Stop processing if a word is too large.
     134                if (strlen($word) < 4096) {
     135                    $words[$idx2] = preg_replace($regex, '<a href="http$1://$2$3$4" class="_blanktarget">$0</a>', $word);
     136                }
     137            }
     138            $text = implode(' ', $words);
     139
     140            // Copy the result back to the array.
     141            $matches[$idx] = $text;
     142        }
     143
     144        $text = implode('', $matches);
    149145
    150146        if (!empty($ignoretags)) {
     
    153149        }
    154150
    155         if ($this->get_global_config('embedimages')) {
     151        if (get_config('filter_urltolink', 'embedimages')) {
    156152            // now try to inject the images, this code was originally in the mediapluing filter
    157153            // this may be useful only if somebody relies on the fact the links in FORMAT_MOODLE get converted
  • moodle/trunk/fuentes/filter/urltolink/tests/filter_test.php

    r136 r1331  
    3030
    3131
    32 class filter_urltolink_testcase extends basic_testcase {
     32class filter_urltolink_filter_testcase extends basic_testcase {
    3333
    3434    function get_convert_urls_into_links_test_cases() {
     35        // Create a 4095 and 4096 long URLs.
     36        $superlong4095 = str_pad('http://www.superlong4095.com?this=something', 4095, 'a');
     37        $superlong4096 = str_pad('http://www.superlong4096.com?this=something', 4096, 'a');
     38
    3539        $texts = array (
    3640            //just a url
     
    131135            '<td background="www.moodle.org">&nbsp;</td>' => '<td background="www.moodle.org">&nbsp;</td>',
    132136            '<form name="input" action="http://moodle.org/submit.asp" method="get">'=>'<form name="input" action="http://moodle.org/submit.asp" method="get">',
     137            '<input type="submit" value="Go to http://moodle.org">' => '<input type="submit" value="Go to http://moodle.org">',
    133138            '<td background="https://www.moodle.org">&nbsp;</td>' => '<td background="https://www.moodle.org">&nbsp;</td>',
    134139            // CSS URLs.
     
    149154            'URL: http://127.0.0.1/path/to?param=value_with%28parenthesis%29&param2=1' => 'URL: <a href="http://127.0.0.1/path/to?param=value_with%28parenthesis%29&param2=1" class="_blanktarget">http://127.0.0.1/path/to?param=value_with%28parenthesis%29&param2=1</a>',
    150155            'URL: www.localhost.com/path/to?param=value_with%28parenthesis%29&param2=1' => 'URL: <a href="http://www.localhost.com/path/to?param=value_with%28parenthesis%29&param2=1" class="_blanktarget">www.localhost.com/path/to?param=value_with%28parenthesis%29&param2=1</a>',
     156            // Test URL less than 4096 characters in size is converted to link.
     157            'URL: ' . $superlong4095 => 'URL: <a href="' . $superlong4095 . '" class="_blanktarget">' . $superlong4095 . '</a>',
     158            // Test URL equal to or greater than 4096 characters in size is not converted to link.
     159            'URL: ' . $superlong4096 => 'URL: ' . $superlong4096,
     160            // Testing URL within a span tag.
     161            'URL: <span style="kasd"> my link to http://google.com </span>' => 'URL: <span style="kasd"> my link to <a href="http://google.com" class="_blanktarget">http://google.com</a> </span>',
     162            // Nested tags test.
     163            '<b><i>www.google.com</i></b>' => '<b><i><a href="http://www.google.com" class="_blanktarget">www.google.com</a></i></b>',
     164            '<input type="submit" value="Go to http://moodle.org">' => '<input type="submit" value="Go to http://moodle.org">',
     165            // Test realistic content.
     166            '<p><span style="color: rgb(37, 37, 37); font-family: sans-serif; line-height: 22.3999996185303px;">Lorem ipsum amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut http://google.com aliquip ex ea <a href="http://google.com">commodo consequat</a>. Duis aute irure in reprehenderit in excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia https://docs.google.com/document/d/BrokenLinkPleaseAyacDHc_Ov8aoskoSVQsfmLHP_jYAkRMk/edit?usp=sharing https://docs.google.com/document/d/BrokenLinkPleaseAyacDHc_Ov8aoskoSVQsfmLHP_jYAkRMk/edit?usp=sharing mollit anim id est laborum.</span><br></p>'
     167            =>
     168            '<p><span style="color: rgb(37, 37, 37); font-family: sans-serif; line-height: 22.3999996185303px;">Lorem ipsum amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut <a href="http://google.com" class="_blanktarget">http://google.com</a> aliquip ex ea <a href="http://google.com">commodo consequat</a>. Duis aute irure in reprehenderit in excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia <a href="https://docs.google.com/document/d/BrokenLinkPleaseAyacDHc_Ov8aoskoSVQsfmLHP_jYAkRMk/edit?usp=sharing" class="_blanktarget">https://docs.google.com/document/d/BrokenLinkPleaseAyacDHc_Ov8aoskoSVQsfmLHP_jYAkRMk/edit?usp=sharing</a> <a href="https://docs.google.com/document/d/BrokenLinkPleaseAyacDHc_Ov8aoskoSVQsfmLHP_jYAkRMk/edit?usp=sharing" class="_blanktarget">https://docs.google.com/document/d/BrokenLinkPleaseAyacDHc_Ov8aoskoSVQsfmLHP_jYAkRMk/edit?usp=sharing</a> mollit anim id est laborum.</span><br></p>',
     169            // Test some broken html.
     170            '5 < 10 www.google.com <a href="hi.com">im a link</a>' => '5 < 10 <a href="http://www.google.com" class="_blanktarget">www.google.com</a> <a href="hi.com">im a link</a>',
     171            'h3 (www.styles.com/h3) < h1 (www.styles.com/h1)' => 'h3 (<a href="http://www.styles.com/h3" class="_blanktarget">www.styles.com/h3</a>) < h1 (<a href="http://www.styles.com/h1" class="_blanktarget">www.styles.com/h1</a>)',
     172            '<p>text www.moodle.org&lt;/p> text' => '<p>text <a href="http://www.moodle.org" class="_blanktarget">www.moodle.org</a>&lt;/p> text',
     173            // Some more urls.
     174            '<link rel="search" type="application/opensearchdescription+xml" href="/osd.jsp" title="Peer review - Moodle Tracker"/>' => '<link rel="search" type="application/opensearchdescription+xml" href="/osd.jsp" title="Peer review - Moodle Tracker"/>',
     175            '<a href="https://docs.moodle.org/dev/Main_Page"></a><span>www.google.com</span><span class="placeholder"></span>' => '<a href="https://docs.moodle.org/dev/Main_Page"></a><span><a href="http://www.google.com" class="_blanktarget">www.google.com</a></span><span class="placeholder"></span>',
     176            'http://nolandforzombies.com <a href="zombiesFTW.com">Zombies FTW</a> http://aliens.org' => '<a href="http://nolandforzombies.com" class="_blanktarget">http://nolandforzombies.com</a> <a href="zombiesFTW.com">Zombies FTW</a> <a href="http://aliens.org" class="_blanktarget">http://aliens.org</a>',
    151177            //URLs in Javascript. Commented out as part of MDL-21183
    152178            //'var url="http://moodle.org";'=>'var url="http://moodle.org";',
  • moodle/trunk/fuentes/filter/urltolink/version.php

    r136 r1331  
    2626defined('MOODLE_INTERNAL') || die();
    2727
    28 $plugin->version   = 2014111000;        // The current plugin version (Date: YYYYMMDDXX)
    29 $plugin->requires  = 2014110400;        // Requires this Moodle version
     28$plugin->version   = 2015111600;        // The current plugin version (Date: YYYYMMDDXX)
     29$plugin->requires  = 2015111000;        // Requires this Moodle version
    3030$plugin->component = 'filter_urltolink'; // Full name of the plugin (used for diagnostics)
Note: See TracChangeset for help on using the changeset viewer.