Commit graph

238 commits

Author SHA1 Message Date
Mark Nelson
004dcb4f58 MDL-58936 core: ensure 'page->context' is not null
When using $page->context it calls magic_get_context() in lib/pagelib.php.
This method sets the context to context_system::instance() if it is currently
null and returns that as the context. However, when installing a new site
context_system::instance() also returns null.
2017-05-15 12:29:15 +08:00
Eloy Lafuente (stronk7)
55946a892a MDL-54901 phpunit: Change phpunit wwwroot to HTTPS and fix tests
This includes:

- Changing PHPUnit's bootstrap to use https://www...
- Modify all existing expectations to the new wwwroot.
- Amend some tests now with different defaults because of is_https()
- Added a note to main upgrade.php about the change.
2017-04-18 03:40:17 +02:00
Damyon Wiese
e330b1c214 MDL-40759 icons: Refactor to allow theme icon systems 2017-03-17 15:52:18 +08:00
Damyon Wiese
663640f5b3 MDL-40759 icons: convert uses of pix_url to pix_icon
Also change filepicker to use scaled svgs instead of sets of custom pngs. The svgs are taken from font-awesome.
2017-03-17 15:52:17 +08:00
Damyon Wiese
95b06c13c6 MDL-40759 icons: Refactor icon system to be extensible. 2017-03-17 15:51:29 +08:00
Ryan Wyllie
b61015cfcd MDL-57975 javascript: add user_date.js
Part of MDL-55611
2017-03-08 03:33:23 +00:00
Jake Dallimore
86f1d1bb86 MDL-35980 comment: add comment info to delete button for screen readers
For each delete button in the comments widget, make the spoken text a
string containing the name of the poster and the datetime.
2017-02-24 08:15:40 +08:00
Dan Poltawski
0053c77d62 MDL-57690 js: fix missing requirement before using M.core.dialogue 2017-01-26 08:52:50 +00:00
Dan Poltawski
935584aaba MDL-57690 yui: remove the mcore rollup
This was is pre-loading some modules which are not used in boost:

* Block docking
* Popup Help

The other pre-loaded requirements were used for YUI dialogues and
modals. With time we are moving away from these, so rather than
'pre-loading' we can let the yui loader do its job.
2017-01-19 08:10:34 +00:00
Damyon Wiese
536f046033 MDL-55402 theme_noname: Convert bootstrapbase to bs4
All moodle less files are converted to sass with layouts etc
written as mustache templates.

Bootstrap 4 sass files are imported to scss/bootstrap.

Part of MDL-55071
2016-09-23 10:49:48 +01:00
Dan Poltawski
6851244452 MDL-50937 jquery: remove instances of migrate plugin 2016-07-19 10:34:17 +01:00
Frederic Massart
23381ab803 MDL-51036 tool_lp: Making comments work inside templates 2016-04-18 10:58:49 +08:00
Ben Tindell
a2fb838e82 MDL-53577 repository: Added maxbytes error message
Changing the error message that is displayed to users when they
upload a file that is greater than the maximum upload size. Does not
include all upload cases; focuses on those most used by students.
2016-04-04 15:33:40 -05:00
Adrian Greeve
9e8d0842ba MDL-52008 accessibility: Skip link works with chrome vox. 2015-11-06 09:47:51 +08:00
Jun Pataleta
bbbdfc8610 MDL-47073 lib: Replace backslashes with slashes in jquery plugin urls
This patch replaces backslash characters in the generated jQuery
plugin URL to forward slashes when slasharguments is disabled and
 the Moodle server is running on IIS.
Thanks to Ryan Panning <Ryan.Panning@district196.org> for
reporting this issue and for suggesting a fix.
2015-10-30 17:05:23 -05:00
jinhofer
0b7856efbe MDL-49811 lib: Added js to skiplinks
I have added a JS module to handle skiplinks to send
the focus to the end of the block. This improves the function
and allows the user to better tab through the page.
2015-10-05 06:17:58 -05:00
Damyon Wiese
4e8afd56d5 MDL-51222 javascript: Merge all the YUI instances
We previously had a global Y (simpleyui) and a separate Y created
to put Y in scope for all our modules. This meant that we had 2
separate sandboxes for YUI, which means that modules are duplicated,
and events do not fire across YUI instances.

This change merges the 2 instances, so any code refering to Y will
get the same instance of YUI (amd code, yui modules, static init code etc).

Thanks to Andrew Nicols!
2015-09-22 15:56:40 +08:00
Andrew Nicols
2300a312a4 MDL-33365 core: Move JS output to body
It turns out that, after all these years, we've been doing it wrong.
The YUI Loader should be loaded at the top of the body, not in the head.

Having it in the head means that the body has not yet loaded, and we see
a number of minor issues for scripts which happen very early in the load
process. One of these is the creation of invalid HTML from the YUI loader
because it is not able to insert in the body as it has not yet been
created.

To be safe, we must move all JS to the same point (because of unknown
dependencies between them). These should be placed as early in the body as
possible.

We also change the way in which the legacy YUI css modules are loaded.
2015-08-18 15:48:55 +08:00
Damyon Wiese
9bdcf57951 MDL-49152 output: Templates for renderers (JS and PHP)
Mustache support for rendering templates from either php or js.
2015-03-14 22:48:40 +08:00
Andrew Nicols
cfb8019b67 MDL-49269 javascript: Set default loglevel to warn 2015-03-11 12:18:31 +08:00
Andrew Nicols
3acc64e323 MDL-49269 javascript: Add log, and loglevel amd modules 2015-03-11 08:17:54 +08:00
Damyon Wiese
adeb96d28f MDL-49046 javascript: Add support for AMD modules and jquery.
Grunt is the build tool.
2015-02-23 16:23:10 +08:00
Tony Butler
1e31f11852 MDL-28484 core_lib: Add function for https detection
Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
2014-10-03 13:02:29 +01:00
Tim Hunt
b8459bba14 MDL-46031 output: better handling of once-per-page items
In several places we only want to output a certain bit of HTML (e.g. the
contents on the mod chooser) once per page.

This used to be done with a static variable in the function, which
meant the logic was once per PHP-script execution, not once-per-page.
Now there is a new bit of API in page_requirements_manager to handle
this properly.
2014-06-19 18:50:04 +01:00
Andrew Nicols
0d1d542332 MDL-45635 javascript: Make core dialogue translatable 2014-05-23 16:01:48 +08:00
Andrew Nicols
679af35722 MDL-41109 dndupload: Add missing error string 2014-05-16 13:45:30 +08:00
Damyon Wiese
f08c69aba2 Merge branch 'MDL-44214-master' of git://github.com/andrewnicols/moodle 2014-02-24 14:41:29 +08:00
Andrew Nicols
0f722cfbe5 MDL-44214 Javascript: Allow for patching of modules in the simpleyui rollup
The moodlesimple (former simpleyui) rollup is included by a slightly
different mechanism to the the other YUI modules and this was missed off
the original yuipatchlevel implementation.
2014-02-17 14:46:09 +08:00
Andrew Nicols
4e55f11de2 MDL-44187 JavaScript: Remove data from debug footer 2014-02-16 20:43:30 +08:00
Andrew Nicols
aea2973734 MDL-43952 Javascript: Support invalidation of browser caches for YUI patching
This will also force files loaded from the CDN to instead come from the
local distribution since those patches will not be included in the CDN
release.

Please see the documentation at http://docs.moodle.org/dev/YUI/Patching for
important on using these changes.
2014-02-04 09:08:53 +08:00
Dan Poltawski
899ca7632f Merge branch 'MDL-43489-master' of git://github.com/andrewnicols/moodle 2014-01-07 13:48:49 +08:00
Damyon Wiese
3a145daba4 Merge branch 'MDL-43490-master' of git://github.com/andrewnicols/moodle 2014-01-07 12:26:01 +08:00
Andrew Nicols
5b49f8b3a8 MDL-36334 JavaScript: Enable access to the gallery 2013-12-30 19:19:26 +08:00
Andrew Nicols
193136ccd5 MDL-43490 JavaScript: Remove deprecated yui2_lib from 2.7
This patch removes the deprecated yui2_lib from Moodle 2.7. It was
deprecated in Moodle 2.4.
2013-12-23 15:36:47 +08:00
Andrew Nicols
2901378c36 MDL-43489 JavaScript: Remove deprecated js_gallery_module from 2.7
This patch removes the deprecated js_gallery_module from Moodle 2.7. It was
deprecated well before Moodle 2.0.
2013-12-23 15:27:50 +08:00
Eloy Lafuente (stronk7)
f77233dfaa Merge branch 'MDL-43404_master' of git://github.com/dmonllao/moodle 2013-12-18 02:24:08 +01:00
David Monllao
4415b667a4 MDL-43404 behat: Form change checker disabled when running behat 2013-12-17 18:39:31 +08:00
Petr Škoda
ed67f462fe MDL-43268 fix filter notice when not in debug mode 2013-12-13 13:57:59 +08:00
Eloy Lafuente (stronk7)
ebc77165a4 Merge branch 'MDL-42625_master' of git://github.com/dmonllao/moodle 2013-12-10 23:29:06 +01:00
Andrew Nicols
54d076a353 MDL-43104 JavaScript: Combine mcore JS into simplemoodle
I was wrong about why this didn't work before - this was caused by the
missing semi-colon.

Joining these scripts into a single combo-load has the benefit of further
reducing the number of HTTP transactions to load a page, and a minor
reduction on transferred size due to a reduced header count.
2013-12-09 09:05:16 +08:00
Damyon Wiese
6e2c417c1f MDL-41030 Behat: Add support for waiting for javascript
This is so that phantomjs (which runs faster than selenium) can pass the tests.
2013-12-06 12:13:39 +08:00
Andrew Nicols
104d698ffd MDL-43105 JavaScript: Use the correct versions of our rollups 2013-11-28 12:31:51 +08:00
Petr Škoda
7d26038d47 MDL-42438 load missing CSS for our simple YUI rollup 2013-10-19 21:04:26 +02:00
Petr Škoda
2cd519fb71 MDL-42152 fix broken theme->yuicssmodules support 2013-10-15 10:54:34 +08:00
Petr Škoda
d3e5f04671 MDL-42152 add more YUI rollup explanation from Andrew 2013-10-15 10:53:21 +08:00
Petr Škoda
d17f25a56e MDL-42152 rename our rollup to start with 'yui-' to enable the stadnard regex base magic 2013-10-15 10:53:20 +08:00
Petr Škoda
2ea00a5867 MDL-42152 improve SimpleYUI docs 2013-10-15 10:53:20 +08:00
Andrew Nicols
c8b9f6d9b0 MDL-42152 Use new rollup system 2013-10-15 10:53:20 +08:00
Petr Škoda
8a47844629 MDL-42152 import YUI 3.13.0 and switch to emulated SimpleYUI
Includes @version@ fix
2013-10-15 10:53:08 +08:00
Dan Poltawski
c58b3ca0ca Merge branch 'MDL-41985-master' of git://github.com/andrewnicols/moodle 2013-10-09 16:27:50 +08:00