Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.
/lib/ -> jslib.php (source)

This file contains various javascript related functions, all functions here are self contained and can be used in ABORT_AFTER_CONFIG scripts.

Copyright: 2012 Petr Skoda (skodak) {@link http://skodak.org}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 133 lines (4 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 1 file
 lib/xsendfilelib.php

Defines 5 functions


Functions that are not part of a class:

js_send_cached($jspath, $etag, $filename = 'javascript.php')   X-Ref
Send javascript file content with as much caching as possible

param: string $jspath
param: string $etag
param: string $filename

js_send_uncached($js, $filename = 'javascript.php')   X-Ref
Send javascript without any caching

param: string $js
param: string $filename

js_send_unmodified($lastmodified, $etag)   X-Ref
Send file not modified headers

param: int $lastmodified
param: string $etag

js_write_cache_file_content($file, $content)   X-Ref
Create cache file for JS content

param: string $file full file path to cache file
param: string $content JS code

js_send_css_not_found()   X-Ref
Sends a 404 message about CSS not being found.