55 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
ba1f804ffa
MDL-65292 style: Fix all function declarations white space
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing

All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.

Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
2024-02-28 23:33:26 +01:00
Meirza
8a5485a714 MDL-77338 backup: Added class properties that are not declared.
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-04-03 22:39:39 +07:00
Marina Glancy
a800e7e62f MDL-74853 various: add second parameter to htmlentities functions
Default value of the $flag argument changed in PHP 8.1 from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE
To ensure consistent behavior across different PHP version the second parameter is now required for the functions:
htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode() and get_html_translation_table()
2022-11-28 16:12:20 +01:00
Sara Arjona
3f2f2e85bb MDL-72115 course: Rename Miscellaneous category
The "Miscellaneous" course category has been renamed to Category 1.
Besides, the description field has been set from FORMAT_MOODLE to
FORMAT_HTML.
2021-09-13 08:36:17 +02:00
Stephen Bourget
0544ab902d MDL-69900 core_backup: Allow IMSCC v1.0 restore to finish 2020-10-09 09:04:22 +08:00
Eloy Lafuente (stronk7)
88d29a1bb8 MDL-66965 core: php74 curly 2 square braces changes
Note this only modified core files, still there are a lot
of curly brace uses but all them are within 3rd part
libraries and will be handled apart.
2019-10-25 17:41:10 +02:00
Alexander Bias
1ce19cc3ed MDL-66753 blocks: Remove references in core to block_participants 2019-10-07 08:34:20 +02:00
Zig Tan
e0d0f411cf MDL-54967 backup: Fix IMS CC import URL decoding for XML format
HTML encoding special characters to avoid XML compatibility issues during
Course backup restoration and avoid double encoding.
2017-12-15 09:19:31 +08:00
Damyon Wiese
246698e779 MDL-60615 imscc: string to array fix
Sloppy typing in the imscc converter is causing errors on php7.1

Variable is initialised as a string and then used as an array.
2017-11-09 15:05:36 +08:00
Michael Aherne
4582da2464 MDL-56319 blocks: Observe empty default blocks setting 2016-10-07 09:59:09 +01:00
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
David Monllao
9e313e798f MDL-51784 general: Adding missing php4 style constructors
Adding them to warn people calling the php4 constructor.
2015-12-11 14:02:42 +08:00
Marina Glancy
c4d0b752a2 MDL-51784 various: use __construct() for PHP7 compatibility 2015-12-11 12:48:24 +08:00
Ankit Agarwal
c917b53a8d MDL-50269 deprecations: Properly deprecate notify() 2015-12-01 15:29:33 +08:00
David Monllao
de5dd7c5c5 MDL-51048 backup: Removing unnecessary var 2015-09-15 13:43:45 +08:00
Corey Wallis
a3f5974065 MDL-51048 IMS-CC: Fix import & export of true/false questions 2015-09-07 16:05:11 +01:00
Mark Nielsen
95dc1e42d5 MDL-47569 backup: Escape section summary for XML
This was causing the parsing of the XML
to fail because things like & were not
escaped.
2014-10-07 11:47:40 -07:00
Mark Nielsen
4bcde92185 MDL-44630: Fix CC backup of quizzes
The common cartridge backup was skipping
quizzes because the <questions> element
is no longer in the Moodle backup file.
Instead, now reading from the list of
<question_instances> list.
2014-05-06 14:00:13 -07:00
Mark Nielsen
cb4b7e55a0 MDL-44630: Review changes
* Fixing coding style violations.
* Fixing DOMDocument warning.
2014-04-03 10:10:10 -07:00
Mark Nielsen
c3d245cff3 MDL-44630: Several additions to Common Cartridge Import/Export
Changes provided by Darko Miletic and Sam Chaffee.

* Fix problem with CC import not detecting a CC package. (Sam)
* Fixed Common Cartridge not importing FIB answers. (Sam)
* Fix to CC export so that short answer pattern matching question
  in a quiz does not prevent the entire quiz from exporting. (Sam)
* Fix notice about missing index when there is no answer-specific
  feedback in short answer question during CC export. (Sam)
* Fixed Japanese characters being incorrectly encoded (garbled)
  on Common Cartridge import. (Sam)
* Changed import of CC discussions to create 'Standard General'
  forums in Moodle. (Sam)
* Fix problem with question name being replaced with question
  text on CC import of exported Moodle questions. (Sam)
* Fix CC 1.1 multiple choice question import having no correct
  answers. (Sam)
* Fixed problem with multiple choice, multiple answers allowed
  questions not exporting correct answers to CC. (Sam)
* Removed duplicate method. (Darko)
* Implemented fix that skips quiz export if it contains
  non-exportable question. (Darko)
* Fixed: Common cartridge export is extremely slow when dealing
  with lot of more than 200 files. (Darko)
* Added support for basic roles support in common cartridge. (Darko)
* Implemented folder resource export. (Darko)
* Minor fixes to adjust to the standard. (Darko)
* Added support for exporting simple fill in the blank
  (shortanswer without wildcards in Moodle). (Darko)
* Added support for exporting essay question. (Darko)
* Added support for true/false export. (Darko)
* Added support for exporting multiple response questions,
  added also category information into question metadata
  during export (Darko)
* Added support for correctly importing multiple response
  questions. (Darko)
2014-03-13 15:42:13 -07:00
Russell Smith
ce2add5c90 MDL-41198 lib: Allow PHP to generate random seed on script start
All mt_srand instances are removed to allow PHP to do the work.
2013-12-18 16:45:33 +11:00
Petr Škoda
38fc013025 MDL-42040 refactor core Moodle shutdown handlers logic 2013-10-04 11:36:46 +02:00
Petr Škoda
eb459f7192 MDL-40642 set more restrictive umask and use proper permission for new dirs and files 2013-07-19 09:18:44 +02:00
Marina Glancy
8bc345339a MDL-36017 IMS-CC export does not filter result by numsections because it is now optional 2012-11-02 10:56:22 +08:00
Darko Miletic
7547946580 MDL-33523: Fixed item C of the issue 2012-06-14 17:12:53 -03:00
Darko Miletic
42642f6c35 MDL-33523: for for missing image (the folder.gif is no longer available) 2012-06-14 12:34:10 -03:00
Eloy Lafuente (stronk7)
f61194e387 MDL-33080 IMSCC: look for imsmanifest.xml @ root dir 2012-06-05 01:04:29 +02:00
Eloy Lafuente (stronk7)
8c4988cd3b Merge branch 'MDL-31561' of git://github.com/kiklop74/moodle 2012-02-21 02:30:14 +01:00
Darko Miletic
5b6d8a05f4 MDL-31562: Implemented support for exporting labels, minor additional
cleanups
2012-02-08 16:11:59 -03:00
Darko Miletic
5758596b95 MDL-31561: Implemented fix for honoring correct number of course
sections
2012-02-08 16:01:55 -03:00
Eloy Lafuente (stronk7)
fb051bf072 Merge branch 'MDL-30783_t2' of git://github.com/kiklop74/moodle 2012-01-09 21:47:16 +01:00
Eloy Lafuente (stronk7)
3c4500f5c7 Merge branch 'MDL-30778_t2' of git://github.com/kiklop74/moodle 2012-01-09 00:41:55 +01:00
Darko Miletic
afd2700f26 MDL-30783: Implemented fix 2011-12-30 12:33:57 -03:00
Darko Miletic
7db3d6216d MDL-30778: Implemented intendeduserrole support 2011-12-30 12:16:59 -03:00
Petr Skoda
9574c2ef0d MDL-30950 remove references to removed admin block
Credit goes to Ralf Hilgenstock.
2011-12-30 12:04:41 +01:00
Darko Miletic
986dc51a72 MDL-30631: Fixed the default grade import for the question for both CC
1.0 and 1.1
2011-12-15 17:14:10 -03:00
Eloy Lafuente (stronk7)
2321e0d661 Merge branch 'MDL-30444' of git://github.com/kiklop74/moodle 2011-11-29 16:39:22 +01:00
Darko Miletic
adf8f7a172 MDL-30435: updated xpath query for CC 1.0 and improved url validity
detection
2011-11-24 17:42:16 -03:00
Darko Miletic
4f26504015 MDL-3044: Fixed validation issue related to the incorrect definition of
xs:language type. All xs:language instances are replaced with xs:token
type. It relaxes validation enough for all the complex or dummy language
strings to be accepted.
2011-11-24 15:40:35 -03:00
Eloy Lafuente (stronk7)
9bddc37f97 MDL-29956 ims-cc - whitespace cleanup 2011-11-14 23:35:12 +01:00
Darko Miletic
584f92962d Updated text conversion to read and store safe xml strings. 2011-11-14 21:25:08 +01:00
Mark Nielsen
726a770949 MDL-29956: Common Cartridge should handle HTML content more natively (r17188, r17210:17265)
Also implemented support for LTI icon during import.
2011-11-14 21:25:08 +01:00
Mark Nielsen
91e6ca6e71 MDL-29956: Implement export of Quiz activity (r16977, r17032) 2011-11-14 21:25:08 +01:00
Mark Nielsen
42dffc6feb MDL-29956: Implement common cartridge export (r16882) 2011-11-14 21:25:08 +01:00
Tim Hunt
f263d4935f MDL-27913 Stray whitespace in backup. 2011-06-17 19:37:20 +01: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
4756e9c9e2 MDL-21915 fixing remaining chmod and mkdir to use moodle file permissions 2010-10-06 19:06:52 +00:00
Petr Skoda
6ad1100fe4 MDL-22102 killing all CRLFs, sorry for introducing them, we need to do search replace before each commit of 3rd party lib 2010-04-19 14:42:19 +00:00
Eloy Lafuente
64cc243f34 MDL-21750 ims-cc restore - avoid requiring net conection on validation. Credit goes to Darko ; merged from 19_STABLE 2010-03-04 21:32:29 +00:00
Eloy Lafuente
07fce85b97 MDL-20728 ims-cc import - fix importing of quiz with only 1 question ; merged from 19_STABLE 2009-11-12 23:55:06 +00:00