297 Commits

Author SHA1 Message Date
Andrew Nicols
1fa31fb376 MDL-44061 Ajax: Log whitespace issues to the server error log 2014-03-05 16:34:35 +08:00
Sam Hemelryk
2ef8ff9e05 MDL-44315 phpdoc: fixed up typos and made up tags 2014-02-24 09:13:31 +13:00
Andrew Nicols
af64bc6179 MDL-33099 Javascript: Deprecate the ajaxenabled function 2014-02-17 14:11:21 +08:00
Dan Poltawski
0eea6f5d99 Merge branch '43714-27' of git://github.com/samhemelryk/moodle 2014-01-21 14:49:26 +08:00
Sam Hemelryk
8496ddd7c6 MDL-43714 blocks: fixed coding style of ajax/blocks.php 2014-01-17 10:50:18 +13:00
Sam Hemelryk
efd556f77b MDL-43714 blocks: fixed notice when moving to an empty region 2014-01-17 10:45:23 +13:00
Sam Hemelryk
956e2e8a8c MDL-43675 navigation: courses branch is now recognised as expandable 2014-01-17 10:27:10 +13:00
Andrew Nicols
f2c780d525 MDL-34182 AJAX: Change to use shared method when checking the siteadminbranch for invalid output 2013-12-13 14:10:04 +08:00
Andrew Nicols
af736f903d MDL-34182: Add functions to warn of output in AJAX scripts
We need to be able to capture output when including contributed code as it
may add additional content which makes makes the json we output invalid.

We only warn of these errors if the site is in debugdeveloper, otherwise
we silently drop them.
2013-12-13 14:10:04 +08:00
Andrew Nicols
0bb56f2e31 MDL-42989 Admin: Clean output when building site administration tree for JS
Previously, any inappropriate whitespace found whilst building the admin
tree caused a JSON error and for the site administration tree retrieval to
fail.

This change ensures that access to the site administration tree is unbroken
for non-developers, whilst still alerting developers that there is an
issue.
2013-12-02 14:28:37 +08:00
Petr Škoda
d5814f4e22 MDL-41811 simplify the admin tree detection logic and fix navigation in multiple areas 2013-10-21 14:17:55 +08:00
Rajesh Taneja
5ab32c11b7 MDL-41811 navigation: Site admin will be loaded by ajax on non admin pages 2013-10-21 14:17:52 +08:00
Dan Poltawski
378b3eac83 MDL-36316 useragent: Reduce user agent sniffing
* core_useragent: Introduce is_vendor methods to improve readability
  when we are just detecting if a browser is from a vendor, rather than
  the exact version

* Remove uncessary browser version checks when we are just detecting
  vendors - this makes the intention of our sniffing clearer.

* Remove sniffing for browsers which we do not support, grades/ajax/tinymce
  all support modern browsers so there is no need to sniff for them.
2013-09-13 14:25:37 +08:00
Sam Hemelryk
c3d2fbf9cd MDL-40931 useragent: separated user agent functionality into a lib
This commit moves user agent related functionality out of several
core libraries and combines it into a more manageable class.
All core uses are converted and functions deprecated in favor
of the new class.
2013-08-26 13:59:19 +12:00
Damyon Wiese
9ead041cdb Revert "MDL-40931 useragent: separated user agent functionality into a lib"
This reverts commit af62237d0e6e27df868d50848f7098f57c103f86.
This reverts commit 87a4194fdcd322d4aee5a6207b55a8da0864da94.
This reverts commit b2c66eb60c01805f26cc791966f05be52af7b406.

Conflicts:

	version.php
2013-08-22 13:31:25 +08:00
Sam Hemelryk
87a4194fdc MDL-40931 useragent: converted useragent calls in ajaxenabled 2013-08-21 09:48:31 +10:00
Sam Hemelryk
af62237d0e MDL-40931 useragent: separated user agent functionality into a lib
This commit moves user agent related functionality out of several
core libraries and combines it into a more manageable class.
All core uses are converted and functions deprecated in favor
of the new class.
2013-08-16 09:02:01 +12:00
Petr Škoda
8252b7c291 MDL-40901 standardise core test case class and file names
This finally allows us to type only the class name when executing individual core test cases.
2013-08-04 22:10:31 +02:00
Marina Glancy
3b42c973d7 MDL-38631 link categories in My courses only when needed 2013-06-22 16:27:28 +10:00
Paul Nicholls
606554d5b0 MDL-32652 - Make block drag-drop work throughout Moodle
The central "content" region on My Home / user profile pages also needs to
be initialised in lib/ajax/blocks.php in order to allow blocks to be
dropped into that region successfully.  Some tweaks were also necessary in
order to correct the "content" region's structure in order for drag-drop
to function on this region on these pages.

Non-standard block regions (including the central "content" region
used by My Home and user profile pages) were causing the temporary empty
block region used as a drop target to sometimes appear in the wrong place.

The call to init_requirements_data (which includes the block drag-drop JS)
happens at a late enough stage in page generation that we can simply
pass the context ID through to the JS, so that it can be sent as part of
the AJAX request.  This prevents lib/ajax/blocks.php from having to try
to guess the context from the other bits of information it receives, so
block drag-drop should now work everywhere without issues.
2013-01-29 14:57:28 +13:00
Dan Poltawski
dec70f2599 Revert "MDL-32652 - Make block drag-drop work throughout Moodle"
This reverts commit d7c29c22572314680350ccdcf801f188aca541e4.
2013-01-25 11:52:15 +08:00
Paul Nicholls
d7c29c2257 MDL-32652 - Make block drag-drop work throughout Moodle
Other than shifting the initialisation from course/lib.php to
lib/outputrequirementslib.php, some workarounds/tweaks were required
in order to make it work correctly on admin pages and My Home.
2013-01-15 14:55:31 +13:00
Mark Nielsen
e893c6d442 MDL-36607: Improve block drag and drop
* Adding support for subpage
* Adding support for regions that do not start with "side-"
2012-12-10 14:12:57 +13:00
Sam Hemelryk
b9c87ef86a MDL-33017 navigation: Tidied up after peer-review 2012-11-07 09:52:47 +13:00
Sam Hemelryk
58b602da8e MDL-33017 navigation: added current course and simplified loading 2012-11-04 11:06:49 +13:00
Adrian Greeve
b0c6dc1cac MDL-34465 - lib - Replacing get_context_instance with context_XXXX::instance (group 8) 2012-07-27 10:10:46 +08:00
Dan Poltawski
cfed1268ef MDL-33990 - yui2: remove 2 uncessary requirements
We no longer use yui2 logger and connection in set_user_prefs
2012-06-25 14:42:00 +08:00
Dan Poltawski
a80b5a0cf0 MDL-32908 - drop $USER->ajax
Its not been respected for some time and is just confusing
2012-06-19 15:07:18 +08:00
Dan Poltawski
70b36b488b MDL-31263 lib/ajax/blocks.php fix nonsensical url 2012-04-26 11:03:05 +08:00
Eloy Lafuente (stronk7)
ee5855687e Merge branch 'MDL-31052-js-rewrite' of git://github.com/danpoltawski/moodle 2012-04-26 03:32:08 +02:00
Ruslan Kabalin
5683815612 MDL-31263 Rewrite block drag/drop using YUI3 2012-04-24 13:25:43 +08:00
Andrew Robert Nicols
ebaa29d107 MDL-31096 Convert course resource/section javascript to YUI3 Module
AMOS BEGIN
  MOV [hideweekfromothers,moodle],[hidefromothers,format_week]
  MOV [showweekfromothers,moodle],[showfromothers,format_week]
  MOV [hidetopicfromothers,moodle],[hidefromothers,format_topics]
  MOV [showtopicfromothers,moodle],[showfromothers,format_topics]
AMOS END
2012-04-23 21:28:39 +01:00
Petr Skoda
f59f03ad2d MDL-32569 drop more core simpletests that were already migrated 2012-04-21 16:27:30 +02:00
Petr Skoda
4b02743182 MDL-32149 improve testcase naming and list in config file 2012-04-03 22:30:57 +02:00
Petr Skoda
7ddef99455 MDL-32149 some more cleanup and testing of PHPUnit asserts 2012-04-03 22:30:56 +02:00
Petr Skoda
a3d5830a0a MDL-32149 PHPUnit test support - part 2
Includes:
* constants refactoring
* reworked db table init
* support for $CFG->debug = -1
* functional DB tests
* fixed $DB->get_indexes() to not throw exceptions when table does not exist
* fix handling of user passwords in test db
* add debug info to exception messages
* removed unnecessary PHP debug errors from mathslib
* fixed @error suppression in get_string
* fixed PHPUnit error handler setup
* added timezone info to default install
2012-04-03 22:30:53 +02:00
Rajesh Taneja
4d6f9478ed MDL-31903 course: Title on highlight and hide icon should be only added in ie 2012-03-26 11:44:50 +13:00
Rajesh Taneja
618c155a24 MDL-31903 course: Highlight icon will get iniatlised properly 2012-03-26 11:44:50 +13:00
Rajesh Taneja
f753887155 MDL-31903 course: update patch to fix course highlight icon and title toggle 2012-03-26 11:44:50 +13:00
Juho Viitasalo
730477a878 MDL-31903 course: Fixed course highlight icon and title toggle 2012-03-26 11:44:16 +13:00
Sam Hemelryk
4a3ecbb25e MDL-30988 ajax: Fixed up phpdocs package in ajax scripts 2012-02-23 14:38:52 +13:00
Sam Hemelryk
56588dfbee MDL-30988 Fixed phpdocs during integration review 2012-02-21 12:01:00 +13:00
Gerard (Gerry) Caulfield
4d6b40a020 Updating phpdoc comments to Rajesh's specifications. 2012-02-15 11:07:38 +08:00
Andrew Robert Nicols
6dc5908ef7 MDL-31040 Correct LTR language issue and inconsistency in display 2012-01-11 10:58:23 +00:00
Petr Skoda
af18993548 MDL-30787 fix use of module and section edit capabilities 2011-12-18 13:54:38 +01:00
Tony Levi
d9b49c23da MDL-27228: Fix label 'eye' does not match show/hide setting 2011-08-21 14:54:00 +02:00
David Mudrak
fa82056328 MDL-11288 Added ability to duplicate module in the course
Internally, the new script modduplicate.php performs a single activity
backup and restore and then moves the newly created copy right below the
original.
2011-03-31 13:39:05 +02:00
Petr Skoda
431ac39634 MDL-26623 fix file permissions
The permissions are now going to be verified as part of the weekly release process.
2011-03-01 12:26:49 +01:00
Petr Skoda
8a7703ce53 MDL-25973 add missing charset 2011-01-14 09:32:17 +01:00
Andrew Robert Nicols
218a465980 lib/ajax/ MDL-25675 Use className instead of classList.toString()
Signed-off-by: Andrew Robert Nicols <andrew.nicols@luns.net.uk>
Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
2011-01-05 23:26:28 +00:00