Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Files | Namespaces | Classes | Functions | Variables
filter_mathjaxloader

Files

file  filter.php
 This filter provides automatic support for MathJax.
 
file  provider.php
 Privacy Subsystem implementation for filter_mathjaxloader.
 
file  settings.php
 MathJAX filter settings.
 
file  upgrade.php
 MathJAX filter upgrade code.
 
file  upgradelib.php
 Random functions for mathjax upgrades.
 
file  version.php
 MathJax filter version information.
 

Namespaces

 filter_mathjaxloader\privacy
  
 

Classes

class  filter_mathjaxloader
 Mathjax filtering. More...
 
class  filter_mathjaxloader\privacy\provider
 Privacy Subsystem for filter_mathjaxloader implementing null_provider. More...
 

Functions

 filter_mathjaxloader_upgrade_cdn_cloudflare ($mathjaxurl, $httponly=false)
 This function takes an existing mathjax url and, if it was using the standard mathjax cdn, upgrades it to use the cloudflare matchjax cdn (because the standard one is shutting down). More...
 
 filter_mathjaxloader_upgrade_mathjaxconfig_equal ($val1, $val2)
 Compares two values of the 'mathjaxconfig' config option. More...
 
 xmldb_filter_mathjaxloader_upgrade ($oldversion)
 

Variables

$plugin component = 'filter_mathjaxloader'
 
$plugin requires = 2019111200
 
$plugin version = 2019111801
 

Detailed Description

Function Documentation

◆ filter_mathjaxloader_upgrade_cdn_cloudflare()

filter_mathjaxloader_upgrade_cdn_cloudflare (   $mathjaxurl,
  $httponly = false 
)

This function takes an existing mathjax url and, if it was using the standard mathjax cdn, upgrades it to use the cloudflare matchjax cdn (because the standard one is shutting down).

Parameters
string$mathjaxurl- The current url.
boolean$httponly- Use http instead of https - really only for 3.1 upgrades.
Return values
stringThe new url.

◆ filter_mathjaxloader_upgrade_mathjaxconfig_equal()

filter_mathjaxloader_upgrade_mathjaxconfig_equal (   $val1,
  $val2 
)

Compares two values of the 'mathjaxconfig' config option.

This is used during the upgrade to see if the two text values of the 'mathjaxconfig' config option should be considered equal of different. The strings are normalized so that EOL characters and whitespace is not significant.

Parameters
string$val1value
string$val2value
Return values
booltrue if the texts should be considered equals, false otherwise

◆ xmldb_filter_mathjaxloader_upgrade()

xmldb_filter_mathjaxloader_upgrade (   $oldversion)
Parameters
int$oldversionthe version we are upgrading from
Return values
boolresult