Compare commits

...

205 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 1a07c564c8 Moodle release 2.3.8 2013-07-06 17:53:38 +02:00
Damyon Wiese 0a7afb8746 weekly release 2.3.7+ 2013-07-04 15:32:32 +08:00
Damyon Wiese 392c581c45 MDL-40308: Fix javascript for lti mod_form
It was toggling the state of the hidden input - not the checkbox.
2013-07-04 13:47:53 +08:00
Michael Aherne 77182cd299 MDL-40275 core Improve documentation for block_base::has_config() 2013-07-02 21:55:45 +02:00
Damyon Wiese a251526d72 Merge branch 'wip-MDL-40353-m23' of git://github.com/marinaglancy/moodle into MOODLE_23_STABLE 2013-07-02 14:29:46 +08:00
Andreas Grabs a5a4a5ea1e MDL-39570 mod_feedback - Missing privilege check 2013-07-02 13:35:34 +08:00
Petr Škoda 7d2b47d265 MDL-40266 improve emulate_bound_params() for mssql driver
Looping over large numbers of items with array_shift() is expensive.
Reverse the array and fetch items from the top of the pile.

Credit goes to Martin Langhoff for original mysqli fix.
2013-07-02 13:33:38 +08:00
Petr Škoda 6d8558ed06 MDL-40266 improve emulate_bound_params() for sqlsrv driver
Looping over large numbers of items with array_shift() is expensive.
Reverse the array and fetch items from the top of the pile.

Credit goes to Martin Langhoff for original mysqli fix.
2013-07-02 13:33:38 +08:00
Dan Marsden c76c989420 MDL-39628 Chat: check mod/chat:chat capability when using daemon.
Thanks to Francois Gauthier for report/fix.
2013-07-02 12:23:31 +08:00
Jason Fowler 1adad7f783 MDL-37818 - RSS - Prevent access to blocks while RSS context errors are displayed 2013-07-02 10:10:26 +08:00
Martin Langhoff e13acecad7 MDL-40266 improve emulate_bound_params() for mysqli
Looping over large numbers of items with array_shift() is expensive.
Reverse the array and fetch items from the top of the pile.
2013-07-02 09:56:17 +08:00
Eloy Lafuente (stronk7) 490bf4e84f Merge branch 'get_users_by_capability_fix_m23' of http://github.com/timgus/moodle into MOODLE_23_STABLE 2013-07-02 00:47:00 +02:00
Rossiani Wijaya 919a40f31c MDL-39546 Lesson module: removed duplicate to decode special characters 2013-07-02 09:35:40 +12:00
Rossiani Wijaya de42137285 MDL-39546 Lesson module: fixed matching question issues 2013-07-02 09:35:29 +12:00
Eloy Lafuente (stronk7) 16b73cf30d Merge branch 'w27_MDL-39754_m23_evn26' of https://github.com/skodak/moodle into MOODLE_23_STABLE 2013-07-01 23:14:26 +02:00
Petr Škoda fcbba30ad4 MDL-39754 copy 2.5 requirements to Moodle 2.6
Optional features and warnings may be added later,
but we need at least required environment for 2.5.1

This includes database family cleanup and more realistic memory requirement.
2013-07-01 10:04:31 +02:00
Mark Nielsen 4e286e58a3 MDL-40308: Privacy settings do not change
Update LTI mod form so checkboxes always submit their value.
2013-07-01 11:27:22 +08:00
Sam Hemelryk fb17d60fde MDL-40344 navigation: expandable branch id is now properly unique 2013-06-28 09:59:04 +12:00
Eloy Lafuente (stronk7) 0b8f6159b2 weekly release 2.3.7+ 2013-06-27 20:11:07 +02:00
Eloy Lafuente (stronk7) 2624a2edf4 Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2013-06-27 20:05:44 +02:00
Marina Glancy 1d5932bf44 MDL-40353 fixed wrong redirection on course group page 2013-06-27 13:54:43 +10:00
AMOS bot d89ca90ca6 Automatically generated installer lang files 2013-06-27 00:40:27 +00:00
Eloy Lafuente (stronk7) 2928ac025c Merge branch 'MDL-40264-m23-essay-zero' of git://github.com/ktemkin/moodle into MOODLE_23_STABLE 2013-06-24 21:22:06 +02:00
Eloy Lafuente (stronk7) b19d21e26b Merge branch 'MDL-34610_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-06-24 20:21:55 +02:00
Eloy Lafuente (stronk7) c55a7ac5b0 Merge branch 'MDL-40255_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2013-06-24 19:26:49 +02:00
Matteo Scaramuccia d158acc4ff MDL-40200 Administration: Return the invalid user message and stop there
To avoid adding duplicate code, 'invalid user' and 'user deleted' checks
have been merged together.

Conflicts:
	user/profile.php
2013-06-24 19:03:29 +02:00
Sam Chaffee 4010b22051 MDL-40258: Fixed invalid json string error in file-picker 2013-06-24 18:57:22 +02:00
Ankit Agarwal d306f96750 MDL-40250 phpunit: Add unit tests for core_files_external::upload() 2013-06-24 18:11:56 +02:00
Sam Hemelryk 410899e3b2 Merge branch 'MDL-39760-MOODLE_23_STABLE' of https://github.com/lucisgit/moodle into MOODLE_23_STABLE
Conflicts:
	mod/assign/locallib.php
2013-06-24 14:25:54 +12:00
Sam Hemelryk 6005edc60f MDL-38347 fixed whitespace 2013-06-24 11:29:45 +12:00
Sam Hemelryk a2e47d596a Merge branch 'wip-MDL-38347-stable23' of git://github.com/phalacee/moodle into MOODLE_23_STABLE 2013-06-24 11:20:27 +12:00
Sam Hemelryk c209e59206 Merge branch 'MDL-28124_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2013-06-24 10:28:46 +12:00
Mary Evans d80a7da7c1 MDL-40255 theme_boxxie/theme_formfactor: Added block-region class to layout files to enable dnd file uploader to work. 2013-06-22 21:27:55 +01:00
Tim Hunt 80178c1c9e MDL-34610 remove legacy IE CSS. It breaks form layout 2013-06-21 21:57:51 +01:00
Kyle Temkin 3553982d6d MDL-40264 fix essay handling of zero-string response
Fixes an inappropriate behavior of the is_complete_response() function
for the Essay question type, which caused the string "0" to be
inappropriately marked as an incomplete response.

Also adds a set of unit tests for the Essay question type's
is_complete_response.
2013-06-21 03:39:23 -04:00
Dan Poltawski 6420fea64b weekly release 2.3.7+ 2013-06-21 13:27:50 +08:00
Tim Gus 66d0022594 MDL-40259 - For SCORM reports limit fields returned from
get_users_by_capability to user ID to decrease memory utilization
2013-06-20 15:57:27 -04:00
Ruslan Kabalin 78fa55b23e MDL-39760: mod_assign: Add few more callback methods.
Adds lock, unlock and release_to_draft. All of them accept single parameter -
an assign_submission record.
2013-06-19 15:38:34 +01:00
Ruslan Kabalin 7aec80dd9e MDL-39760: mod_assign: Make submit_for_grading accept submission as parameter 2013-06-19 15:38:34 +01:00
Marina Glancy 319b329367 Merge branch 'MDL-40207-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2013-06-18 15:41:36 +10:00
Marina Glancy 3ad26c86eb Merge branch 'MDL-39650-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2013-06-18 14:11:54 +10:00
Ruslan Kabalin d71021f601 MDL-33546: course: Fix current week hightlighting after dragging the section 2013-06-18 13:06:11 +10:00
Marina Glancy ade9bbc32e Merge branch 'MDL-40165-m23' of git://github.com/andrewnicols/moodle into MOODLE_23_STABLE 2013-06-18 12:54:40 +10:00
Marina Glancy 30b38ce4fa Merge branch 'MDL-38079_23' of git://github.com/mr-russ/moodle into MOODLE_23_STABLE 2013-06-18 11:15:54 +10:00
Eloy Lafuente (stronk7) f49cd5fcd8 Merge branch 'MDL-33562-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE
Conflicts:
	version.php
2013-06-18 00:48:50 +02:00
Sam Hemelryk 62c4ccef0e Merge branch 'MDL-30132_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2013-06-18 10:26:10 +12:00
Sam Hemelryk df86b97f1a Merge branch 'wip-MDL-40159-m23' of git://github.com/marinaglancy/moodle into MOODLE_23_STABLE 2013-06-18 09:03:54 +12:00
Russell Smith 35c70d0425 MDL-38079 mod_feedback - Hide "add question to activity" button 2013-06-17 20:02:38 +10:00
Marina Glancy 7fb1afbb38 MDL-40159 Fixing bug with empty variable, regression from MDL-21097 2013-06-17 14:33:59 +10:00
Sam Hemelryk 4dac72bcc8 Merge branch 'm23_MDL-40095_Completion_locked_Error_on_save' of https://github.com/scara/moodle into MOODLE_23_STABLE 2013-06-17 16:09:36 +12:00
Sam Hemelryk 0b79440ddf Merge branch 'MDL-21933_23' of https://github.com/mr-russ/moodle into MOODLE_23_STABLE 2013-06-17 15:44:58 +12:00
Sam Hemelryk a971dd3992 Merge branch 'wip-MDL-40091-MOODLE_23_STABLE' of git://github.com/satrun77/moodle into MOODLE_23_STABLE 2013-06-17 15:42:55 +12:00
Dan Poltawski 5d447145ba MDL-40207 simplepie: reduce false failures in unit tests
The simplepie tests time out too quickly due to a low connect timeout,
to fix this, I converted the unit tests to use a high timeout value.
2013-06-17 10:56:27 +08:00
Sam Hemelryk 1691794cb1 Merge branch 'MDL-39761-MOODLE_23_STABLE' of https://github.com/lucisgit/moodle into MOODLE_23_STABLE 2013-06-17 14:24:37 +12:00
Sam Hemelryk 5838cbd4ff MDL-40142 navigation: fixed chainable issue with navigation JS 2013-06-17 09:15:51 +12:00
Mary Evans d63b6cf619 MDL-28124 admin/tool/customlang: Changed page layout from 'standard' to 'report'. 2013-06-15 00:13:53 +01:00
Mohamed Alsharaf dc7d68880a MDL-40091 book: revision must be incremented after editing a chapter 2013-06-14 21:25:33 +12:00
Marina Glancy eabe1d3b6b weekly release 2.3.7+ 2013-06-14 13:34:42 +10:00
Andrew Nicols 4ea0abedb0 MDL-40165 Backup: Split out test classes into multiple files 2013-06-13 08:58:30 +01:00
Dan Poltawski c5338156c5 Revert "MDL-39832 Files: Revert MDL-39688 commit, 6ce0c9ce42fa7849e67d7611a628ece51c336c5f"
This reverts commit 1cb1157809.
2013-06-13 13:58:00 +08:00
Dan Poltawski db1a0b53c5 Revert "MDL-39832 Files: Fixed ETag format according with RFC2616."
This reverts commit bf4a95e6a3.
2013-06-13 13:57:58 +08:00
Russell Smith e456edf9b7 MDL-21933 course: Allow users to search participants course permission
Capability checks are performed at the top of the page and do not need
to be completed again.

Search is an expected feature for users and it was confusion to only
appear after 3 pages.  This has been changed to enable search when
there are more records than are visible on the screen.  If users
are unable to use browser search, they will be able to use Moodle's
search.
2013-06-13 12:44:36 +10:00
Mary Evans eb38cf2d7a MDL-30312 User: Changed page layout from mydashboard to mypublic in user/profile.php 2013-06-12 21:18:44 +01:00
Sam Hemelryk 1d26199125 Merge branch 'MDL-25901-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2013-06-12 08:59:32 +12:00
Sam Hemelryk 3a2ad025e1 Merge branch 'MDL-26925-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2013-06-11 17:30:58 +12:00
Sam Hemelryk f3358600e7 Merge branch 'MDL-39505-migrate-file-backport_23' of git://github.com/mudrd8mz/moodle into MOODLE_23_STABLE 2013-06-11 17:15:47 +12:00
Sam Hemelryk 3343cd5d92 Merge branch 'MDL-22390_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-06-11 17:08:21 +12:00
Dan Poltawski 610f07c288 Merge branch 'm23_MDL-40002_ETag_value_must_be_a_quoted-string' of https://github.com/scara/moodle into MOODLE_23_STABLE 2013-06-11 12:54:59 +08:00
Marina Glancy d5bba86435 Merge branch 'MDL-39412_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-06-11 12:12:36 +10:00
Matteo Scaramuccia da297e7390 MDL-40095 SCORM: Trivial comments tidy up 2013-06-10 21:10:22 +02:00
Matteo Scaramuccia 0ec8a329bc MDL-40095 SCORM: Fixed DML error when saving with completion options locked
Regression caused by MDL-38315.
2013-06-10 21:10:07 +02:00
Dan Poltawski bb059c31ad Merge branch 'MDL-39947_23' of https://github.com/aolley/moodle into MOODLE_23_STABLE 2013-06-10 16:20:56 +08:00
Dan Poltawski 61603bb034 Merge branch 'm23_MDL-39832_Fix_Chrome_Issues_ETag_XSendfile' of https://github.com/scara/moodle into MOODLE_23_STABLE 2013-06-10 15:43:25 +08:00
Dan Poltawski 885c3f5824 Merge branch 'MDL-40018_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2013-06-10 15:00:39 +08:00
David Mudrák 0a4dcf2ad7 MDL-40080 Remove unused strings from the core_hub subsystem 2013-06-10 14:42:25 +08:00
Dan Poltawski 1735fbc1ef Merge branch 'MDL-39667-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2013-06-10 12:51:51 +08:00
Sam Hemelryk 94be2b5074 Merge branch 'MDL-40009_m23' of https://github.com/markn86/moodle into MOODLE_23_STABLE 2013-06-10 15:54:34 +12:00
Sam Hemelryk 628e0528e8 Merge branch 'w24_MDL-39549_m23_cohortsearch' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-06-10 15:47:38 +12:00
Sam Hemelryk b87dc0e925 Merge branch 'MDL-39971_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-06-10 15:09:22 +12:00
Sam Hemelryk f83cd734f9 Merge branch 'w24_MDL-32480_m23_imscp' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-06-10 14:39:54 +12:00
Sam Hemelryk ad6976aae5 Merge branch 'MDL-36090_log2_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2013-06-10 12:30:24 +12:00
Matteo Scaramuccia 16b143ef22 MDL-40002 Files: ETag value must be a quoted-string.
ETag value must be double quoted, http://tools.ietf.org/html/rfc2616#section-3.11.
More details about potential impacts in MDL-39832: shortly, at least when using
HTTP Partial GET Requests (HTTP Status: 206) plus X-Sendfile HTTP Header.
In this commit, the impact is to be RFC2616 compliant when using the ETag Header.
2013-06-09 10:38:59 +02:00
Tim Hunt 206db13c8e MDL-22390 autolink filter: handle URLs in brackets better.
This breaks some legitimate URLs like
http://en.wikipedia.org/wiki/Slash_(punctuation).
This is a necessary trade-off. Many other web systems do not handle that
case correctly either. The work-around it so escape the ) as %29.

This commit also improves the way the unit tests for this work.

It also fixes a couple of other tricky cases that were spotted in
the forums while this was being discussed. See the new test cases.
2013-06-08 16:56:53 +01:00
Petr Škoda 92df65aedd MDL-39549 fix cohort search in course categories 2013-06-07 22:09:55 +02:00
Petr Škoda f296df5125 MDL-37780 fix 1.9 restore on windows 2013-06-07 10:23:41 +02:00
Petr Škoda 663e3ce8b2 MDL-32480 allow external https links in IMSCP too 2013-06-07 10:00:52 +02:00
Nicolas Dunand f3369f1607 MDL-32480 fix display of IMS content packages with external links 2013-06-07 10:00:52 +02:00
Matteo Scaramuccia bf4a95e6a3 MDL-39832 Files: Fixed ETag format according with RFC2616.
ETag must be double quoted,
http://tools.ietf.org/html/rfc2616#section-3.11:

      entity-tag = [ weak ] opaque-tag
      weak       = "W/"
      opaque-tag = quoted-string
2013-06-06 23:06:04 +02:00
Matteo Scaramuccia 1cb1157809 MDL-39832 Files: Revert MDL-39688 commit, 6ce0c9ce42
MDL-39688 has been successful in providing a solution for the issue but further
investigations done in MDL-39832 have got the evidence that the given solution
is more likely a workaround.
2013-06-06 23:06:02 +02:00
Dan Poltawski 4908daf0c1 MDL-26925 User selector: Set label when no results
Thanks to Jonathon Fowler for the fix!
2013-06-06 14:10:21 +08:00
Dan Poltawski 969e5b51a0 weekly release 2.3.7+ 2013-06-06 12:00:05 +08:00
Dan Poltawski 4abc48ac46 Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2013-06-06 11:55:56 +08:00
Dan Poltawski 7e05737fb4 MDL-25901 rss: do not copyright html tag
They copyright field does not permit html, it should be plain text
2013-06-06 11:31:13 +08:00
Eloy Lafuente (stronk7) a07b82a9bb Merge branch 'wip-MDL-21097-m23' of git://github.com/marinaglancy/moodle into MOODLE_23_STABLE
Conflicts:
	index.php
2013-06-05 10:45:19 +02:00
Marina Glancy a6ce14dfb5 MDL-21097 Correctly check capabilities for frontpage editing mode 2013-06-05 18:06:56 +10:00
Marina Glancy 3ffbbeea7c MDL-21097 corrected course editing roles 2013-06-05 16:42:47 +10:00
Marina Glancy 5e8de26794 MDL-21097 Correctly check capabilities for course settings items
- Make sure that items in course settings (and frontpage settings) are shown depending on user capabilities
- Make sure user is able to turn editing on on the page even if he has only limited number of seciton/modules capabilities
2013-06-05 16:42:47 +10:00
Dan Poltawski 330ae1764f Merge branch 'wip-MDL-21097-m23' of git://github.com/marinaglancy/moodle into MOODLE_23_STABLE 2013-06-05 13:11:58 +08:00
Marina Glancy 7072c3cdc6 MDL-21097 corrected course editing roles 2013-06-05 14:00:11 +10:00
Andrew Davis f2f5e4dd44 MDL-36090 core_grade: added logging of overriding of student grades 2013-06-05 08:58:26 +08:00
Eloy Lafuente (stronk7) f21e4e5b5f Merge branch 'w23_MDL-39416_m23_pagelog' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-06-05 02:44:11 +02:00
Eloy Lafuente (stronk7) 03cfbefbff Merge branch 'MDL-38731-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2013-06-05 02:31:10 +02:00
Eloy Lafuente (stronk7) c47cd3442f Merge branch 'MDL-37332-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2013-06-05 02:27:49 +02:00
Eloy Lafuente (stronk7) 92b8d952f1 Merge branch 'wip-MDL-21097-m23' of git://github.com/marinaglancy/moodle into MOODLE_23_STABLE 2013-06-05 01:43:34 +02:00
Mary Evans 62f0d51b4f MDL-40018 theme_sky_high: Fixed footer in admin pages. 2013-06-05 00:23:18 +01:00
Mark Nelson e5c2e2cfab MDL-40009 notes: corrected the form element names passed to setType 2013-06-04 18:11:12 +08:00
Tim Hunt 22be561eb6 MDL-39945 qtype multichoice was not comparing blank responses correctly. 2013-06-04 15:54:44 +08:00
Mary Evans 94572e5c93 MDL-39835 theme_sky_high: Fix for footer to display correctly in higher resolutions. 2013-06-04 14:45:34 +08:00
Dan Poltawski 7b21fa1712 Merge branch 'MDL-39536-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2013-06-04 13:25:38 +08:00
Frederic Massart 3454eea93e MDL-39536 completion: Unit tests for get_activities and has_activities 2013-06-04 12:57:42 +08:00
Frederic Massart 5f83d3d3d6 MDL-39536 completion: Prevent DB call when fetching activities 2013-06-04 12:57:41 +08:00
David Mudrák db70e53773 MDL-39939 Fix the basic SCORM report plugin name 2013-06-04 12:28:00 +08:00
Dan Poltawski 6bc6ddd29d Merge branch 'MDL-39317-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2013-06-04 11:26:53 +08:00
Dan Poltawski 5f7c57ef85 Merge branch 'wip_23_mdl-34085' of https://github.com/iarenaza/moodle into MOODLE_23_STABLE 2013-06-04 10:43:28 +08:00
AMOS bot 09773eca4e Automatically generated installer lang files 2013-06-04 00:46:38 +00:00
Marina Glancy 4f8af9cbdf MDL-39801 navigation_node::remove does not allow to insert nodes afterwards 2013-06-04 02:06:09 +02:00
Marina Glancy 337c63aac4 MDL-39801 navigation_node::remove fails if first child does not have a key 2013-06-04 02:06:02 +02:00
Eloy Lafuente (stronk7) 266a68e840 MDL-39764 style: phpdoc changed to inline comments 2013-06-04 01:47:14 +02:00
Eloy Lafuente (stronk7) 7b78c24ba0 Merge branch 'wip-MDL-39764_M23_3' of git://github.com/gjb2048/moodle into MOODLE_23_STABLE 2013-06-04 01:44:57 +02:00
Gareth J Barnard d49e53b39f MDL-39764 course_format: Allow courses to have numsections > maxsections. 2013-06-04 00:07:46 +01:00
Eloy Lafuente (stronk7) 459b4e96a1 MDL-39465 Show env. info instead of part twice. 2013-06-04 00:51:18 +02:00
Eloy Lafuente (stronk7) db728b8e59 Merge branch 'w23_MDL-39465_m23_environment' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-06-04 00:01:24 +02:00
Eloy Lafuente (stronk7) b34fdf7d1f Merge branch 'MDL-39166-m23' of https://github.com/jfilip/moodle into MOODLE_23_STABLE 2013-06-03 23:55:54 +02:00
Eloy Lafuente (stronk7) 83165bec0b Merge branch 'MDL-39932_23' of git://github.com/grabs/moodle into MOODLE_23_STABLE 2013-06-03 19:11:03 +02:00
Eloy Lafuente (stronk7) 00e4ad0d17 Merge branch 'MDL-39487_23' of https://github.com/IOC/moodle into MOODLE_23_STABLE 2013-06-03 19:03:48 +02:00
Petr Škoda a3ccd8e86e MDL-39416 do not try to get detailed perflog info before PAGE int 2013-06-02 13:33:20 +02:00
Petr Škoda 2fd690e4b8 MDL-39465 detect environment problems in tests
This should help explain why something else fails.
2013-05-31 22:05:05 +02:00
Tim Hunt 1a3e7ab0d3 MDL-39971 each attempt builds on last broken for previews. 2013-05-31 20:34:17 +01:00
Dan Poltawski 417dbe3840 MDL-38731 course: split course group settings header
Allow translators to translate the heading differently.

AMOS BEGIN
  CPY [groups,group],[groupsettingsheader,group]
AMOS END

Conflicts:
	course/edit_form.php
2013-05-31 12:15:37 +08:00
Dan Poltawski dbe006d468 MDL-37332 portfolio: don't add double slashes
get_filepath() always returns trailing slash.

This breaks windows export - thanks to Jason Platts
2013-05-31 11:52:10 +08:00
Marina Glancy 39d0fe3693 MDL-21097 Correctly check capabilities for course settings items
- Make sure that items in course settings (and frontpage settings) are shown depending on user capabilities
- Make sure user is able to turn editing on on the page even if he has only limited number of seciton/modules capabilities
2013-05-31 13:21:56 +10:00
Frederic Massart e4b771cf0d MDL-39650 form: Type can be set on repeated elements in a group 2013-05-31 11:06:12 +08:00
Dan Poltawski 8feae80284 MDL-33562 lib: remove deleted user tokens 2013-05-31 10:31:42 +08:00
Dan Poltawski 9b61ac3fdc MDL-33562 lib: remove private keys when user deleted 2013-05-31 10:29:39 +08:00
AMOS bot 449f2f9b18 Automatically generated installer lang files 2013-05-31 00:43:11 +00:00
Adam Olley 8d148dd866 MDL-39947 mod_forum: Add safety check to variable assignment when counting unread posts 2013-05-31 09:51:24 +09:30
Andreas Grabs 3db65127c3 MDL-39932 mod_feedback - Mapping Feedback when Course is Deleted - thx to David N. Johnson 2013-05-30 23:25:24 +02:00
Iñaki Arenaza 689ba48b00 MDL-34085 Fix the backup options names in core_course_duplicate_course
Fix the option names to match those used by the backup subsystem.
2013-05-30 17:50:22 +02:00
Damyon Wiese ee2e56ee9e weekly release 2.3.7+ 2013-05-30 12:08:55 +08:00
Damyon Wiese c5fd8a39f2 Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2013-05-30 11:27:00 +08:00
AMOS bot 323af23325 Automatically generated installer lang files 2013-05-30 00:38:26 +00:00
Damyon Wiese cf697e3406 MDL-39317 assign: Fix for submitted filter on grading table.
Some old upgraded assignments have no timecreated column so use
a different one to check for a valid submission.
2013-05-29 14:51:23 +08:00
AMOS bot 8deed6fdc5 Automatically generated installer lang files 2013-05-29 00:39:25 +00:00
Jason Fowler ce7e354ae5 MDL-38347 - Calendar - Fixing arrow output on Android devices 2013-05-28 15:28:30 +08:00
Damyon Wiese 25534fde40 Merge branch 'w22_MDL-39802_m23_deletedusers' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-05-28 09:55:41 +08:00
AMOS bot 85b320becb Automatically generated installer lang files 2013-05-28 00:38:18 +00:00
Damyon Wiese ec928e8c14 Merge branch 'MDL-39640-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2013-05-27 16:17:19 +08:00
Dan Poltawski be5a3e6117 Merge branch 'MDL-38239-moodle23' of git://github.com/StudiUM/moodle into MOODLE_23_STABLE 2013-05-27 14:14:03 +08:00
Dan Poltawski 4aa5c142a1 Merge branch 'w22_MDL-39688_m23_etag' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-05-27 13:43:55 +08:00
Petr Škoda b2bcd0ff35 MDL-38408 validate PayPal dates and costs always 2013-05-25 22:19:28 +02:00
Petr Škoda 6ce0c9ce42 MDL-39688 do not set Etag when sending http ranges 2013-05-25 09:13:39 +02:00
Petr Škoda 5c713da067 MDL-39802 fix sloppy user deleting and creating in imsenterprise plugin 2013-05-24 21:20:45 +02:00
Petr Škoda f7da02f3b0 MDL-39802 add cli script for fixing of all deleted users
Use this script if something just set the user.deleted flag instead of calling the delete_user() method.
2013-05-24 21:20:19 +02:00
Damyon Wiese 7621b70368 weekly release 2.3.7+ 2013-05-24 13:24:03 +08:00
Damyon Wiese dc3d236a4b Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2013-05-24 13:11:32 +08:00
Eloy Lafuente (stronk7) 4a19404d65 Merge branch 'wip-MDL-39177-m23' of git://github.com/marinaglancy/moodle into MOODLE_23_STABLE 2013-05-23 16:00:33 +02:00
Marina Glancy 06535ae415 MDL-39177 make sure we don't remove existing directories when cleaning up unzip 2013-05-23 19:20:38 +10:00
AMOS bot c36e4e6ed8 Automatically generated installer lang files 2013-05-22 08:26:06 +00:00
Eloy Lafuente (stronk7) 748524f1b6 MDL-36482 Fix slipped error, thanks Petr! 2013-05-22 04:13:28 +02:00
Eloy Lafuente (stronk7) f23331836d Merge branch 'wip-MDL-39177-m23' of git://github.com/marinaglancy/moodle into MOODLE_23_STABLE 2013-05-22 02:13:27 +02:00
Gilles-Philippe Leblanc 96b821e126 MDL-38239 gradebook: Importing grades from a .txt file with commas for decimals causes an error 2013-05-21 14:18:35 -04:00
Marina Glancy 6d5bcdebf1 MDL-39177 Updating userid when file is overwritten 2013-05-21 10:57:44 +10:00
Eloy Lafuente (stronk7) 5724b42c03 Merge branch 'MDL-36482_23' of https://github.com/mr-russ/moodle into MOODLE_23_STABLE 2013-05-21 02:28:34 +02:00
Eloy Lafuente (stronk7) 0a18bd17cc Merge branch 'MDL-26120_23' of https://github.com/jacks92/moodle into MOODLE_23_STABLE 2013-05-21 00:55:42 +02:00
Eloy Lafuente (stronk7) 1b0528adf0 Merge branch 'MDL-31209-23' of git://github.com/mouneyrac/moodle into MOODLE_23_STABLE 2013-05-20 19:05:59 +02:00
Ruslan Kabalin 7e8514c5fd MDL-39761: mod_assign: Always check submission plugin status and visibility. 2013-05-20 16:39:57 +01:00
Damyon Wiese 95f982b0ac MDL-39412 Prevent developer warnings on upgrade from 24 to master 2013-05-20 12:42:52 +01:00
Tim Hunt 342dc2025c MDL-39412 disabling manual graded behaviour refinements
1. Change behaviour admin settings so you can only select enabled
behaviours.
2. During the upgrade, change admin settings that might be currently set
to manual graded, so that instead they are set to deferredfeedback (if
that is available. If not, we just take the first alphabetically.)
2013-05-20 12:42:19 +01:00
Tim Hunt 612dc9f648 MDL-39412 question behaviours: hide manual graded option
The ability to set all your quiz questions to require manual grading is
an interesting possibility, but practically almost useless.

If you set that accidentally, then you are badly stuck. There is no way
to fix it after the students have answered the quiz.

Therefore, we should set the config option to hide that option from the
UI. We do this for all Moodle sites as part of the upgrade, not just for
new installs.

If any admin wants to re-enable this, they can later.
2013-05-20 12:26:05 +01:00
Petr Škoda 98a0a2faaa MDL-39374 log only real folder edits
Credit goes to Florian Zillner, thanks.
2013-05-20 17:59:04 +08:00
Dan Poltawski 2b6e9bd10a Merge branch 'MDL-35859_idnumber_23' of https://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2013-05-20 16:39:12 +08:00
Dan Poltawski 2d0669e775 Merge branch 'MDL-27748_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-05-20 15:49:09 +08:00
Dan Poltawski aaea60dea0 Merge branch 'MDL-39728_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-05-20 15:29:21 +08:00
Troy Lee 4126c81e32 MDL-36020 overview/report: fix quiz regrade session lock 2013-05-20 12:42:55 +08:00
Damyon Wiese 166e25fec7 Merge branch 'MDL-39363-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2013-05-20 12:17:19 +08:00
Kordan edcb7a0bc6 MDL-39198 theme_formal_white: resized and relocated the "Add..." drop down menu of the "Add a block" pseudo block 2013-05-20 11:49:24 +08:00
Dan Poltawski aa108f6125 Merge branch 'MDL-38369-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2013-05-20 10:26:14 +08:00
Tim Hunt 7f943085cd MDL-27748 question: grade options should be localised.
question_bank::fraction_options should use format_float to display
decimal pionts correctly.
2013-05-19 23:46:20 +01:00
Tim Hunt 8210b61ff7 MDL-39728 List all the classes in question/type/questionbase.php
This should make it easier for people to understand the type hierarchy.
2013-05-18 09:25:39 +01:00
AMOS bot 1318bf1bff Automatically generated installer lang files 2013-05-18 00:41:38 +00:00
Damyon Wiese d981c4b0fa Merge branch 'MDL-28250-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2013-05-17 12:12:01 +08:00
Petr Škoda cb3ab31fde MDL-39678 fix YUI 20130515 vulnerability 2013-05-15 22:03:50 +02:00
Dan Poltawski 6062d3f0bc MDL-28250 license: upgrade old versions of cc-nc
The url was incorectly defined in previous versions

Conflicts:
	version.php
    lib/db/upgrade.php
2013-05-15 11:28:02 +01:00
Wojciech Galiszek 81fe100cf8 MDL-28250 license: Correct cc-nc url 2013-05-15 11:26:44 +01:00
AMOS bot 23dc9305c7 Automatically generated installer lang files 2013-05-15 00:39:26 +00:00
Frederic Massart d35705102c MDL-39667 repository: Correct check for uniqueness of the name 2013-05-14 16:30:10 +08:00
Jerome Mouneyrac ad28e1b6a3 MDL-31209 web service error message: Indication about the service not containg the web service function is confusing 2013-05-14 15:47:56 +08:00
Marina Glancy 239eb7e230 MDL-39177 More comments about confusing files.source field 2013-05-14 17:07:55 +10:00
Marina Glancy 10fcc48782 MDL-39177 Ensure files are overwritten correctly on unzip 2013-05-14 17:07:54 +10:00
Marina Glancy 02890b991a MDL-39177 Perform all checks on draftfile area before saving the files 2013-05-14 17:07:54 +10:00
Marina Glancy 7627b9999c MDL-39177 Remove code duplication 2013-05-14 17:07:54 +10:00
Marina Glancy 77947f22ff MDL-39177 Update file in filearea only if original is present
Now when file was deleted in filemanager and new file with the same file was uploaded the references will be converted to copies exactly like UI warns in filemanager.
Also do not delete original information from draftfiles.
2013-05-14 17:07:54 +10:00
Marina Glancy 832db2f18f MDL-39177 Discard file origin when moving/renaming a file in filemanager
Created one function that handles file update to be used from both JS and nonJS filepicker
2013-05-14 17:07:54 +10:00
Marina Glancy ae55874269 MDL-39177 Original info is not preserved when overwriting a file in filemanager
original file location is used by filemanager to indicate that file is a source of reference and file the list of referencing files
2013-05-14 17:07:53 +10:00
Marina Glancy 73c6550ddb MDL-39177 File reference is not updated when overwriting the file 2013-05-14 17:07:53 +10:00
Marina Glancy 93cbd15ec8 MDL-33719 When overwriting a file the filemanager is not refreshed 2013-05-14 17:03:41 +10:00
AMOS bot fb46297f52 Automatically generated installer lang files 2013-05-14 00:37:47 +00:00
Frederic Massart 63e314128b MDL-39640 repository: Prevent notice when editing an instance 2013-05-13 17:31:12 +08:00
Ankit Agarwal 56e69c6188 MDL-39363 scorm: Accept 0 as a valid score 2013-05-13 11:48:54 +08:00
Andrew Davis 6250057612 MDL-35859 core_grade:fixed an optional parameter call to use the array version 2013-05-13 09:53:32 +08:00
Russell Smith 9dc1f6856e MDL-36482 activities block: Allow mod display without intro's 2013-05-09 10:00:34 +10:00
Jayesh Anandani 926e6170ce MDL-26120_23 mod_forum: use correct object 2013-05-09 00:52:41 +05:30
Albert Gasset ec6ca49767 MDL-39487 mod/assign: fixed ID number of grade item changing 2013-05-03 11:07:56 +02:00
Frederic Massart 2d1fd9e244 MDL-38369 repository: Remove output before redirect 2013-05-02 12:03:38 +08:00
Justin Filip 9a6230c822 MDL-39166 auth_ldap Add triggers for user created/updated events. 2013-04-24 16:16:28 -04:00
161 changed files with 2931 additions and 779 deletions
+91
View File
@@ -0,0 +1,91 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This script fixed incorrectly deleted users.
*
* @package core
* @subpackage cli
* @copyright 2013 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');
// Now get cli options.
list($options, $unrecognized) = cli_get_params(array('help'=>false),
array('h'=>'help'));
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
if ($options['help']) {
$help =
"Fix incorrectly deleted users.
This scripts detects users that are marked as deleted instead
of calling delete_user().
Deleted users do not have original username, idnumber or email,
we must also delete all roles, enrolments, group memberships, etc.
Please note this script does not delete any public information
such as forum posts.
Options:
-h, --help Print out this help
Example:
\$sudo -u www-data /usr/bin/php admin/cli/fix_deleted_users.php
";
echo $help;
die;
}
cli_heading('Looking for sloppy user deletes');
// Look for sloppy deleted users where somebody only flipped the deleted flag.
$sql = "SELECT *
FROM {user}
WHERE deleted = 1 AND email LIKE '%@%' AND username NOT LIKE '%@%'";
$rs = $DB->get_recordset_sql($sql);
foreach ($rs as $user) {
echo "Redeleting user $user->id: $user->username ($user->email)\n";
delete_user($user);
}
cli_heading('Deleting all leftovers');
$DB->set_field('user', 'idnumber', '', array('deleted'=>1));
$DB->delete_records_select('role_assignments', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('cohort_members', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('groups_members', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('user_enrolments', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('user_preferences', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('user_info_data', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('user_lastaccess', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('external_tokens', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
$DB->delete_records_select('external_services_users', "userid IN (SELECT id FROM {user} WHERE deleted = 1)");
exit(0);
+113
View File
@@ -892,4 +892,117 @@
</PHP_SETTING>
</PHP_SETTINGS>
</MOODLE>
<MOODLE version="2.6" requires="2.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mysql" version="5.1.33" />
<VENDOR name="postgres" version="8.3" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.3.3" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
<FEEDBACK>
<ON_CHECK message="opensslrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="optional">
<FEEDBACK>
<ON_CHECK message="intlrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="64M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="safe_mode" value="0" level="optional">
<FEEDBACK>
<ON_CHECK message="settingsafemode" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+1 -1
View File
@@ -32,7 +32,7 @@ $lng = required_param('lng', PARAM_LANG);
$currentpage = optional_param('p', 0, PARAM_INT);
$translatorsubmitted = optional_param('translatorsubmitted', 0, PARAM_BOOL);
$PAGE->set_pagelayout('standard');
$PAGE->set_pagelayout('report'); // Allows for wide page contents.
$PAGE->set_url('/admin/tool/customlang/edit.php', array('lng' => $lng));
navigation_node::override_active_url(new moodle_url('/admin/tool/customlang/index.php'));
$PAGE->set_title(get_string('pluginname', 'tool_customlang'));
+12
View File
@@ -549,6 +549,8 @@ class auth_plugin_ldap extends auth_plugin_base {
if ($user->firstaccess == 0) {
$DB->set_field('user', 'firstaccess', time(), array('id'=>$user->id));
}
$euser = $DB->get_record('user', array('id' => $user->id));
events_trigger('user_updated', $euser);
return AUTH_CONFIRM_OK;
}
} else {
@@ -710,6 +712,8 @@ class auth_plugin_ldap extends auth_plugin_base {
$updateuser->auth = 'nologin';
$DB->update_record('user', $updateuser);
echo "\t"; print_string('auth_dbsuspenduser', 'auth_db', array('name'=>$user->username, 'id'=>$user->id)); echo "\n";
$euser = $DB->get_record('user', array('id' => $user->id));
events_trigger('user_updated', $euser);
}
}
} else {
@@ -735,6 +739,8 @@ class auth_plugin_ldap extends auth_plugin_base {
$updateuser->auth = $this->authtype;
$DB->update_record('user', $updateuser);
echo "\t"; print_string('auth_dbreviveduser', 'auth_db', array('name'=>$user->username, 'id'=>$user->id)); echo "\n";
$euser = $DB->get_record('user', array('id' => $user->id));
events_trigger('user_updated', $euser);
}
} else {
print_string('nouserentriestorevive', 'auth_ldap');
@@ -848,6 +854,8 @@ class auth_plugin_ldap extends auth_plugin_base {
$id = $DB->insert_record('user', $user);
echo "\t"; print_string('auth_dbinsertuser', 'auth_db', array('name'=>$user->username, 'id'=>$id)); echo "\n";
$euser = $DB->get_record('user', array('id' => $user->id));
events_trigger('user_created', $euser);
if (!empty($this->config->forcechangepassword)) {
set_user_preference('auth_forcepasswordchange', 1, $id);
}
@@ -918,6 +926,10 @@ class auth_plugin_ldap extends auth_plugin_base {
}
}
}
if (!empty($updatekeys)) {
$euser = $DB->get_record('user', array('id' => $userid));
events_trigger('user_updated', $euser);
}
} else {
return false;
}
+7 -3
View File
@@ -1209,12 +1209,16 @@ class moodle1_file_manager implements loggable {
*/
public function migrate_file($sourcepath, $filepath = '/', $filename = null, $sortorder = 0, $timecreated = null, $timemodified = null) {
$sourcefullpath = $this->basepath.'/'.$sourcepath;
// Normalise Windows paths a bit.
$sourcepath = str_replace('\\', '/', $sourcepath);
if ($sourcefullpath !== clean_param($sourcefullpath, PARAM_PATH)) {
throw new moodle1_convert_exception('file_invalid_path', $sourcefullpath);
// PARAM_PATH must not be used on full OS path!
if ($sourcepath !== clean_param($sourcepath, PARAM_PATH)) {
throw new moodle1_convert_exception('file_invalid_path', $sourcepath);
}
$sourcefullpath = $this->basepath.'/'.$sourcepath;
if (!is_readable($sourcefullpath)) {
throw new moodle1_convert_exception('file_not_readable', $sourcefullpath);
}
@@ -143,6 +143,9 @@ class restore_final_task extends restore_task {
$rules[] = new restore_log_rule('course', 'report stats', 'report/stats/index.php?id={course}', '{course}');
$rules[] = new restore_log_rule('course', 'view section', 'view.php?id={course}&sectionid={course_section}', '{course_section}');
// module 'grade' rules
$rules[] = new restore_log_rule('grade', 'update', 'report/grader/index.php?id={course}', null);
// module 'user' rules
$rules[] = new restore_log_rule('user', 'view', 'view.php?id={user}&course={course}', '{user}');
$rules[] = new restore_log_rule('user', 'change password', 'view.php?id={user}&course={course}', '{user}');
@@ -26,101 +26,6 @@ defined('MOODLE_INTERNAL') || die();
// Include all the needed stuff
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
/**
* Restore dbops tests (all).
*/
class restore_dbops_testcase extends advanced_testcase {
/**
* Verify the xxx_ids_cached (in-memory backup_ids cache) stuff works as expected.
*
* Note that those private implementations are tested here by using the public
* backup_ids API and later performing low-level tests.
*/
public function test_backup_ids_cached() {
global $DB;
$dbman = $DB->get_manager(); // We are going to use database_manager services.
$this->resetAfterTest(true); // Playing with temp tables, better reset once finished.
// Some variables and objects for testing.
$restoreid = 'testrestoreid';
$mapping = new stdClass();
$mapping->itemname = 'user';
$mapping->itemid = 1;
$mapping->newitemid = 2;
$mapping->parentitemid = 3;
$mapping->info = 'info';
// Create the backup_ids temp tables used by restore.
restore_controller_dbops::create_restore_temp_tables($restoreid);
// Send one mapping using the public api with defaults.
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
// Get that mapping and verify everything is returned as expected.
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame(0, $result->newitemid);
$this->assertSame(null, $result->parentitemid);
$this->assertSame(null, $result->info);
// Drop the backup_xxx_temp temptables manually, so memory cache won't be invalidated.
$dbman->drop_table(new xmldb_table('backup_ids_temp'));
$dbman->drop_table(new xmldb_table('backup_files_temp'));
// Verify the mapping continues returning the same info,
// now from cache (the table does not exist).
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame(0, $result->newitemid);
$this->assertSame(null, $result->parentitemid);
$this->assertSame(null, $result->info);
// Recreate the temp table, just to drop it using the restore API in
// order to check that, then, the cache becomes invalid for the same request.
restore_controller_dbops::create_restore_temp_tables($restoreid);
restore_controller_dbops::drop_restore_temp_tables($restoreid);
// No cached info anymore, so the mapping request will arrive to
// DB leading to error (temp table does not exist).
try {
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->fail('Expecting an exception, none occurred');
} catch (Exception $e) {
$this->assertTrue($e instanceof dml_exception);
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
}
// Create the backup_ids temp tables once more.
restore_controller_dbops::create_restore_temp_tables($restoreid);
// Send one mapping using the public api with complete values.
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid,
$mapping->newitemid, $mapping->parentitemid, $mapping->info);
// Get that mapping and verify everything is returned as expected.
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame($mapping->newitemid, $result->newitemid);
$this->assertSame($mapping->parentitemid, $result->parentitemid);
$this->assertSame($mapping->info, $result->info);
// Finally, drop the temp tables properly and get the DB error again (memory caches empty).
restore_controller_dbops::drop_restore_temp_tables($restoreid);
try {
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->fail('Expecting an exception, none occurred');
} catch (Exception $e) {
$this->assertTrue($e instanceof dml_exception);
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
}
}
}
/**
* Backup dbops tests (all).
@@ -0,0 +1,122 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* @package core_backup
* @category phpunit
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
// Include all the needed stuff
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
/**
* Restore dbops tests (all).
*/
class restore_dbops_testcase extends advanced_testcase {
/**
* Verify the xxx_ids_cached (in-memory backup_ids cache) stuff works as expected.
*
* Note that those private implementations are tested here by using the public
* backup_ids API and later performing low-level tests.
*/
public function test_backup_ids_cached() {
global $DB;
$dbman = $DB->get_manager(); // We are going to use database_manager services.
$this->resetAfterTest(true); // Playing with temp tables, better reset once finished.
// Some variables and objects for testing.
$restoreid = 'testrestoreid';
$mapping = new stdClass();
$mapping->itemname = 'user';
$mapping->itemid = 1;
$mapping->newitemid = 2;
$mapping->parentitemid = 3;
$mapping->info = 'info';
// Create the backup_ids temp tables used by restore.
restore_controller_dbops::create_restore_temp_tables($restoreid);
// Send one mapping using the public api with defaults.
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
// Get that mapping and verify everything is returned as expected.
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame(0, $result->newitemid);
$this->assertSame(null, $result->parentitemid);
$this->assertSame(null, $result->info);
// Drop the backup_xxx_temp temptables manually, so memory cache won't be invalidated.
$dbman->drop_table(new xmldb_table('backup_ids_temp'));
$dbman->drop_table(new xmldb_table('backup_files_temp'));
// Verify the mapping continues returning the same info,
// now from cache (the table does not exist).
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame(0, $result->newitemid);
$this->assertSame(null, $result->parentitemid);
$this->assertSame(null, $result->info);
// Recreate the temp table, just to drop it using the restore API in
// order to check that, then, the cache becomes invalid for the same request.
restore_controller_dbops::create_restore_temp_tables($restoreid);
restore_controller_dbops::drop_restore_temp_tables($restoreid);
// No cached info anymore, so the mapping request will arrive to
// DB leading to error (temp table does not exist).
try {
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->fail('Expecting an exception, none occurred');
} catch (Exception $e) {
$this->assertTrue($e instanceof dml_exception);
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
}
// Create the backup_ids temp tables once more.
restore_controller_dbops::create_restore_temp_tables($restoreid);
// Send one mapping using the public api with complete values.
restore_dbops::set_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid,
$mapping->newitemid, $mapping->parentitemid, $mapping->info);
// Get that mapping and verify everything is returned as expected.
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->assertSame($mapping->itemname, $result->itemname);
$this->assertSame($mapping->itemid, $result->itemid);
$this->assertSame($mapping->newitemid, $result->newitemid);
$this->assertSame($mapping->parentitemid, $result->parentitemid);
$this->assertSame($mapping->info, $result->info);
// Finally, drop the temp tables properly and get the DB error again (memory caches empty).
restore_controller_dbops::drop_restore_temp_tables($restoreid);
try {
$result = restore_dbops::get_backup_ids_record($restoreid, $mapping->itemname, $mapping->itemid);
$this->fail('Expecting an exception, none occurred');
} catch (Exception $e) {
$this->assertTrue($e instanceof dml_exception);
$this->assertSame('Table "backup_ids_temp" does not exist', $e->getMessage());
}
}
}
+1 -1
View File
@@ -329,7 +329,7 @@ class block_base {
/**
* Subclasses should override this and return true if the
* subclass block has a config_global.html file.
* subclass block has a settings.php file.
*
* @return boolean
*/
+5 -1
View File
@@ -340,11 +340,15 @@ BRANCH.prototype = {
},
/**
* Attaches required events to the branch structure.
*
* @chainable
* @method wire
* @return {BRANCH} This function is chainable, it always returns itself.
*/
wire : function() {
this.node = this.node || Y.one('#'+this.get('id'));
if (!this.node) {
return false;
return this;
}
if (this.get('expandable')) {
this.event_ajaxload = this.node.on('ajaxload|click', this.ajaxLoad, this);
+2 -1
View File
@@ -77,6 +77,7 @@ $search .= html_writer::start_tag('div');
$search .= html_writer::label(get_string('searchcohort', 'cohort').':', 'cohort_search_q');
$search .= html_writer::empty_tag('input', array('id'=>'cohort_search_q', 'type'=>'text', 'name'=>'search', 'value'=>$searchquery));
$search .= html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('search', 'cohort')));
$search .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'contextid', 'value'=>$contextid));
$search .= html_writer::end_tag('div');
$search .= html_writer::end_tag('form');
echo $search;
@@ -137,4 +138,4 @@ if ($manager) {
echo $OUTPUT->single_button(new moodle_url('/cohort/edit.php', array('contextid'=>$context->id)), get_string('add'));
}
echo $OUTPUT->footer();
echo $OUTPUT->footer();
+10 -1
View File
@@ -130,6 +130,15 @@ class course_edit_form extends moodleform {
if (!isset($max) || !is_numeric($max)) {
$max = 52;
}
// Increase the number of sections combo box values if the user has increased the number of sections
// using the icon on the course page beyond course 'maxsections' or course 'maxsections' has been
// reduced below the number of sections already set for the course on the site administration course
// defaults page. This is so that the number of sections is not reduced leaving unintended orphaned
// activities / resources.
if (isset($course->numsections) && $course->numsections > $max) {
$max = $course->numsections;
}
for ($i = 0; $i <= $max; $i++) {
$sectionmenu[$i] = "$i";
}
@@ -201,7 +210,7 @@ class course_edit_form extends moodleform {
enrol_course_edit_form($mform, $course, $context);
//--------------------------------------------------------------------------------
$mform->addElement('header','', get_string('groups', 'group'));
$mform->addElement('header', '', get_string('groupsettingsheader', 'group'));
$choices = array();
$choices[NOGROUPS] = get_string('groupsnone', 'group');
+4 -4
View File
@@ -678,9 +678,9 @@ class core_course_external extends external_api {
"users" (int) Include users (default to 0 that is equal to no),
"role_assignments" (int) Include role assignments (default to 0 that is equal to no),
"comments" (int) Include user comments (default to 0 that is equal to no),
"completion_information" (int) Include user course completion information (default to 0 that is equal to no),
"userscompletion" (int) Include user course completion information (default to 0 that is equal to no),
"logs" (int) Include course logs (default to 0 that is equal to no),
"histories" (int) Include histories (default to 0 that is equal to no)'
"grade_histories" (int) Include histories (default to 0 that is equal to no)'
),
'value' => new external_value(PARAM_RAW, 'the value for the option 1 (yes) or 0 (no)'
)
@@ -742,9 +742,9 @@ class core_course_external extends external_api {
'users' => 0,
'role_assignments' => 0,
'comments' => 0,
'completion_information' => 0,
'userscompletion' => 0,
'logs' => 0,
'histories' => 0
'grade_histories' => 0
);
$backupsettings = array();
+8
View File
@@ -42,6 +42,14 @@ M.course.format.swap_sections = function(Y, node1, node2) {
var sectionlist = Y.Node.all('.'+CSS.COURSECONTENT+' '+M.course.format.get_section_selector(Y));
// Swap menus.
sectionlist.item(node1).one('.'+CSS.SECTIONADDMENUS).swap(sectionlist.item(node2).one('.'+CSS.SECTIONADDMENUS));
if (sectionlist.item(node1).hasClass('current')) {
sectionlist.item(node1).removeClass('current');
sectionlist.item(node2).addClass('current');
} else if (sectionlist.item(node2).hasClass('current')) {
sectionlist.item(node2).removeClass('current');
sectionlist.item(node1).addClass('current');
}
}
/**
+3
View File
@@ -94,6 +94,9 @@ function make_log_url($module, $url) {
case 'role':
$url = '/'.$url;
break;
case 'grade':
$url = "/grade/$url";
break;
default:
$url = "/mod/$module/$url";
break;
+13 -5
View File
@@ -87,7 +87,11 @@ foreach ($modinfo->cms as $cm) {
// preload instances
foreach ($resources as $modname=>$instances) {
$resources[$modname] = $DB->get_records_list($modname, 'id', $instances, 'id', 'id,name,intro,introformat,timemodified');
$additionalfields = '';
if (plugin_supports('mod', $modname, FEATURE_MOD_INTRO)) {
$additionalfields = ',intro,introformat';
}
$resources[$modname] = $DB->get_records_list($modname, 'id', $instances, 'id', 'id,name'.$additionalfields);
}
if (!$cms) {
@@ -112,8 +116,8 @@ foreach ($cms as $cm) {
continue;
}
$resource = $resources[$cm->modname][$cm->instance];
$printsection = '';
if ($usesections) {
$printsection = '';
if ($cm->sectionnum !== $currentsection) {
if ($cm->sectionnum) {
$printsection = get_section_name($course, $sections[$cm->sectionnum]);
@@ -123,8 +127,6 @@ foreach ($cms as $cm) {
}
$currentsection = $cm->sectionnum;
}
} else {
$printsection = '<span class="smallinfo">'.userdate($resource->timemodified)."</span>";
}
$extra = empty($cm->extra) ? '' : $cm->extra;
@@ -134,11 +136,17 @@ foreach ($cms as $cm) {
$icon = '<img src="'.$OUTPUT->pix_url('icon', $cm->modname).'" class="activityicon" alt="'.get_string('modulename', $cm->modname).'" /> ';
}
if (isset($resource->intro) && isset($resource->introformat)) {
$intro = format_module_intro('resource', $resource, $cm->id);
} else {
$intro = '';
}
$class = $cm->visible ? '' : 'class="dimmed"'; // hidden modules are dimmed
$table->data[] = array (
$printsection,
"<a $class $extra href=\"$CFG->wwwroot/mod/$cm->modname/view.php?id=$cm->id\">".$icon.format_string($resource->name)."</a>",
format_module_intro('resource', $resource, $cm->id));
$intro);
}
echo html_writer::table($table);
+5
View File
@@ -124,7 +124,12 @@
$PAGE->set_pagelayout('course');
$PAGE->set_pagetype('course-view-' . $course->format);
$PAGE->set_other_editing_capability('moodle/course:update');
$PAGE->set_other_editing_capability('moodle/course:manageactivities');
$PAGE->set_other_editing_capability('moodle/course:activityvisibility');
if (course_format_uses_sections($course->format)) {
$PAGE->set_other_editing_capability('moodle/course:sectionvisibility');
}
if ($reset_user_allowed_editing) {
// ugly hack
+16 -8
View File
@@ -514,13 +514,19 @@ function process_person_tag($tagcontents){
// Now if the recstatus is 3, we should delete the user if-and-only-if the setting for delete users is turned on
// In the "users" table we can do this by setting deleted=1
if($recstatus==3){
if($imsdeleteusers){ // If we're allowed to delete user records
// Make sure their "deleted" field is set to one
$DB->set_field('user', 'deleted', 1, array('username'=>$person->username));
$this->log_line("Marked user record for user '$person->username' (ID number $person->idnumber) as deleted.");
// Do not dare to hack the user.deleted field directly in database!!!
if ($user = $DB->get_record('user', array('username'=>$person->username, 'mnethostid'=>$CFG->mnet_localhost_id, 'deleted'=>0))) {
if (delete_user($user)) {
$this->log_line("Deleted user '$person->username' (ID number $person->idnumber).");
} else {
$this->log_line("Error deleting '$person->username' (ID number $person->idnumber).");
}
} else {
$this->log_line("Can not delete user '$person->username' (ID number $person->idnumber) - user does not exist.");
}
}else{
$this->log_line("Ignoring deletion request for user '$person->username' (ID number $person->idnumber).");
}
@@ -539,8 +545,10 @@ function process_person_tag($tagcontents){
} else {
// If they don't exist and they have a defined username, and $createnewusers == true, we create them.
$person->lang = 'manual'; //TODO: this needs more work due tu multiauth changes
$person->auth = $CFG->auth;
$person->lang = $CFG->lang;
$auth = explode(',', $CFG->auth); //TODO: this needs more work due tu multiauth changes, use first auth for now
$auth = reset($auth);
$person->auth = $auth;
$person->confirmed = 1;
$person->timemodified = time();
$person->mnethostid = $CFG->mnet_localhost_id;
@@ -568,8 +576,8 @@ function process_person_tag($tagcontents){
} elseif ($createnewusers) {
$this->log_line("User record already exists for user '$person->username' (ID number $person->idnumber).");
// Make sure their "deleted" field is set to zero.
$DB->set_field('user', 'deleted', 0, array('idnumber'=>$person->idnumber));
// It is totally wrong to mess with deleted users flag directly in database!!!
// There is no official way to undelete user, sorry..
}else{
$this->log_line("No user record found for '$person->username' (ID number $person->idnumber).");
}
+5 -7
View File
@@ -93,15 +93,13 @@ class enrol_paypal_edit_form extends moodleform {
list($instance, $plugin, $context) = $this->_customdata;
if ($data['status'] == ENROL_INSTANCE_ENABLED) {
if (!empty($data['enrolenddate']) and $data['enrolenddate'] < $data['enrolstartdate']) {
$errors['enrolenddate'] = get_string('enrolenddaterror', 'enrol_paypal');
}
if (!empty($data['enrolenddate']) and $data['enrolenddate'] < $data['enrolstartdate']) {
$errors['enrolenddate'] = get_string('enrolenddaterror', 'enrol_paypal');
}
if (!is_numeric($data['cost'])) {
$errors['cost'] = get_string('costerror', 'enrol_paypal');
if (!is_numeric($data['cost'])) {
$errors['cost'] = get_string('costerror', 'enrol_paypal');
}
}
return $errors;
+127
View File
@@ -0,0 +1,127 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* PHPunit tests for external files API.
*
* @package core_files
* @category external
* @copyright 2013 Ankit Agarwal
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @since Moodle 2.6
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/webservice/tests/helpers.php');
require_once($CFG->dirroot . '/files/externallib.php');
class test_external_files extends advanced_testcase {
/*
* Test core_files_external::upload().
*/
public function test_upload() {
global $USER;
$this->resetAfterTest();
$this->setAdminUser();
$context = context_user::instance($USER->id);
$contextid = $context->id;
$component = "user";
$filearea = "private";
$itemid = 0;
$filepath = "/";
$filename = "Simple.txt";
$filecontent = base64_encode("Let us create a nice simple file");
$browser = get_file_browser();
// Make sure no file exists.
$file = $browser->get_file_info($context, $component, $filearea, $itemid, $filepath, $filename);
$this->assertEmpty($file);
// Call the api to create a file.
core_files_external::upload($contextid, $component, $filearea, $itemid, $filepath, $filename, $filecontent);
// Make sure the file was created.
$file = $browser->get_file_info($context, $component, $filearea, $itemid, $filepath, $filename);
$this->assertNotEmpty($file);
// Make sure no file exists.
$itemid = 2;
$filename = "Simple2.txt";
$file = $browser->get_file_info($context, $component, $filearea, $itemid, $filepath, $filename);
$this->assertEmpty($file);
// Call the api to create a file.
$fileinfo = core_files_external::upload($contextid, $component, $filearea, $itemid, $filepath, $filename, $filecontent);
// Make sure itemid is always set to 0.
$this->assertEquals(0, $fileinfo['itemid']);
// Make sure the same file cannot be created again.
$this->setExpectedException("moodle_exception");
core_files_external::upload($contextid, $component, $filearea, $itemid, $filepath, $filename, $filecontent);
}
/*
* Make sure only user component is allowed in core_files_external::upload().
*/
public function test_upload_param_component() {
global $USER;
$this->resetAfterTest();
$this->setAdminUser();
$context = context_user::instance($USER->id);
$contextid = $context->id;
$component = "backup";
$filearea = "private";
$itemid = 0;
$filepath = "/";
$filename = "Simple3.txt";
$filecontent = base64_encode("Let us create a nice simple file");
// Make sure exception is thrown.
$this->setExpectedException("coding_exception");
core_files_external::upload($contextid, $component, $filearea, $itemid, $filepath, $filename, $filecontent);
}
/*
* Make sure only private area is allowed in core_files_external::upload().
*/
public function test_upload_param_area() {
global $USER;
$this->resetAfterTest();
$this->setAdminUser();
$context = context_user::instance($USER->id);
$contextid = $context->id;
$component = "user";
$filearea = "draft";
$itemid = 0;
$filepath = "/";
$filename = "Simple4.txt";
$filecontent = base64_encode("Let us create a nice simple file");
// Make sure exception is thrown.
$this->setExpectedException("coding_exception");
core_files_external::upload($contextid, $component, $filearea, $itemid, $filepath, $filename, $filecontent);
}
}
+17 -11
View File
@@ -122,19 +122,25 @@ class filter_urltolink extends moodle_text_filter {
$unicoderegexp = @preg_match('/\pL/u', 'a'); // This will fail silently, returning false,
}
//todo: MDL-21296 - use of unicode modifiers may cause a timeout
if ($unicoderegexp) { //We can use unicode modifiers
$text = preg_replace('#(?<!=["\'])(((http(s?))://)(((([\pLl0-9]([\pLl0-9]|-)*[\pLl0-9]|[\pLl0-9])\.)+([\pLl]([\pLl0-9]|-)*[\pLl0-9]|[\pLl]))|(([0-9]{1,3}\.){3}[0-9]{1,3}))(:[\pL0-9]*)?(/([\pLl0-9\.!$&\'\(\)*+,;=_~:@-]|%[a-fA-F0-9]{2})*)*(\?([\pLl0-9\.!$&\'\(\)*+,;=_~:@/?-]|%[a-fA-F0-9]{2})*)?(\#[\pLl0-9\.!$&\'\(\)*+,;=_~:@/?-]*)?)(?<![,.;])#iu',
'<a href="\\1" class="_blanktarget">\\1</a>', $text);
$text = preg_replace('#(?<!=["\']|//)((www\.([\pLl0-9]([\pLl0-9]|-)*[\pLl0-9]|[\pLl0-9])\.)+([\pLl]([\pLl0-9]|-)*[\pLl0-9]|[\pLl])(:[\pL0-9]*)?(/([\pLl0-9\.!$&\'\(\)*+,;=_~:@-]|%[a-fA-F0-9]{2})*)*(\?([\pLl0-9\.!$&\'\(\)*+,;=_~:@/?-]|%[a-fA-F0-9]{2})*)?(\#[\pLl0-9\.!$&\'\(\)*+,;=_~:@/?-]*)?)(?<![,.;])#iu',
'<a href="http://\\1" class="_blanktarget">\\1</a>', $text);
} else { //We cannot use unicode modifiers
$text = preg_replace('#(?<!=["\'])(((http(s?))://)(((([a-z0-9]([a-z0-9]|-)*[a-z0-9]|[a-z0-9])\.)+([a-z]([a-z0-9]|-)*[a-z0-9]|[a-z]))|(([0-9]{1,3}\.){3}[0-9]{1,3}))(:[a-zA-Z0-9]*)?(/([a-z0-9\.!$&\'\(\)*+,;=_~:@-]|%[a-f0-9]{2})*)*(\?([a-z0-9\.!$&\'\(\)*+,;=_~:@/?-]|%[a-fA-F0-9]{2})*)?(\#[a-z0-9\.!$&\'\(\)*+,;=_~:@/?-]*)?)(?<![,.;])#i',
'<a href="\\1" class="_blanktarget">\\1</a>', $text);
$text = preg_replace('#(?<!=["\']|//)((www\.([a-z0-9]([a-z0-9]|-)*[a-z0-9]|[a-z0-9])\.)+([a-z]([a-z0-9]|-)*[a-z0-9]|[a-z])(:[a-zA-Z0-9]*)?(/([a-z0-9\.!$&\'\(\)*+,;=_~:@-]|%[a-f0-9]{2})*)*(\?([a-z0-9\.!$&\'\(\)*+,;=_~:@/?-]|%[a-fA-F0-9]{2})*)?(\#[a-z0-9\.!$&\'\(\)*+,;=_~:@/?-]*)?)(?<![,.;])#i',
'<a href="http://\\1" class="_blanktarget">\\1</a>', $text);
// TODO MDL-21296 - use of unicode modifiers may cause a timeout
$domainsegment = '(?:[\pLl0-9][\pLl0-9-]*[\pLl0-9]|[\pLl0-9])';
$numericip = '(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3})';
$port = '(?::\d*)';
$pathchar = '(?:[\pL0-9\.!$&\'\(\)*+,;=_~:@-]|%[a-f0-9]{2})';
$path = "(?:/$pathchar*)*";
$querystring = '(?:\?(?:[\pL0-9\.!$&\'\(\)*+,;=_~:@/?-]|%[a-fA-F0-9]{2})*)';
$fragment = '(?:\#(?:[\pL0-9\.!$&\'\(\)*+,;=_~:@/?-]|%[a-fA-F0-9]{2})*)';
$regex = "(?<!=[\"'])(?:http(s)?://|(www\.))((?:$domainsegment\.)+$domainsegment|$numericip)" .
"($port?$path$querystring?$fragment?)(?<![]),.;])";
if ($unicoderegexp) {
$regex = '#' . $regex . '#ui';
} else {
$regex = '#' . preg_replace(array('\pLl', '\PL'), 'a-z', $regex) . '#i';
}
$text = preg_replace($regex, '<a href="http$1://$2$3$4" class="_blanktarget">$0</a>', $text);
if (!empty($ignoretags)) {
$ignoretags = array_reverse($ignoretags); /// Reversed so "progressive" str_replace() will solve some nesting problems.
$text = str_replace(array_keys($ignoretags),$ignoretags,$text);
+36 -16
View File
@@ -44,7 +44,7 @@ class filter_urltolink_testcase extends basic_testcase {
'$1<a href="http://www.$2$3" target="_blank">www.$2$3</a>', $text);
}
function test_convert_urls_into_links() {
function get_convert_urls_into_links_test_cases() {
$texts = array (
//just a url
'http://moodle.org - URL' => '<a href="http://moodle.org" class="_blanktarget">http://moodle.org</a> - URL',
@@ -57,13 +57,26 @@ class filter_urltolink_testcase extends basic_testcase {
'URL: https://moodle.org/s/i=1&j=2' => 'URL: <a href="https://moodle.org/s/i=1&j=2" class="_blanktarget">https://moodle.org/s/i=1&j=2</a>',
//url with port and params
'URL: http://moodle.org:8080/s/i=1' => 'URL: <a href="http://moodle.org:8080/s/i=1" class="_blanktarget">http://moodle.org:8080/s/i=1</a>',
//url in brackets
// URL with complex fragment.
'Most voted issues: https://tracker.moodle.org/browse/MDL#selectedTab=com.atlassian.jira.plugin.system.project%3Apopularissues-panel' => 'Most voted issues: <a href="https://tracker.moodle.org/browse/MDL#selectedTab=com.atlassian.jira.plugin.system.project%3Apopularissues-panel" class="_blanktarget">https://tracker.moodle.org/browse/MDL#selectedTab=com.atlassian.jira.plugin.system.project%3Apopularissues-panel</a>',
// Domain with more parts
'URL: www.bbc.co.uk.' => 'URL: <a href="http://www.bbc.co.uk" class="_blanktarget">www.bbc.co.uk</a>.',
// URL in brackets.
'(http://moodle.org) - URL' => '(<a href="http://moodle.org" class="_blanktarget">http://moodle.org</a>) - URL',
'(www.moodle.org) - URL' => '(<a href="http://www.moodle.org" class="_blanktarget">www.moodle.org</a>) - URL',
//url in square brackets
// URL in brackets with a path.
'(http://example.com/index.html) - URL' => '(<a href="http://example.com/index.html" class="_blanktarget">http://example.com/index.html</a>) - URL',
'(www.example.com/index.html) - URL' => '(<a href="http://www.example.com/index.html" class="_blanktarget">www.example.com/index.html</a>) - URL',
// URL in brackets with anchor.
'(http://moodle.org/main#anchor) - URL' => '(<a href="http://moodle.org/main#anchor" class="_blanktarget">http://moodle.org/main#anchor</a>) - URL',
'(www.moodle.org/main#anchor) - URL' => '(<a href="http://www.moodle.org/main#anchor" class="_blanktarget">www.moodle.org/main#anchor</a>) - URL',
// URL in square brackets.
'[http://moodle.org] - URL' => '[<a href="http://moodle.org" class="_blanktarget">http://moodle.org</a>] - URL',
'[www.moodle.org] - URL' => '[<a href="http://www.moodle.org" class="_blanktarget">www.moodle.org</a>] - URL',
//url in brackets with anchor
// URL in square brackets with a path.
'[http://example.com/index.html] - URL' => '[<a href="http://example.com/index.html" class="_blanktarget">http://example.com/index.html</a>] - URL',
'[www.example.com/index.html] - URL' => '[<a href="http://www.example.com/index.html" class="_blanktarget">www.example.com/index.html</a>] - URL',
// URL in square brackets with anchor.
'[http://moodle.org/main#anchor] - URL' => '[<a href="http://moodle.org/main#anchor" class="_blanktarget">http://moodle.org/main#anchor</a>] - URL',
'[www.moodle.org/main#anchor] - URL' => '[<a href="http://www.moodle.org/main#anchor" class="_blanktarget">www.moodle.org/main#anchor</a>] - URL',
//brackets within the url
@@ -71,7 +84,8 @@ class filter_urltolink_testcase extends basic_testcase {
'URL: www.cc.org/url_(withpar)_go/?i=2' => 'URL: <a href="http://www.cc.org/url_(withpar)_go/?i=2" class="_blanktarget">www.cc.org/url_(withpar)_go/?i=2</a>',
'URL: http://cc.org/url_(with)_(par)_go/?i=2' => 'URL: <a href="http://cc.org/url_(with)_(par)_go/?i=2" class="_blanktarget">http://cc.org/url_(with)_(par)_go/?i=2</a>',
'URL: www.cc.org/url_(with)_(par)_go/?i=2' => 'URL: <a href="http://www.cc.org/url_(with)_(par)_go/?i=2" class="_blanktarget">www.cc.org/url_(with)_(par)_go/?i=2</a>',
'http://en.wikipedia.org/wiki/Slash_(punctuation)'=>'<a href="http://en.wikipedia.org/wiki/Slash_(punctuation)" class="_blanktarget">http://en.wikipedia.org/wiki/Slash_(punctuation)</a>',
// URL legitimately ending in a bracket. Commented out as part of MDL-22390. See next tests for work-arounds.
// 'http://en.wikipedia.org/wiki/Slash_(punctuation)'=>'<a href="http://en.wikipedia.org/wiki/Slash_(punctuation)" class="_blanktarget">http://en.wikipedia.org/wiki/Slash_(punctuation)</a>',
'http://en.wikipedia.org/wiki/%28#Parentheses_.28_.29 - URL' => '<a href="http://en.wikipedia.org/wiki/%28#Parentheses_.28_.29" class="_blanktarget">http://en.wikipedia.org/wiki/%28#Parentheses_.28_.29</a> - URL',
'http://en.wikipedia.org/wiki/(#Parentheses_.28_.29 - URL' => '<a href="http://en.wikipedia.org/wiki/(#Parentheses_.28_.29" class="_blanktarget">http://en.wikipedia.org/wiki/(#Parentheses_.28_.29</a> - URL',
//escaped brackets in url
@@ -94,8 +108,6 @@ class filter_urltolink_testcase extends basic_testcase {
'URL: www.moodle.org?u=1.23' => 'URL: <a href="http://www.moodle.org?u=1.23" class="_blanktarget">www.moodle.org?u=1.23</a>',
//escaped space in url
'URL: www.moodle.org?u=test+param&' => 'URL: <a href="http://www.moodle.org?u=test+param&" class="_blanktarget">www.moodle.org?u=test+param&</a>',
//odd characters in url param
'URL: www.moodle.org?param=:)' => 'URL: <a href="http://www.moodle.org?param=:)" class="_blanktarget">www.moodle.org?param=:)</a>',
//multiple urls
'URL: http://moodle.org www.moodle.org'
=> 'URL: <a href="http://moodle.org" class="_blanktarget">http://moodle.org</a> <a href="http://www.moodle.org" class="_blanktarget">www.moodle.org</a>',
@@ -151,17 +163,25 @@ class filter_urltolink_testcase extends basic_testcase {
//'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd">'=>'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd">'
);
$data = array();
foreach ($texts as $text => $correctresult) {
$data[] = array($text, $correctresult);
}
return $data;
}
/**
* @dataProvider get_convert_urls_into_links_test_cases
*/
function test_convert_urls_into_links($text, $correctresult) {
$testablefilter = new testable_filter_urltolink();
$testablefilter->convert_urls_into_links($text);
$this->assertEquals($correctresult, $text);
}
function test_convert_urls_into_links_performance() {
$testablefilter = new testable_filter_urltolink();
foreach ($texts as $text => $correctresult) {
$msg = "Testing text: ". str_replace('%', '%%', $text) . ": %s"; // Escape original '%' so sprintf() wont get confused
$testablefilter->convert_urls_into_links($text);
$this->assertEquals($text, $correctresult, $msg);
}
//performance testing
$reps = 1000;
$text = file_get_contents(__DIR__ . '/fixtures/sample.txt');
$time_start = microtime(true);
+1 -1
View File
@@ -30,7 +30,7 @@ require_once 'calculation_form.php';
$courseid = required_param('courseid', PARAM_INT);
$id = required_param('id', PARAM_INT);
$section = optional_param('section', 'calculation', PARAM_ALPHA);
$idnumbers = optional_param('idnumbers', null, PARAM_RAW);
$idnumbers = optional_param_array('idnumbers', null, PARAM_RAW);
$url = new moodle_url('/grade/edit/tree/calculation.php', array('id'=>$id, 'courseid'=>$courseid));
if ($section !== 'calculation') {
+25
View File
@@ -200,6 +200,18 @@ if ($mform->is_cancelled()) {
$data->feedback = $old_grade_grade->feedback;
$data->feedbackformat = $old_grade_grade->feedbackformat;
}
// Only log a grade override if they actually changed the student grade.
if ($data->finalgrade != $old_grade_grade->finalgrade) {
$url = '/report/grader/index.php?id=' . $course->id;
$user = $DB->get_record('user', array('id'=>$data->userid), '*', MUST_EXIST);
$fullname = fullname($user);
$info = "{$grade_item->itemname}: $fullname";
add_to_log($course->id, 'grade', 'update', $url, $info);
}
// update final grade or feedback
// when we set override grade the first time, it happens here
$grade_item->update_final_grade($data->userid, $data->finalgrade, 'editgrade', $data->feedback, $data->feedbackformat);
@@ -213,6 +225,19 @@ if ($mform->is_cancelled()) {
$data->overridden = 0; // checkbox unticked
}
$grade_grade->set_overridden($data->overridden);
if ($data->overridden == 0 && $data->overridden != $old_grade_grade->overridden) {
// Log removing an override.
// The addition of an override is logged above.
// One or the other will happen but never both.
$url = '/report/grader/index.php?id=' . $course->id;
$user = $DB->get_record('user', array('id'=>$data->userid), '*', MUST_EXIST);
$fullname = fullname($user);
$info = "{$grade_item->itemname}: $fullname";
add_to_log($course->id, 'grade', 'update', $url, $info);
}
}
if (has_capability('moodle/grade:manage', $context) or has_capability('moodle/grade:hide', $context)) {
+15 -10
View File
@@ -393,16 +393,21 @@ if ($formdata = $mform->get_data()) {
$newgrade->finalgrade = $value;
} else {
if ($value === '' or $value == '-') {
$value = null; // no grade
} else if (!is_numeric($value)) {
// non numeric grade value supplied, possibly mapped wrong column
echo "<br/>t0 is $t0";
echo "<br/>grade is $value";
$status = false;
import_cleanup($importcode);
echo $OUTPUT->notification(get_string('badgrade', 'grades'));
break 3;
$value = null; // No grade.
} else {
// If the value has a local decimal or can correctly be unformatted, do it.
$validvalue = unformat_float($value, true);
if ($validvalue !== false) {
$value = $validvalue;
} else {
// Non numeric grade value supplied, possibly mapped wrong column.
echo "<br/>t0 is $t0";
echo "<br/>grade is $value";
$status = false;
import_cleanup($importcode);
echo $OUTPUT->notification(get_string('badgrade', 'grades'));
break 3;
}
}
$newgrade->finalgrade = $value;
}
+8
View File
@@ -118,6 +118,14 @@ switch ($action) {
echo json_encode($json_object);
die();
} else {
$url = '/report/grader/index.php?id=' . $course->id;
$user = $DB->get_record('user', array('id'=>$userid), '*', MUST_EXIST);
$fullname = fullname($user);
$info = "{$grade_item->itemname}: $fullname";
add_to_log($course->id, 'grade', 'update', $url, $info);
$json_object->gradevalue = $finalvalue;
if ($grade_item->update_final_grade($userid, $finalgrade, 'gradebook', $feedback, FORMAT_MOODLE)) {
+6
View File
@@ -297,6 +297,12 @@ class grade_report_grader extends grade_report {
}
}
$url = '/report/grader/index.php?id=' . $this->course->id;
$fullname = fullname($this->users[$userid]);
$info = "{$gradeitem->itemname}: $fullname";
add_to_log($this->course->id, 'grade', 'update', $url, $info);
$gradeitem->update_final_grade($userid, $finalgrade, 'gradebook', $feedback, FORMAT_MOODLE);
// We can update feedback without reloading the grade item as it doesn't affect grade calculations
+3 -5
View File
@@ -56,14 +56,12 @@ $PAGE->set_url($url);
// Make sure that the user has permissions to manage groups.
require_login($course);
$context = get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('moodle/course:managegroups', $context);
$PAGE->requires->yui2_lib('connection');
$PAGE->requires->js('/group/clientlib.js');
$context = get_context_instance(CONTEXT_COURSE, $course->id);
if (!has_capability('moodle/course:managegroups', $context)) {
redirect('/course/view.php', array('id'=>$course->id)); // Not allowed to manage all groups
}
// Check for multiple/no group errors
if (!$singlegroup) {
switch($action) {
+4 -2
View File
@@ -40,6 +40,9 @@
}
$PAGE->set_url('/', $urlparams);
$PAGE->set_course($SITE);
$PAGE->set_other_editing_capability('moodle/course:update');
$PAGE->set_other_editing_capability('moodle/course:manageactivities');
$PAGE->set_other_editing_capability('moodle/course:activityvisibility');
// Prevent caching of this page to stop confusion when changing page after making AJAX changes
$PAGE->set_cacheable(false);
@@ -89,7 +92,6 @@
}
$PAGE->set_pagetype('site-index');
$PAGE->set_other_editing_capability('moodle/course:manageactivities');
$PAGE->set_docs_path('');
$PAGE->set_pagelayout('frontpage');
$editing = $PAGE->user_is_editing();
@@ -136,7 +138,7 @@
echo format_text($summarytext, $section->summaryformat, $summaryformatoptions);
if ($editing) {
if ($editing && has_capability('moodle/course:update', $context)) {
$streditsummary = get_string('editsummary');
echo "<a title=\"$streditsummary\" ".
" href=\"course/editsection.php?id=$section->id\"><img src=\"" . $OUTPUT->pix_url('t/edit') . "\" ".
+48
View File
@@ -0,0 +1,48 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatelangdir'] = 'lang ডিরেক্টরি তৈরি করতে পারে না';
$string['cannotcreatetempdir'] = 'টেম্প ডিরেক্টরি তৈরি করতে পারে না';
$string['cannotdownloadcomponents'] = 'কম্পোনেন্ট ডাউনলোড করা যায় না';
$string['cannotdownloadzipfile'] = 'ZIP ফাইল ডাউনলোড করা যায়না';
$string['cannotfindcomponent'] = 'কম্পোনেন্ট খুঁজে পাওয়া যায় না';
$string['cannotsavemd5file'] = 'md5 ফাইল সংরক্ষণ করতে পারেনা';
$string['cannotsavezipfile'] = 'ZIP ফাইল সংরক্ষণ করতে পারেনা';
$string['cannotunzipfile'] = 'ফাইল আনজিপ করতে পারে না';
$string['componentisuptodate'] = 'কম্পোনেন্ট হালনাগাদ করা নেই';
$string['downloadedfilecheckfailed'] = 'ফাইল ডাউনলোড পরীক্ষা ব্যর্থ';
$string['invalidmd5'] = 'পরীক্ষন ভেরিয়েবল ভুল ছিল - পুনরায় চেষ্টা';
$string['missingrequiredfield'] = 'কিছু আবশ্যক ক্ষেত্র অনুপস্থিত';
$string['remotedownloaderror'] = 'আপনার সার্ভারে কম্পোনেন্ট ডাউনলোড ব্যর্থ, অনুগ্রহ করে প্রক্সি সেটিং পরীক্ষা, PHP cURL এক্সটেনশন খুব ভালোভাবে সুপারিশ করা হয়েছে।<br /><br />আপনার উচিত ফাইলটি নিজহাতে <a href="{$a->url}">{$a->url}</a> থেকে ডাউনলোড করে, আপনার সার্ভারে "{$a->dest}" এ এটা অনুলিপি এবং এটা এখানে আনজিপ করুন।';
$string['wrongdestpath'] = 'ভুল গন্তব্য পাথ';
$string['wrongsourcebase'] = 'ভুল সোর্স URL বেস';
$string['wrongzipfilename'] = 'ভুল ZIP ফাইল নাম';
+67
View File
@@ -30,4 +30,71 @@
defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'অ্যাডমিন ডিরেক্টরিটি';
$string['availablelangs'] = 'যে সমস্ত ভাষা ব্যাবহার করতে পারেন';
$string['chooselanguagehead'] = 'একটি ভাষা নির্বাচন';
$string['chooselanguagesub'] = 'ইনস্টলেশনের জন্য একটি ভাষা নির্বাচন। এই ভাষাই সাইটের জন্য নির্ধারিত ভাষা হিসাবে ব্যবহৃত হবে এবং এটা পরে যেকোনো সময় পরিবর্তন করা হতে পারে।';
$string['cliinstallheader'] = 'মুডল {$a} কমান্ড লাইন ইনস্টলেশন প্রোগ্রাম';
$string['databasehost'] = 'ডাটাবেস হোস্ট';
$string['databasename'] = 'ডাটাবেস নাম';
$string['databasetypehead'] = 'ডাটাবেস ড্রাইভার নির্বাচন';
$string['dataroot'] = 'ডাটাবেস ডিরেক্টরি';
$string['dbprefix'] = 'টেবিল প্রেফিক্স';
$string['dirroot'] = 'মুডল ডিরেক্টরি';
$string['environmenthead'] = 'এনভায়রনমেন্ট পরীক্ষা করা হচ্ছে ...';
$string['environmentsub2'] = 'প্রত্যেক মুডল রিলিজের PHP সংস্করণের কিছু নূন্যতম শর্ত এবং কিছু অত্যাবশ্যক PHP এক্সটেনশন রয়েছে।
ইনস্টল ও আপগ্রেডের পূর্বেই সম্পূর্ন এনভায়রনমেন্ট পরীক্ষা করা হয়েছে। নতুন সংস্করনটা ইনস্টল করতে বা PHP এক্সটেনশন সক্রিয় করতে না পারলে অনুগ্রহ করে সার্ভার প্রশাসন এর সাথে যোগাযোগ।';
$string['errorsinenvironment'] = 'এনভায়রনমেন্ট পরীক্ষা ব্যর্থ!';
$string['installation'] = 'ইনস্টলেশন';
$string['langdownloaderror'] = 'দূর্ভাগ্যবশত "{$a}" ভাষা ডাউনলোড করা যাচ্ছে না। ইনস্টলেশন প্রক্রিয়া ইংরেজী ভাষাতেই চলবে।';
$string['memorylimithelp'] = '<p>আপনার সার্ভারের PHP মেমরি সীমা বর্তমানে {$a} এ নির্ধারণ করা হয়েছে।</p>
<p>ফলে মুডলে পরবর্তীতে মেমরি সংক্রান্ত সমস্যা দেখা দিতে পারে, বিশেষ করে অনেকগুলো মুডল সক্রিয় করা থাকলে/বেশিসংখ্যক ব্যবহারকারী থাকলে। </p>
<p>এজন্য আমরা সুপারিশ করি উচ্চসীমার, যেমন ৪০M মেমরি সহ PHP কমপাইল করতে।
এটা করার অনেকগুলো উপায় রয়েছে:</p>
<ol>
<li>আপনি যদি <i>--enable-memory-limit</i> দ্বারা PHP কমপাইল করতে পারেন তবে।
ফলে মুডল নিজে মেমরি সীমা নির্ধারণ করে নিবে।</li>
<li>আপনি php.ini ফাইল ব্যবহার করতে পারলে <b>memory_limit</b>
পরিবর্তন করে ৪০M এর মত করা যেত। আপনি যদি নিজে ব্যবহার করতে না পারেন তবে আপনার অ্যাডমিনিস্ট্রেশন আপনার জন্য এ কাজ করে দিবে।</li>
<li>কিছু PHP সার্ভারে মুডল ডিরেক্টরিতে:
<blockquote><div>php_value memory_limit 40M</div></blockquote>
লাইনটিসহ .htaccess ফাইল তৈরি করে নিতে পারেন
<p>কিছু সার্ভারে <b>সকল</b> PHP পৃষ্ঠা কাজ নাও করতে পারে
(পৃষ্ঠায় আপনার কিছু ত্রুটি চোখে পড়বে) সুতরাং আপনাকে .htaccess ফাইল অপসারন করতে হবে।</p></li>
</ol>';
$string['paths'] = 'পাথ';
$string['pathserrcreatedataroot'] = 'ইনস্টলারের সাহায্যে ডাটা ডিরেক্টরি ({$a->dataroot}) তৈরি করা যায় না';
$string['pathshead'] = 'পাথ নিশ্চিত';
$string['pathsrodataroot'] = 'ডাটারুট ডিরেক্টরি লেখার মত নয়।';
$string['pathsroparentdataroot'] = 'প্যারেন্ট ডিরেক্টরি ({$a->parent}) লেখার যোগ্য নয়। ইনস্টলারের সাহায্যে ডাটা ডিরেক্টরি ({$a->dataroot}) তৈরি করা যায় না।';
$string['pathssubadmindir'] = 'খুব কম সংখ্যক ওয়েবহোস্ট কন্ট্রোল প্যানেল বা এই ধরনের কিছু ব্যবহার করতে /admin কে বিশেষ URL হিসাবে ব্যবহার করে। দূর্ভাগ্যবশত এর সাথে মুডল এডমিন পৃষ্টার স্ট্যান্ডার্ড স্থান নিয়ে ঝামেলা হয়। ইনস্টলেশনে অ্যাডমিন ডিরেক্টরির
নাম পরিবর্তন করে নতুন নাম দিয়ে এ সমস্যার সমাধান করতে পারেন। যেমন: <em>moodleadmin</em>। এর ফলে মডুলে অ্যাডমিনে লিঙ্কগুলো নির্ধারণ করে দিবে।';
$string['pathssubdataroot'] = 'মুডলের ফাইল সংরক্ষণের জন্য জায়গা প্রয়োজন। ওয়েব সার্ভার ব্যবহারকারী
(সাধরনত কেউই না বা apache) যাতে অবশ্যই এই ডিরেক্টরি পড়তে ও লিখতে পারে, কিন্তু যাতে ওয়েবের সাহায্যে এটা সরাসরি ব্যবহার করা না যায়। ডিরেক্টরি না থাকলে, ইনস্টলার এটা তৈরি করে নেয়ার চেষ্টা করবে।';
$string['pathssubdirroot'] = 'মুডল ইন্সটলেশনের সম্পূর্ন ডিরেক্টরি পাথ।';
$string['pathssubwwwroot'] = 'মুডল ব্যবহার করার সম্পূর্ন ওয়েব ঠিকানা।
একাধিক ঠিকানা ব্যবহার করে মুডল ব্যবহার করা সম্ভব নয়।
আপনার সাইটের যদি একাধিক পাবলিক ঠিকানা থাকে তবে এই ঠিকানাটা ছাড়া বাকি সবগুলো ঠিকানার জন্য আপনাকে অবশ্যই স্থায়ী রিডিরেক্ট নির্ধারণ করতে হবে।';
$string['pathsunsecuredataroot'] = 'ডাটারুট এর স্থান নিরাপদ নয়';
$string['pathswrongadmindir'] = 'অ্যাডমিন ডিরেক্টরি নাই';
$string['phpextension'] = '{$a} PHP এক্সটেনশন';
$string['phpversion'] = 'PHP সংস্করণ';
$string['phpversionhelp'] = '<p>মুডলের জন্য PHP এর কমপক্ষে 4.3.0 or 5.1.0সংস্করণ প্রয়োজন (5.0.x এ অবগত সমস্যার সংখ্যাগতমান দেয়া থাকে)।</p>
<p>আপনি বর্তমানে {$a} সংস্করণটি চালাচ্ছেন</p>
<p>PHP সংস্করন অবশ্যই আপগ্রেড করতে হবে বা PHP এর নতুন সংস্করনসহ হোস্ট ব্যবহার করতে হবে!<br />
(5.0.x এর ক্ষেত্রে আপনি 4.4.x সংস্করনেও ডাউনগ্রেড করতে পারেন)</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'আপনি সফলভাবে
আপনার কম্পিউটারে <strong>{$a->packname} {$a->packversion}</strong> প্যাকেজ ইনস্টল করে চালু করেছেন বলেই এই পৃষ্ঠাটি দেখতে পাচ্ছেন। অভিনন্দন!';
$string['welcomep30'] = 'অ্যাপ্লিকেশনসহ <strong>{$a->installername}</strong> রিলিজের ফলে একটি এনভায়রনমেন্ট তৈরি করা হয় যেখানে <strong>মুডল</strong> কাজ করবে, যেমন:';
$string['welcomep40'] = 'প্যাকেজে <strong>মুডল {$a->moodlerelease} ({$a->moodleversion})</strong> ও থাকে।';
$string['welcomep50'] = 'এই প্যাকেজের সকল অ্যাপ্লিকেশন তাদের মূল্যবান
লাইসেন্স অনুসরন করে। সম্পূর্ন <strong>{$a->installername}</strong> প্যাকেজ <a href="http://www.opensource.org/docs/definition_plain.html">ওপেন সোর্স</a> এবং <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> লাইসেন্সের আওতায়
বন্টিত।';
$string['welcomep60'] = 'নিম্নোক্ত পৃষ্ঠায় আপনার কম্পিউটারে <strong>মুডল</strong>
কনফিগার করে নির্ধারন করার জন্য কিছু সহজ উপায় দেয়া আছে। আপনি পূর্বনির্ধারিত
সেটিং গ্রহন করতে পারেন অথবা ঐচ্ছিকভাবে তাদেরকে আপনার প্রয়োজনানুসারে সংশোধন করে নিতে পারেন।';
$string['welcomep70'] = '<strong>মুডল</strong> সেট আপের সাহায্যে অগ্রসর হওয়ার জন্য "পরবর্তী" বোতামে ক্লিক।';
$string['wwwroot'] = 'ওয়েব ঠিকানা';
+2 -2
View File
@@ -30,5 +30,5 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotsavemd5file'] = 'No s\'ha pogut alçar el fitxer md5';
$string['cannotsavezipfile'] = 'No s\'ha pogut alçar el fitxer zip';
$string['cannotsavemd5file'] = 'No s\'ha pogut guardar el fitxer md5';
$string['cannotsavezipfile'] = 'No s\'ha pogut guardar el fitxer zip';
+16 -7
View File
@@ -30,7 +30,10 @@
defined('MOODLE_INTERNAL') || die();
$string['langdownloaderror'] = 'Dissortadament l\'idioma "{$a}" no està instal·lat. La instal·lació prosseguirà en anglés.';
$string['clialreadyconfigured'] = 'El fitxer config.php ja existeix, feu servir dmin/cli/install_database.php si voleu instal·lar este lloc web.';
$string['clialreadyinstalled'] = 'El fitxer config.php ja existeix, feu servir admin/cli/upgrade.php si voleu actualitzar este lloc web.';
$string['cliinstallheader'] = 'Programa d\'instal·lació de línia d\'ordes de Moodle {$a}';
$string['langdownloaderror'] = 'Dissortadament l\'idioma "{$a}" no es pot baixar. La instal·lació prosseguirà en anglés.';
$string['memorylimithelp'] = '<p>El límit de memòria del PHP del vostre servidor actualment està definit en {$a}.</p>
<p>Això pot causar que Moodle tinga problemes de memòria més avant, especialment si teniu molts mòduls habilitats i/o molts usuaris.</p>
@@ -41,14 +44,20 @@ $string['memorylimithelp'] = '<p>El límit de memòria del PHP del vostre servid
<li>Si teniu accés al fitxer php.ini, podeu canviar el paràmetre <b>memory_limit</b> a 40 MB. Si no hi teniu accés podeu demanar al vostre administrador que ho faça ell.</li>
<li>En alguns servidors PHP podeu crear un fitxer .htaccess dins del directori de Moodle amb esta línia:
<p><blockquote>php_value memory_limit 40M</blockquote></p>
<p>Tanmateix, en alguns servidors això farà que no funcioni <b>cap</b> pàgina PHP (es visualitzaran errors) en el qual cas hauríeu de suprimir el fitxer .htaccess.</p></li>
<p>Tanmateix, en alguns servidors això farà que no funcione <b>cap</b> pàgina PHP (es visualitzaran errors) en el qual cas hauríeu de suprimir el fitxer .htaccess.</p></li>
</ol>';
$string['pathssubdataroot'] = 'Necessiteu un espai on Moodle puga alçar els fitxers penjats. Este directori hauria de tindre permisos de lectura I ESCRIPTURA per a l\'usuari del servidor web (normalment \'nobody\' o \'apache\'), però no cal que siga accessible directament via web. L\'instal·lador provarà de crear-lo si no existeix.';
$string['phpversionhelp'] = '<p>Moodle necessita la versió de PHP 4.1.0 o posterior.</p>
$string['pathssubadmindir'] = 'Alguns serveis d\'allotjament web (pocs) utilitzen un URL especial /admin p. ex. per a accedir a un tauler de control o quelcom paregut. Malauradament això entra en conflicte amb la ubicació estàndard de les pàgines d\'administració de Moodle. Podeu arreglar este problema canviant el nom del directori d\'administració de Moodle en la vostra instal·lació i posant el nou nom ací. Per exemple <em>moodleadmin</em>. Això modificarà els enllaços d\'administració de Moodle.';
$string['pathssubdataroot'] = 'Necessiteu un espai on Moodle puga guardar els fitxers penjats. Este directori hauria de tindre permisos de lectura I ESCRIPTURA per a l\'usuari del servidor web (normalment \'nobody\' o \'apache\'), però no cal que siga accessible directament via web. L\'instal·lador provarà de crear-lo si no existeix.';
$string['pathssubwwwroot'] = 'L\'adreça web completa on s\'accedirà a Moodle.
No és possible accedir a Moodle en diferents adreces.
Si el vostre lloc té múltiples adreces públiques haureu de configurar redireccions permanents per a totes excepte esta.
Si el vostre lloc és accessible tant des d\'Internet com des d\'una intranet, utilitzeu ací l\'adreça pública i configureu el DNS de manera que els usuaris de la intranet puguen utilitzar també l\'adreça pública.
Si l\'adreça no és correcta, canvieu l\'URL en el vostre navegador per reiniciar la instal·lació amb un altre valor.';
$string['phpversionhelp'] = '<p>Moodle necessita una versió de PHP 4.3.0 o 5.1.0 (les versions 5.0.x tenien uns quants problemes coneguts).</p>
<p>A hores d\'ara esteu utilitzant la versió {$a}.</p>
<p>Vos caldrà actualitzar el PHP o traslladar Moodle a un ordinador amb una versió de PHP més recent.</p>';
$string['welcomep20'] = 'Esteu veient esta pàgina perquè heu instal·lat amb èxit i heu executat el paquet <strong>{$a->packname} {$a->packversion}</strong>. Felicitacions!';
$string['welcomep30'] = 'Esta versió de <strong>{$a->installername}</strong> inclou les aplicacions necessàries per crear un entorn en el qual funcioni <strong>Moodle</strong>:';
<p>Vos cal actualitzar el PHP o traslladar Moodle a un ordinador amb una versió de PHP més recent.<br />(Si esteu utilitzant la versió 5.0.x, alternativament també podríeu tornar arrere a la 4.4.x)</p>';
$string['welcomep20'] = 'Esteu veient esta pàgina perquè heu instal·lat amb èxit i heu executat el paquet <strong>{$a->packname} {$a->packversion}</strong>. Felicitacions.';
$string['welcomep30'] = 'Esta versió de <strong>{$a->installername}</strong> inclou les aplicacions necessàries per crear un entorn en el qual funcione <strong>Moodle</strong>:';
$string['welcomep50'] = 'L\'ús de totes les aplicacions d\'este paquet és governat per les seues llicències respectives. El paquet <strong>{$a->installername}</strong> complet és
<a href="http://www.opensource.org/docs/definition_plain.html">codi font obert</a> i es distribueix
sota llicència <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
+1 -1
View File
@@ -32,4 +32,4 @@ defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'ca';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Valencià (Català meridional)';
$string['thislanguage'] = 'Català (Valencià)';
+10
View File
@@ -30,5 +30,15 @@
defined('MOODLE_INTERNAL') || die();
$string['clianswerno'] = 'n';
$string['cliansweryes'] = 'i';
$string['cliincorrectvalueerror'] = 'Gwall, gwerth anghywir "{$a->value}" ar gyfer "{$a->option}"';
$string['cliincorrectvalueretry'] = 'Gwerth anghywir, rhowch gynnig arall arni';
$string['clitypevalue'] = 'math o werth';
$string['clitypevaluedefault'] = 'math o werth, pwyswch Enter i ddefnyddio\'r gwerth diofyn ({$a})';
$string['cliunknowoption'] = 'Dewisiadau dieithr:
{$a}
Defnyddiwch y dewis --help.';
$string['cliyesnoprompt'] = 'mae teipio i (yn golygu iawn) neu n (yn golygu na)';
$string['environmentrequireinstall'] = 'angen ei osod/ei alluogi.';
$string['environmentrequireversion'] = 'Mae angen fersiwn {$a->needed} ac rydych yn defnyddio {$a->current}';
+1
View File
@@ -42,6 +42,7 @@ $string['componentisuptodate'] = 'Mae\'r gydran wedi\'i diweddaru';
$string['downloadedfilecheckfailed'] = 'Heb lwyddo i wirio\'r ffeil a lwythwyd i lawr';
$string['invalidmd5'] = 'md5 annilys';
$string['missingrequiredfield'] = 'Mae maes gofynnol ar goll';
$string['remotedownloaderror'] = 'Wedi methu llwytho cydran ar eich gweinydd, gwiriwch osodiadau\'r dirprwy, argymhellir yr estyniad PHP cURL yn gryf.<br /><br />Mae\'n rhaid i chi lwytho\'r ffeil <a href="{$a->url}">{$a->url}</a> eich hun, ei chopïo i "{$a->dest}" ar eich gweinydd, a\'i dad-zipio yno.';
$string['wrongdestpath'] = 'Llwybr cyrchfan anghywir.';
$string['wrongsourcebase'] = 'Bôn URL ffynhonnell anghywir.';
$string['wrongzipfilename'] = 'Enw ffeil ZIP anghywir.';
+24
View File
@@ -34,10 +34,18 @@ $string['admindirname'] = 'Cyfeiriadur y Gweinyddwr';
$string['availablelangs'] = 'Y pecynnau iaith sydd ar gael';
$string['chooselanguagehead'] = 'Dewis iaith';
$string['chooselanguagesub'] = 'Dewiswch iaith ar gyfer y broses osod YN UNIG. Gallwch ddewis yr iaith ar gyfer y safle ac ar gyfer defnyddwyr yn nes ymlaen ar sgrin arall.';
$string['cliinstallheader'] = 'Rhaglen gosod llinell gorchymyn Moodle {$a}';
$string['databasehost'] = 'Gwesteiwr y gronfa ddata';
$string['databasename'] = 'Enw\'r gronfa ddata';
$string['databasetypehead'] = 'Dewis gyrrwr ar gyfer y gronfa ddata';
$string['dataroot'] = 'Cyfeiriadur Data';
$string['datarootpermission'] = 'Hawliau ar gyfer cyfeiriaduron data';
$string['dbprefix'] = 'Llythrennau Blaen Tablau';
$string['dirroot'] = 'Cyfeiriadur Moodle';
$string['environmenthead'] = 'Wrthi\'n profi eich amgylchedd ...';
$string['environmentsub2'] = 'Mae gan bob fersiwn Moodle ofyniad fersiwn PHP sylfaenol ac amryw o estyniadau PHP gorfodol.
Bydd yr amgylchedd yn cael ei brofi\'n llawn cyn pob proses osod a diweddaru. Cysylltwch â gweinyddwr y gweinydd os nad ydych chi\'n gwybod sut mae gosod fersiwn newydd neu alluogi estyniadau PHP.';
$string['errorsinenvironment'] = 'Wedi methu profi\'r amgylchedd!';
$string['installation'] = 'Gosod';
$string['langdownloaderror'] = 'Yn anffodus, ni osodwyd yr iaith ganlynol: "{$a}". Bydd y broses osod yn cario ymlaen yn Saesneg.';
$string['memorylimithelp'] = '<p>Mae maint y cof PHP yn eich gweinydd ar hyn o bryd yn {$a}.</p>
@@ -59,6 +67,22 @@ $string['memorylimithelp'] = '<p>Mae maint y cof PHP yn eich gweinydd ar hyn o b
<p>Fodd bynnag, ar rai gweinyddion bydd hyn yn atal <b>pob</b> tudalen PHP rhag gweithio
(bydd gwallau\'n ymddangos pan fyddwch yn edrych ar dudalennau) felly bydd rhaid i chi dynnu\'r ffeil .htaccess file.</p></li>
</ol>';
$string['paths'] = 'Llwybrau';
$string['pathserrcreatedataroot'] = 'Dydy\'r rhaglen osod ddim yn gallu creu\'r cyfeiriadur data ({$a->dataroot}).';
$string['pathshead'] = 'Cadarnhau llwybrau';
$string['pathsrodataroot'] = 'Does dim modd ysgrifennu ar y cyfeiriadur gwraidd data.';
$string['pathsroparentdataroot'] = 'Does dim modd ysgrifennu ar y cyfeiriadur rhiant ({$a->parent}). Dydy\'r rhaglen osod ddim yn gallu creu\'r cyfeiriadur data ({$a->dataroot}).';
$string['pathssubadmindir'] = 'Nifer fach iawn o westeiwyr gwe sy\'n defnyddio /admin fel URL arbennig i chi gael mynd i mewn i\'r panel rheoli neu beth bynnag. Yn anffodus, mae hyn yn gwrthdaro â lleoliad safonol tudalennau gweinyddol Moodle. Gallwch drwsio hyn drwy ailenwi cyfeiriadur y gweinyddwr wrth osod y rhaglen, a rhoi\'r enw newydd yma. Er enghraifft: <em>gweinyddmoodle</em>. Bydd hyn yn trwsio\'r dolenni gweinyddol yn Moodle';
$string['pathssubdataroot'] = 'Mae Moodle angen lle ar gyfer cadw ffeiliau sy\'n cael eu llwytho i fyny. Dylai defnyddiwr gweinydd y we (fel arfer \'neb\' neu \'apache\') allu darllen ac YSGRIFENNU ar y cyfeiriadur hwn, ond ni ddylid gallu mynd i mewn iddo\'n uniongyrchol drwy\'r we. Bydd y rhaglen osod yn ceisio ei greu os nad yw\'n bodoli.';
$string['pathssubdirroot'] = 'Llwybr cyfeiriadur llawn i raglen Moodle.';
$string['pathssubwwwroot'] = 'Y cyfeiriad gwe llawn a ddefnyddir i fynd i mewn i Moodle.
Nid yw\'n bosibl mynd i mewn i Moodle wrth ddefnyddio amryw o gyfeiriadau.
Os oes gan eich safle amryw o gyfeiriadau cyhoeddus, bydd rhaid i chi sefydlu llwybrau ailgyfeirio parhaol ar gyfer pob un ohonynt ar wahân i hwn.
Os gellir mynd i mewn i\'ch safle o\'r Rhyngrwyd a\'r Fewnrwyd, defnyddiwch y cyfeiriad cyhoeddus yma a sefydlu DNS er mwyn i ddefnyddwyr y Fewnrwyd allu defnyddio\'r cyfeiriad cyhoeddus hefyd.
Os nad yw\'r cyfeiriad yn gywir, newidiwch yr URL yn eich porwr i ailddechrau\'r rhaglen osod gyda gwerth gwahanol.';
$string['pathsunsecuredataroot'] = 'Dydy lleoliad y data gwraidd ddim yn ddiogel';
$string['pathswrongadmindir'] = 'Cyfeiriadur y gweinyddwr';
$string['phpextension'] = 'Estyniad PHP {$a}';
$string['phpversion'] = 'Fersiwn PHP';
$string['phpversionhelp'] = '<p>Mae angen o leiaf fersiwn PHP 4.3.0 neu 5.1.0 ar Moodle (mae llawer o broblemau gyda 5.0.x).</p>
<p>Ar hyn o bryd, rydych yn rhedeg fersiwn {$a}</p>
+42
View File
@@ -0,0 +1,42 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['clianswerno'] = 'n';
$string['cliansweryes'] = 'y';
$string['cliincorrectvalueerror'] = 'ནོར་བ། "{$a->option}"དོན་ལུ་ འཛོལ་འཛོལ་བའི་གནས་ཚད "{$a->value}"';
$string['cliincorrectvalueretry'] = 'འཛོལ་འཛོལ་བའི་གནད་ཚད་ནང་འདུག སླར་རྩོལ།';
$string['clitypevalue'] = 'གནས་ཚད་དབྱེ་བ།';
$string['clitypevaluedefault'] = 'གནས་ཚད་དབྱེ་བ། Enter ཨེབ་སྟེ་སྔོན་སྒྲིག་གི་ཨང་({$a})';
$string['cliunknowoption'] = 'ངོས་འཛིན་འབད་མ་ཚུགས་པའི་གདམ་ཁ་འདུག: {$a} གྲོགས་རམ་གྱི་གདམ་ཁ་འདི་ལག་ལེན་འཐབ་ད།';
$string['cliyesnoprompt'] = 'y ཟེར་འབྲི་བ་ཅིན་ཨིནཟེརཝ་དང་ n ཟེར་འབྲི་བ་ཅིན་མིན་)';
$string['environmentrequireinstall'] = 'གཞི་བཙུགས་འབད་དི་ལྕོགས་ཅན་བཟོ་དགོ།';
$string['environmentrequireversion'] = 'ཐོན་རིམ་ {$a->needed}དགོས་མཁོ་ཡོདཔ་ལས་ ཁྱོད་ཀྱི་ {$a->current}གཡོག་བཀོལ་བའི་བསྒང་ཡོད།';
+48
View File
@@ -0,0 +1,48 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatelangdir'] = 'སྐད་ཡིག་སྣོད་ཐོ་ གསར་བསྐྲུན་འབད་མི་བཏུབ།';
$string['cannotcreatetempdir'] = 'གནས་སྐབས་ཀྱི་སྣོད་ཐོ་ གསར་བསྐྲུན་འབད་མི་བཏུབ།';
$string['cannotdownloadcomponents'] = 'ཆ་ཤས་ཚུ་ཕབ་ལེན་འབད་མི་བཏུབ།';
$string['cannotdownloadzipfile'] = 'ZIP ཡིག་སྣོད་ཕབ་ལེན་འབད་མི་བཏུབ།';
$string['cannotfindcomponent'] = 'ཆ་ཤས་མི་ཐོབ།';
$string['cannotsavemd5file'] = 'md5 ཡིག་སྣོད་ སྲུངས་མི་བཏུབ།';
$string['cannotsavezipfile'] = 'ZIP ཡིག་སྣོད་ སྲུངས་མི་བཏུབ།';
$string['cannotunzipfile'] = 'ཡིག་སྣོད་ unzip འབད་མི་བཏུབ།';
$string['componentisuptodate'] = 'ཆ་ཤས་འདི་ དུས་མཐུན་སྦེ་ཡོད།';
$string['downloadedfilecheckfailed'] = 'ཕབ་ལེན་འབད་ཡོད་པའི་ཡིག་སྣོད་ཞིབ་དཔྱད་འཐུས་ཤོར་བྱུང་ཡོདཔ།';
$string['invalidmd5'] = 'check འགྱུར་ཅནའདི་ཕྱི་འགྱུར་ཨིན་མས་ - ལོག་འབད་གནང་།';
$string['missingrequiredfield'] = 'དགོ་པའི་ས་སྒོ་འདི་མིན་འདུག';
$string['remotedownloaderror'] = 'ཁྱོད་ཀྱི་server ་ལུ་ཆ་ཤས་ཕབ་ལེན་འབདཝ་ད་འཛོལ་བ་བྱུང་ཡོདཔ་ལས་ པོརོག་སི་སྒྲིག་སྟངས་ཚུ་བདེན་སྦྱོར་འབད་དགོ་པའི་ཁར་ PHP cURLརྒྱ་བསྐྱེད་འདི་འོས་སྦྱོར་འབད་ཡོདཔ་ཨིན། <br /><br />ཁྱོད་ཀྱིས་ ལག་ཐོག་ལས་ <a href="{$a->url}">{$a->url}</a>་ཕབ་ལེན་འབད་ཞིནམ་ལས་ ཁྱོད་རའི་སར་བར་ "{$a->dest}" ནང་འདྲ་བཤུས་བརྐྱབ་ཞིནམ་ལས་ དེ་ཁར་ཛིབ་འབད་བཤོལ།';
$string['wrongdestpath'] = 'བཞག་སྣོད་རྒྱུ་ལམ་འཛོལ་བ།';
$string['wrongsourcebase'] = 'འབྱུང་ས་URLགཞི་རྟེན་འཛོལ་བ།';
$string['wrongzipfilename'] = 'ZIP་ཡིག་སྣོད་མིང་འཛོལ་བ།';
+75
View File
@@ -0,0 +1,75 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'བདག་སྐྱོང་ སྣོད་ཐོ་';
$string['availablelangs'] = 'ཐོབ་ཡོད་པའི་སྐད་ཡིག་ཚུ་གྱི་ཐོ་བཀོད།';
$string['chooselanguagehead'] = 'སྐད་ཡིག་ སེལ་འཐུ་འབད།';
$string['chooselanguagesub'] = 'གཞི་བཙུགས་ཀྱི་དོན་ལུ་རྐྱངམ་ཅིག་ སྐད་ཡིག་གཅིག་སེལ་འཐུ་འབད། ཁྱོད་ཀྱིས་ ས་ཁོངས་དང་ ལག་ལེན་པའི་སྐད་ཡིག་ཚུ་ ཤུལ་མམ་གྱི་ གསལ་གཞི་ནང་ སེལ་འཐུ་འབད་ཚུགས།';
$string['clialreadyconfigured'] = 'ཡིག་སྣོད་config.php་འདི་ཧེ་མ་ལས་འདུག།ཁྱོད་ཨ་ནཱི་ས་ཁོངས་གཞི་བཙུགས་འབད་བ་ཅིན་admin/cli/install_database.php་དེ་ལག་ལོན་འཐབ་གནང།';
$string['clialreadyinstalled'] = 'ཡིག་སྣོད་config.php་འདི་ཧེ་མ་ལས་འདུག།ཁྱོད་ཨ་ནཱི་ས་ཁོངས་ཡར་བསྐྱེད་འབད་བ་ཅིན་admin/cli/upgrade.php་དེ་ལག་ལོན་འཐབ་གནང།';
$string['cliinstallheader'] = 'Moodle {$a} command line installation program';
$string['databasehost'] = 'གནས་སྡུད་གཞི་རྟེན་host';
$string['databasename'] = 'གནས་སྡུད་གཞི་རྟེན་ མིང་།';
$string['databasetypehead'] = 'Choose database driver';
$string['dataroot'] = 'གནས་སྡུད་ སྣོད་ཐོ་';
$string['datarootpermission'] = 'Data directories permission';
$string['dbprefix'] = 'Tables prefix';
$string['dirroot'] = 'Moodle སྣོད་ཐོ།';
$string['environmenthead'] = 'ཁྱོད་རའི་ མཐའ་འཁོར་ཞིབ་དཔྱད་འབད་དོ་་་';
$string['environmentsub2'] = 'Moodleའཛིན་གྲོལ་རེ་རེ་གྱི་PHP་འཛིན་གྲོལ་དག་པ་ཅིག་དང་PHP extensionsངེས་མཁོ་དགོཔ་ཨིན།གཞི་བཙུགས་དང་ཡར་བསྐྱེད་་མ་བཟོ་བའི་ཧེ་མFull environmentཞིབ་དཔྱད་འབད་འོང་།';
$string['errorsinenvironment'] = 'Environment check failed!';
$string['installation'] = 'གཞི་བཙུགས།';
$string['langdownloaderror'] = 'སྐད་ཡིག་ "{$a}"འདི་ གཞི་བཙུགས་འབད་དེ་མིན་ནུག། གཞི་བཙུགས་འདི་ ཨིན་སྐད་ནང་ འཕྲོ་མཐུད་དེ་འབད་ནི་ཨིན།';
$string['memorylimithelp'] = '<p>ད་ལྟོ་ཁྱོད་ཀྱི་སར་བར་གྱི་དོན་ལུ་ PHP དྲན་ཚད་དེ་ $a ལུ་གཞི་སྒྲིག་འབད་དེ་འདུག།</p> <p> འདི་གིས་ཤུལ་ལས་ མུ་ཌལ་ལུ་ དྲན་ཚད་ཀྱི་དཀའ་ངལ་ཚུ་འབྱུང་བཅུག་འོང་ཝ། འདི་གི་ནང་ལས་ཡང་ ཁྱོད་ཀྱི་མུ་ཌལ་དང་ལག་ལེན་པ་ལོ་ཤ་ལྕོགས་ཅན་བཟོ་ཡོད་པ་ཅིན་ དཀའ་ངལ་འབྱུང་འོང་།</p> <p> ཁྱོད་ཀྱིས་ 40M བཟུམ་གྱི་ PHP དྲན་ཚད་ མང་སུ་ཡོད་མི་ རིམ་སྒྲིག་འབད་བ་ཅིན་ ལེགས་ཤོམ་འོང་། འདི་འབད་ནི་གི་དོན་ལུ་ ཐབས་ཤེས་ ལེ་ཤ་ཡོད་:</p> <ol> <li> ཁྱོད་ཀྱིས་ <i>--enable-memory-limit</i> དང་གཅིག་ཁར་ PHP ལོག་ཕྱོགས་སྒྲིག་འབད་ཚུགས་པ་ཅིན་ འདི་གི་ས་ མུ་ཌལ་གི་དྲན་ཚད་ཁོ་ར་གིས་སྦེ་ གཞི་སྒྲིག་འབད་ཚུགས།</li> <li>ཁྱོད་རའི་ php.ini ཡིག་སྣོད་ནང་འཛུལ་སྤྱོད་འབད་ཚུགས་པ་ཅིན་ ཁྱོད་ཀྱི་ <b>memory_limit</b>སྒྲིག་སྟངས་འདི་ 40M བཟུམ་གཅིག་ལུ་ བསྒྱུར་བཅོས་འབད་ཚུགས། ག་དེམ་ཅིག་སྦེ་འཛུལ་སྤྱོད་འབད་མ་ཚུགས་པ་ཅིན་ ཁྱོད་རའི་བདག་སྐྱོང་པ་ལུ་ འབད་བཅུག། <li> PHP སར་བར་ ལ་ལོ་གཅིག་ནང་ འོག་གི་གྲལ་ཐིག་ཚུ་ཡོད་མི་ མུ་ཌལ་སྣོད་ཐོ་ནང་ཁྱོད་ཀྱིས་ .htaccess ཡིག་སྣོད་གསར་བསྐྲུན་འབད་ཚུགས། <blockquote><div>php_value memory_limit 40M</div></blockquote> <p> དེ་འབདཝ་ད་ལུ་ སར་བར་ལ་ལོ་གཅིག་ནང་ འདི་གིས་ <b>all</b> PHP ཤོག་ལེབ་ཚུ་ གཡོག་བཀོལ་ནི་ལུ་སྔོན་བཀག་འབདཝ་ཨིན། (ཤོག་ལེབ་ཚུ་ནང་བལྟ་བའི་སྐབས་ འཛོལ་བ་ཚུ་མཐོང་འོང་) དེ་འབདཝ་ལས་ .htaccess ཡིག་སྣོད་་རྩ་བསྐྲད་གཏང་དགོ།</p></li> </ol>';
$string['paths'] = 'Paths';
$string['pathserrcreatedataroot'] = 'Data directory ({$a->dataroot}) cannot be created by the installer.';
$string['pathshead'] = 'Confirm paths';
$string['pathsrodataroot'] = 'Dataroot directory is not writable.';
$string['pathsroparentdataroot'] = 'Parent directory ({$a->parent}) is not writeable. Data directory ({$a->dataroot}) cannot be created by the installer.';
$string['pathssubadmindir'] = 'webhostsདག་པ་ཅིག་ /admin ལག་ལེན་འཐབ་འབད་དམིགས་བསལ་ URL འདི་control panel or somethingའཛུལ་སྤྱོད་འབདཝ་ཨིན། ཁ་རྗེ་མེད་པར་ Moodleབདག་སྐྱོང་ཤོག་ལེབ་ཚུ་གྱི་ཚད་ལྡན་གནས་ཁོངས་གཅིག་ཁར་མི་མཐུན་ཨིན། ཁྱོད་ཀྱི་དཀའ་ངལ་དེ་ བདག་སྐྱོང་ཀྱི་སྣོད་ཐོ་ གཞི་བཙུགས་འབད་བའི་གང་བསྐྱར་མིང་བཏགས་སྦེ་སེལ་ཚུགས། དཔེར་ན: <em>moodleadmin</em>. འདི་གྱི་Moodle ནང་ན་བདག་སྐྱོང་འབྲེལ་ལམ་ཚུ་གྱི་དཀའ་ངལ་་སེལ་ཚུགས་ཨིན།';
$string['pathssubdataroot'] = 'སྐྱེལ་བཙུགས་ཚར་མི་ཡིག་སྣོད་ཚུ་Moodleགྱི་སྲུངས་བཞག་ནི་གྱི་དོན་ལུ་ས་གནས་དགོ།ཨ་ནི་སྣོད་ཐོ(ས་གནས་)དི་web serverལག་ལེན་པ་(usually \'nobody\' or \'apache\')གྱི་readable AND WRITEABLE དགོ འདི་འབདཝ་ད་ web ལས་འཛུལ་སྤྱོད་ཐད་ཀར་འབད་ནི་མེད་འོང་།་The installer will try to create it if doesn\'t exist.';
$string['pathssubdirroot'] = 'Moodle installation ལུ་སྣོད་ཐོ་གི་འགྲུལ་ལམ་ག་ར་བྱིན་།';
$string['pathssubwwwroot'] = 'Moodleའཛུལ་སྤྱོད་འབད་ནི་དོན་ལུ་Web གྱི་ཁ་བྱང་ག་ར་བྱིན་དགོ། སྣ་མང་ཁ་བྱང་ཚུ་གྱི་Moodleའཛུལ་སྤྱོད་འབད་མི་ཚུགས། ག་དེམ་ཅིག་འབད་ཁྱོད་ཀྱི་སྣ་མང་མི་མང་གི་ཁ་བྱང་ཚུ་ཡོད་པ་ཅིན་ འདི་མ་གཏོགས་གཞན་ག་ར་གུ་རྟག་བརྟན་སླར་ལོག་གཏང་ནི་དོན་ལུ་གཞི་སྒྲིག་འབད་དགོ། Intranet and Internet་གཉིས་ལས་ཁྱོད་ཀྱི་ས་ཁོངས་དེ་འཛུལ་སྤྱོད་འབད་བ་ཅིན་ མི་མང་གི་ཁ་བྱང་ལག་ལེན་འཐབ་དི་འབདཝ་ལས་Intranetལག་ལེན་པ་ཚུ་གྱི་ཡང་མི་མང་གི་ཁ་བྱང་ལག་ལེན་འཐབ་ཚུགས།
ག་དེམ་ཅིག་འབད་ཁྱོད་ཀྱི་ཁ་བྱང་ངེས་བདེན་མེན་བ་ཅིན་ཁྱོད་ཀྱི་browserནང་ན་URL་དེ་བསྒྱུར་བཅོས་འབད་སྦེ་ ལོག་installation with a different value.འགོ་བཙུགས།';
$string['pathsunsecuredataroot'] = 'Dataroot location is not secure';
$string['pathswrongadmindir'] = 'Admin directory does not exist';
$string['phpextension'] = '{$a} PHP extension';
$string['phpversion'] = 'PHP ཐོན་རིམ།';
$string['phpversionhelp'] = '<p>Moodle་ལུ་ ཐོན་རིམ་འདི་ ཉུང་མཐའ་ལུ་ 4.3.0 ཡང་ན་ 5.1.0 དགོ། (5.0.x ལུ་ ཤེས་ཚུགས་པའི་དཀའ་ངལ་ ལེ་ཤ་འདུག་)</p> <p>ཁྱོད་ད་ལྟོ་ཐོན་རིམ་$a གཡོག་བཀོལ་དོ་</p> <p>PHP ཡར་བསྐྱེད་འབད་དགོ་ ཡང་ན་ PHP ཐོན་རིམ་གསརཔ་ཡོད་མི་ ཧོསིཊ་གཅིག་དང་གཅིག་ཁར་ སྤོ་བཤུད་འབད།!<br /> (5.0.x ནང་ལུ་ ཁྱོད་ཀྱིས་ ཐོན་རིམ་ 4.4.x ལུ་ མར་ཕབ་འབད་ཚུགས།)</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'ཁྱོད་རའི་ གློག་རིག་ནང་ <strong>{$a->packname} {$a->packversion}</strong> package འདི་ མཐའ་འཁྱོལཅན་སྦེ་ གཞི་བཙུགས་དང་ གསར་བཙུགས་འབད་ཡོདཔ་ལས་བརྟེན་ ཁྱོད་ཀྱིས་འ་ནི་ ཤོག་ལེབ་འདི་བལྟ་ཚུགསཔ་ཨིན། བཀྲིས་བདེ་ལེགས་!';
$string['welcomep30'] = '<strong>{$a->installername}</strong> གསར་བཏོན་འབད་མི་ནང་ <strong>Moodle</strong> བཀོལ་སྤྱོད་འབད་བཏུབ་མི་ མཐའ་འཁོར་གསར་བསྐྲུན་འབད་མི་གློག་རིམ་ཚུ་ཡང་ཚུདཔ་ཨིན།';
$string['welcomep40'] = 'ཐུམ་སྒྲིལ་འདི་ནང་ལུ་ <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong> ཡང་ ཚུདཔ་ཨིན།';
$string['welcomep50'] = 'ཐུམ་སྒྲིལ་འདི་ནང་ལུ་ གློག་རིམ་ཆ་མཉམ་གྱི་ལག་ལེན་ཚུ་ ཁོང་རའི་ ཆོག་ཐམ་ལུ་ དབང་ཚད་ཡོདཔ་ཨིན། <strong>{$a->installername}</strong> ཐུམ་སྒྲིལ་ཆ་ཚང་འདི་ <a href="http://www.opensource.org/docs/definition_plain.html">open source</a> ཨིནམ་དང་ <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> ཆོག་ཐམ་དང་འཁྲིལ་ཏེ་ བགོ་བཀྲམ་འབད་འབདཝ་ཨིན།';
$string['welcomep60'] = 'འོག་གི་ཤོག་ལེབ་ཚུ་གིས་ ཁྱོད་རའི་གློག་རིག་ནང<strong>Moodle</strong> རིམ་སྒྲིག་འབད་ནིའི་ ཐབས་ལམ་ འཇམ་ཏོང་ཏོ་ཚུ་སྟོན་འོང་། སྔོན་སྒྲིག་ སྒྲིག་སྟངས་ཚུ་ དང་ལེན་འབད་ ཡང་ན་ ཁྱོད་རའི་དགོས་མཁོ་དང་བསྟུན་ཏེ་ འདི་ཚུ་ བསྒྱུར་བཅོས་འབད།';
$string['welcomep70'] = '<strong>Moodle</strong> གཞི་སྒྲིག་ འཕྲོ་མཐུད་དེ་འབད་ནིའི་དོན་ལུ་ "Next" ཨེབ་རྟ་གུ་ ཨེབ་གཏང་འབད།';
$string['wwwroot'] = 'Web ཁ་བྱང་ཚུ་';
+34
View File
@@ -0,0 +1,34 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'རྫོང་ཁ';
+36
View File
@@ -0,0 +1,36 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'སྐད་ཡིག།';
$string['next'] = 'ཤུལ་མམ';
$string['previous'] = 'ཧེ་མམ';
$string['reload'] = 'ཡང་བསྐྱར་མངོན་གསལ་འབད';
+1
View File
@@ -30,4 +30,5 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'en';
$string['thislanguage'] = 'English for kids';
+3 -1
View File
@@ -33,7 +33,9 @@ defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Admin direktorioa';
$string['availablelangs'] = 'Hizkuntza eskuragarrien zerrenda';
$string['chooselanguagehead'] = 'Aukeratu hizkuntza bat';
$string['chooselanguagesub'] = 'Instalazio-prozesurako hizkuntza aukeratu, mesedez.';
$string['chooselanguagesub'] = 'Mesedez, aukeratu instalaziorako hizkuntza bat. Hizkuntza hori erabiliko da gunearen berezko hizkuntza gisa, baina aurrerago alda daiteke.';
$string['clialreadyconfigured'] = 'File config.php fitxategia badago, mesedez erabili admin/cli/install_database.php gune hau instalatu nahi baduzu.';
$string['clialreadyinstalled'] = 'File config.php fitxategia badago, mesedez erabili admin/cli/upgrade.php zure gunea eguneratu nahi baduzu.';
$string['databasehost'] = 'Datu-basearen ostalaria';
$string['databasename'] = 'Datu-basearen izena';
$string['dataroot'] = 'Datu-direktorioa';
+35
View File
@@ -0,0 +1,35 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['cliincorrectvalueretry'] = 'E cala, tovolea tale';
$string['clitypevalue'] = 'Tabaka na lewena';
$string['cliyesnoprompt'] = 'tabaka \'y\'';
+36
View File
@@ -0,0 +1,36 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Vosa';
$string['next'] = 'Tabana tarava';
$string['previous'] = 'eliu';
$string['reload'] = 'ucuna tale';
+33
View File
@@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Cànan';
+33
View File
@@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['thislanguage'] = 'Hausa';
+1
View File
@@ -39,5 +39,6 @@ $string['clitypevaluedefault'] = 'Sláðu inn gildi, sláðu á Enter hnappinn
$string['cliunknowoption'] = 'Óþekktir valkostir:
{$a}
Vinsamlegast notaðu --help valkostinn.';
$string['cliyesnoprompt'] = 'skráðu y (þýðir já) eða n (þýðir nei)';
$string['environmentrequireinstall'] = 'verður að vera uppsett og virkjað';
$string['environmentrequireversion'] = 'krafist er útgáfu {$a->needed} en þú notast við útgáfu {$a->current}';
+3 -3
View File
@@ -49,15 +49,15 @@ $string['environmentsub2'] = 'Ciascuna release di Moodle prevede come requisito
$string['errorsinenvironment'] = 'Ci sono problemi nel vostro ambiente';
$string['installation'] = 'Installazione';
$string['langdownloaderror'] = 'Purtroppo non è stato possibile scaricare la lingua "{$a}". L\'installazione proseguirà in lingua Inglese.';
$string['memorylimithelp'] = '<p>Il limite della memoria assegnata al PHP attualmente è {$a}.</p>
$string['memorylimithelp'] = '<p>Il limite di memoria assegnata al PHP attualmente è {$a}.</p>
<p>Questo limite potrà causare problemi nel funzionamento di Moodle, specialmente se usate molti moduli di attività con molti utenti.</p>
<p>Tale limite potrà causare problemi nel funzionamento di Moodle, specialmente se usi molti moduli di attività con molti utenti.</p>
<p>Ti raccomandiamo di impostare il PHP con un limite più alto se possibile, ad esempio 40M.
Ci sono diversi modi che puoi provare:
<ol>
<li>Se possibile, ricompila il PHP con l\'opzione <i>--enable-memory-limit</i>.
Questo permette a Moodle di impostare il limite di memoria da solo.</li>
Questo consentirà a Moodle di impostare in autonomia il limite di memoria.</li>
<li>Se hai accesso al file php.ini, è possibile modificare la variabile <b>memory_limit</b> a un valore più alto, ad esempio 40M. Se non hai accesso, potete chiedere al vostro amministratore di sistema di farlo.</li>
<li>Su alcuni server con il PHP è possibile creare un file .htaccess nella cartella di Moodle contenente questa linea:
<blockquote>php_value memory_limit 40M</blockquote>
+1
View File
@@ -30,4 +30,5 @@
defined('MOODLE_INTERNAL') || die();
$string['cliincorrectvalueretry'] = 'არასწორი მონაცემი, ცადეთ ხელახლა';
$string['environmentrequireinstall'] = 'რეკომენდირებულია ჩართვა/დაყენება';
+3
View File
@@ -31,3 +31,6 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'ენა';
$string['next'] = 'შემდეგი';
$string['previous'] = 'წინა';
$string['reload'] = 'გადატვირთვა';
+1
View File
@@ -30,4 +30,5 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'da';
$string['thislanguage'] = 'Kalaallisut';
+41
View File
@@ -0,0 +1,41 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['clianswerno'] = 'n';
$string['cliansweryes'] = 'y';
$string['cliincorrectvalueerror'] = 'Fehler, falsche Wert "{$a->value}" fir "{$a->option}"';
$string['cliincorrectvalueretry'] = 'Falsche Wert, probéier nach eng Kéier';
$string['clitypevalue'] = 'Gëff de Wert an';
$string['clitypevaluedefault'] = 'Gëff de Wert an, dréck Enter fir de Standardwert ({$a}) ze benotzen';
$string['cliunknowoption'] = 'Onerkannten Optiounen:
{$a}
Benotz wann ech gelift -- Hëllefsoptioun';
+33
View File
@@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['thislanguage'] = 'Lëtzebuergesch';
+1
View File
@@ -31,3 +31,4 @@
defined('MOODLE_INTERNAL') || die();
$string['next'] = 'Pirmyn';
$string['reload'] = 'Įkelti iš naujo';
+33
View File
@@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['thislanguage'] = 'myanma bhasa';
+33
View File
@@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['thislanguage'] = 'ਪੰਜਾਬੀ';
+1
View File
@@ -33,3 +33,4 @@ defined('MOODLE_INTERNAL') || die();
$string['clianswerno'] = 'n';
$string['cliansweryes'] = 'y';
$string['cliincorrectvalueretry'] = 'Qiime khalad ah, fadla mar kale isky day';
$string['clitypevalue'] = 'nooc qiime';
+1
View File
@@ -30,5 +30,6 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'en';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Српски';
+1
View File
@@ -30,5 +30,6 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'en';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Srpski';
+3
View File
@@ -36,6 +36,9 @@ $string['cliincorrectvalueerror'] = 'లోపం దొర్లింది, "
$string['cliincorrectvalueretry'] = 'తప్పు విలువ, మళ్ళీ ప్రయత్నించండి';
$string['clitypevalue'] = 'విలువను టైపించండి';
$string['clitypevaluedefault'] = 'విలువను టైపించండి, డిఫాల్టు విలువ ({$a}) ను ఇచ్చేందుకు ఎంటరును నొక్కండి';
$string['cliunknowoption'] = 'Unrecognised ఎంపికలు:
{$a}
దయచేసి --help ఎంపికను ఉపయోగించండి.';
$string['cliyesnoprompt'] = 'y (అంటే ఔనని) గానీ, n (అంటే వద్దని) గానీ నొక్కండి';
$string['environmentrequireinstall'] = 'స్థాపించి, చేతనం చెయ్యడం తప్పనిసరి';
$string['environmentrequireversion'] = '{$a->needed} వెర్షను తప్పనిసరి. మీరేమో {$a->current} వెర్షను వాడుతున్నారు';
+38
View File
@@ -0,0 +1,38 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatelangdir'] = 'భాష డైరెక్టరీని సృష్టించలేం';
$string['cannotcreatetempdir'] = 'టెంప్ డైరెక్టరీని సృష్టించలేం';
$string['cannotdownloadcomponents'] = 'కాంపొనెంట్లను దించుకోలేరు';
$string['cannotdownloadzipfile'] = 'ZIP దస్త్రాలను దించుకోలేరు';
$string['cannotfindcomponent'] = 'కాంపొనెంటు కనబడలేదు';
$string['componentisuptodate'] = 'కాంపొనెంటు తాజాగా ఉంది';
+41
View File
@@ -0,0 +1,41 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['availablelangs'] = 'అందుబాటులో ఉన్న భాషల జాబితా';
$string['chooselanguagehead'] = 'భాషను ఎంచుకోండి';
$string['databasehost'] = 'డేటాబేసు హోస్టు';
$string['databasename'] = 'డేటాబేసు పేరు';
$string['dataroot'] = 'డేటా డైరెక్టరీ';
$string['dbprefix'] = 'టేబుళ్ళ ఆదిపదం (ప్రిఫిక్స్)';
$string['dirroot'] = 'Moodle డైరెక్టరీ';
$string['environmenthead'] = 'మీ ఎన్విరాన్మెంటును పరిశీలిస్తున్నాం ...';
$string['wwwroot'] = 'వెబ్ చిరునామా';
+1
View File
@@ -30,4 +30,5 @@
defined('MOODLE_INTERNAL') || die();
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'తెలుగు ';
+1
View File
@@ -30,4 +30,5 @@
defined('MOODLE_INTERNAL') || die();
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'татар теле';
+34
View File
@@ -0,0 +1,34 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['environmentrequireinstall'] = 'повинен бути встановлений і включений';
$string['environmentrequireversion'] = 'рекомендується версія {$a->needed}, використовується версія {$a->current}';
+39
View File
@@ -0,0 +1,39 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatetempdir'] = 'Không thể tạo thư mục tạm thời';
$string['cannotdownloadcomponents'] = 'Không thể tải component';
$string['cannotdownloadzipfile'] = 'Không thể tải tập tin ZIP';
$string['cannotfindcomponent'] = 'Không thấy component';
$string['cannotsavezipfile'] = 'Không thể lưu tập tin ZIP';
$string['cannotunzipfile'] = 'Không thể giải nén tập tin';
$string['componentisuptodate'] = 'Component đang ở tình trạng mới nhất';
+2
View File
@@ -30,4 +30,6 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'fr';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Wolof';
+1
View File
@@ -107,6 +107,7 @@ $string['groupnameexists'] = 'The group name \'{$a}\' already exists in this cou
$string['groupnotamember'] = 'Sorry, you are not a member of that group';
$string['groups'] = 'Groups';
$string['groupscount'] = 'Groups ({$a})';
$string['groupsettingsheader'] = 'Groups';
$string['groupsgroupings'] = 'Groups &amp; groupings';
$string['groupsinselectedgrouping'] = 'Groups in:';
$string['groupsnone'] = 'No groups';
-2
View File
@@ -152,7 +152,6 @@ $string['publisheremail_help'] = 'The publisher email address allows the hub adm
$string['publishername'] = 'Publisher';
$string['publishername_help'] = 'The publisher is the person or organisation that is the official publisher of the course. Unless you are publishing it on behalf of someone else, it will usually be you.';
$string['publishon'] = 'Publish on';
$string['publishonmoodleorg'] = 'Publish on MOOCH';
$string['publishonspecifichub'] = 'Publish on another Hub';
$string['questionsnumber'] = 'Number of questions ({$a})';
$string['registeredcourses'] = 'Registered courses';
@@ -190,7 +189,6 @@ $string['share'] = 'Share this course for people to download';
$string['shared'] = 'Shared';
$string['shareon'] = 'Upload this course to {$a}';
$string['shareonhub'] = 'Upload this course to a hub';
$string['shareonmoodleorg'] = 'Upload this course to MOOCH';
$string['sharepublication_help'] = 'Uploading this course to a community hub server will enable people to download it and install it on their own Moodle sites.';
$string['siteadmin'] = 'Administrator';
$string['siteadmin_help'] = 'The full name of the site administrator.';
+2 -1
View File
@@ -97,6 +97,7 @@ $string['enter'] = 'Enter';
$string['entername'] = 'Please enter folder name';
$string['enternewname'] = 'Please enter the new file name';
$string['error'] = 'An unknown error occurred!';
$string['errordoublereference'] = 'Unable to overwrite file with a shortcut/alias because shortcuts to this file already exist.';
$string['errornotyourfile'] = 'You cannot pick file which is not added by your';
$string['erroruniquename'] = 'Repository instance name should be unique';
$string['errorpostmaxsize'] = 'The uploaded file may exceed the post_max_size directive in php.ini.';
@@ -115,7 +116,7 @@ $string['filepicker'] = 'File picker';
$string['filesizenull'] = 'File size cannot be determined';
$string['folderexists'] = 'Folder name already being used, please use another name';
$string['foldernotfound'] = 'Folder not found';
$string['folderrecurse'] = 'Folder can not be moved to it\s own subfolder';
$string['folderrecurse'] = 'Folder can not be moved to it\'s own subfolder';
$string['getfile'] = 'Select this file';
$string['hidden'] = 'Hidden';
$string['choosealink'] = 'Choose a link...';
+1 -1
View File
@@ -3842,7 +3842,7 @@ class admin_setting_question_behaviour extends admin_setting_configselect {
public function load_choices() {
global $CFG;
require_once($CFG->dirroot . '/question/engine/lib.php');
$this->choices = question_engine::get_archetypal_behaviours();
$this->choices = question_engine::get_behaviour_options('');
return true;
}
}
+20 -24
View File
@@ -976,40 +976,36 @@ class completion_info {
}
}
/**
* Return whether or not the course has activities with completion enabled.
*
* @return boolean true when there is at least one activity with completion enabled.
*/
public function has_activities() {
$modinfo = get_fast_modinfo($this->course);
foreach ($modinfo->get_cms() as $cm) {
if ($cm->completion != COMPLETION_TRACKING_NONE) {
return true;
}
}
return false;
}
/**
* Obtains a list of activities for which completion is enabled on the
* course. The list is ordered by the section order of those activities.
*
* @param array $modinfo For unit testing only, supply the value
* here. Otherwise the method calls get_fast_modinfo
* @return array Array from $cmid => $cm of all activities with completion enabled,
* empty array if none
*/
public function get_activities($modinfo=null) {
global $DB;
// Obtain those activities which have completion turned on
$withcompletion = $DB->get_records_select('course_modules', 'course='.$this->course->id.
' AND completion<>'.COMPLETION_TRACKING_NONE);
if (!$withcompletion) {
return array();
}
// Use modinfo to get section order and also add in names
if (empty($modinfo)) {
$modinfo = get_fast_modinfo($this->course);
}
public function get_activities() {
$modinfo = get_fast_modinfo($this->course);
$result = array();
foreach ($modinfo->sections as $sectioncms) {
foreach ($sectioncms as $cmid) {
if (array_key_exists($cmid, $withcompletion)) {
$result[$cmid] = $withcompletion[$cmid];
$result[$cmid]->modname = $modinfo->cms[$cmid]->modname;
$result[$cmid]->name = $modinfo->cms[$cmid]->name;
}
foreach ($modinfo->get_cms() as $cm) {
if ($cm->completion != COMPLETION_TRACKING_NONE) {
$result[$cm->id] = $cm;
}
}
return $result;
}
+3 -3
View File
@@ -124,7 +124,7 @@ function css_send_ie_css($themename, $rev, $etag, $slasharguments) {
$css .= "\n@import url($relroot/styles.php?theme=$themename&rev=$rev&type=theme);";
}
header('Etag: '.$etag);
header('Etag: "'.$etag.'"');
header('Content-Disposition: inline; filename="styles.php"');
header('Last-Modified: '. gmdate('D, d M Y H:i:s', time()) .' GMT');
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
@@ -150,7 +150,7 @@ function css_send_ie_css($themename, $rev, $etag, $slasharguments) {
function css_send_cached_css($csspath, $etag) {
$lifetime = 60*60*24*60; // 60 days only - the revision may get incremented quite often
header('Etag: '.$etag);
header('Etag: "'.$etag.'"');
header('Content-Disposition: inline; filename="styles.php"');
header('Last-Modified: '. gmdate('D, d M Y H:i:s', filemtime($csspath)) .' GMT');
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
@@ -208,7 +208,7 @@ function css_send_unmodified($lastmodified, $etag) {
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
header('Cache-Control: public, max-age='.$lifetime);
header('Content-Type: text/css; charset=utf-8');
header('Etag: '.$etag);
header('Etag: "'.$etag.'"');
if ($lastmodified) {
header('Last-Modified: '. gmdate('D, d M Y H:i:s', $lastmodified) .' GMT');
}
+30
View File
@@ -1166,5 +1166,35 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2012062506.08);
}
if ($oldversion < 2012062507.01) {
// Fix incorrect cc-nc url. Unfortunately the license 'plugins' do
// not give a mechanism to do this.
$sql = "UPDATE {license}
SET source = :url, version = :newversion
WHERE shortname = :shortname AND version = :oldversion";
$params = array(
'url' => 'http://creativecommons.org/licenses/by-nc/3.0/',
'shortname' => 'cc-nc',
'newversion' => '2013051500',
'oldversion' => '2010033100'
);
$DB->execute($sql, $params);
// Main savepoint reached.
upgrade_main_savepoint(true, 2012062507.01);
}
if ($oldversion < 2012062507.06) {
// Clean up old tokens which haven't been deleted.
$DB->execute("DELETE FROM {user_private_key} WHERE NOT EXISTS
(SELECT 'x' FROM {user} WHERE deleted = 0 AND id = userid)");
// Main savepoint reached.
upgrade_main_savepoint(true, 2012062507.06);
}
return true;
}
+3 -3
View File
@@ -616,8 +616,8 @@ class mssql_native_moodle_database extends moodle_database {
return $sql;
}
// ok, we have verified sql statement with ? and correct number of params
$parts = explode('?', $sql);
$return = array_shift($parts);
$parts = array_reverse(explode('?', $sql));
$return = array_pop($parts);
foreach ($params as $param) {
if (is_bool($param)) {
$return .= (int)$param;
@@ -642,7 +642,7 @@ class mssql_native_moodle_database extends moodle_database {
$return .= "N'$param'";
}
$return .= array_shift($parts);
$return .= array_pop($parts);
}
return $return;
}
+3 -3
View File
@@ -814,8 +814,8 @@ class mysqli_native_moodle_database extends moodle_database {
return $sql;
}
// ok, we have verified sql statement with ? and correct number of params
$parts = explode('?', $sql);
$return = array_shift($parts);
$parts = array_reverse(explode('?', $sql));
$return = array_pop($parts);
foreach ($params as $param) {
if (is_bool($param)) {
$return .= (int)$param;
@@ -829,7 +829,7 @@ class mysqli_native_moodle_database extends moodle_database {
$param = $this->mysqli->real_escape_string($param);
$return .= "'$param'";
}
$return .= array_shift($parts);
$return .= array_pop($parts);
}
return $return;
}
+3 -3
View File
@@ -701,8 +701,8 @@ class sqlsrv_native_moodle_database extends moodle_database {
return $sql;
}
// ok, we have verified sql statement with ? and correct number of params
$parts = explode('?', $sql);
$return = array_shift($parts);
$parts = array_reverse(explode('?', $sql));
$return = array_pop($parts);
foreach ($params as $param) {
if (is_bool($param)) {
$return .= (int)$param;
@@ -722,7 +722,7 @@ class sqlsrv_native_moodle_database extends moodle_database {
$return .= "N'$param'";
}
$return .= array_shift($parts);
$return .= array_pop($parts);
}
return $return;
}
+73 -71
View File
@@ -675,6 +675,9 @@ function file_get_submitted_draft_itemid($elname) {
/**
* Restore the original source field from draft files
*
* Do not use this function because it makes field files.source inconsistent
* for draft area files. This function will be deprecated in 2.6
*
* @param stored_file $storedfile This only works with draft files
* @return stored_file
*/
@@ -735,58 +738,37 @@ function file_save_draft_area_files($draftitemid, $contextid, $component, $filea
$draftfiles = $fs->get_area_files($usercontext->id, 'user', 'draft', $draftitemid, 'id');
$oldfiles = $fs->get_area_files($contextid, $component, $filearea, $itemid, 'id');
if (count($draftfiles) < 2) {
// means there are no files - one file means root dir only ;-)
$fs->delete_area_files($contextid, $component, $filearea, $itemid);
} else if (count($oldfiles) < 2) {
$filecount = 0;
// there were no files before - one file means root dir only ;-)
foreach ($draftfiles as $file) {
$file_record = array('contextid'=>$contextid, 'component'=>$component, 'filearea'=>$filearea, 'itemid'=>$itemid);
if (!$options['subdirs']) {
if ($file->get_filepath() !== '/' or $file->is_directory()) {
continue;
}
}
if ($options['maxbytes'] and $options['maxbytes'] < $file->get_filesize()) {
// oversized file - should not get here at all
continue;
}
if ($options['maxfiles'] != -1 and $options['maxfiles'] <= $filecount) {
// more files - should not get here at all
break;
}
if (!$file->is_directory()) {
$filecount++;
}
if ($file->is_external_file()) {
if (!$allowreferences) {
continue;
}
$repoid = $file->get_repository_id();
if (!empty($repoid)) {
$file_record['repositoryid'] = $repoid;
$file_record['reference'] = $file->get_reference();
}
}
file_restore_source_field_from_draft_file($file);
$fs->create_file_from_storedfile($file_record, $file);
}
} else {
// One file in filearea means it is empty (it has only top-level directory '.').
if (count($draftfiles) > 1 || count($oldfiles) > 1) {
// we have to merge old and new files - we want to keep file ids for files that were not changed
// we change time modified for all new and changed files, we keep time created as is
$newhashes = array();
$filecount = 0;
foreach ($draftfiles as $file) {
if (!$options['subdirs'] && ($file->get_filepath() !== '/' or $file->is_directory())) {
continue;
}
if (!$allowreferences && $file->is_external_file()) {
continue;
}
if (!$file->is_directory()) {
if ($options['maxbytes'] and $options['maxbytes'] < $file->get_filesize()) {
// oversized file - should not get here at all
continue;
}
if ($options['maxfiles'] != -1 and $options['maxfiles'] <= $filecount) {
// more files - should not get here at all
continue;
}
$filecount++;
}
$newhash = $fs->get_pathname_hash($contextid, $component, $filearea, $itemid, $file->get_filepath(), $file->get_filename());
file_restore_source_field_from_draft_file($file);
$newhashes[$newhash] = $file;
}
$filecount = 0;
// Loop through oldfiles and decide which we need to delete and which to update.
// After this cycle the array $newhashes will only contain the files that need to be added.
foreach ($oldfiles as $oldfile) {
$oldhash = $oldfile->get_pathnamehash();
if (!isset($newhashes[$oldhash])) {
@@ -796,6 +778,25 @@ function file_save_draft_area_files($draftitemid, $contextid, $component, $filea
}
$newfile = $newhashes[$oldhash];
// Now we know that we have $oldfile and $newfile for the same path.
// Let's check if we can update this file or we need to delete and create.
if ($newfile->is_directory()) {
// Directories are always ok to just update.
} else if (($source = @unserialize($newfile->get_source())) && isset($source->original)) {
// File has the 'original' - we need to update the file (it may even have not been changed at all).
$original = file_storage::unpack_reference($source->original);
if ($original['filename'] !== $oldfile->get_filename() || $original['filepath'] !== $oldfile->get_filepath()) {
// Very odd, original points to another file. Delete and create file.
$oldfile->delete();
continue;
}
} else {
// The same file name but absence of 'original' means that file was deteled and uploaded again.
// By deleting and creating new file we properly manage all existing references.
$oldfile->delete();
continue;
}
// status changed, we delete old file, and create a new one
if ($oldfile->get_status() != $newfile->get_status()) {
// file was changed, use updated with new timemodified data
@@ -814,8 +815,14 @@ function file_save_draft_area_files($draftitemid, $contextid, $component, $filea
}
// Updated file source
if ($oldfile->get_source() != $newfile->get_source()) {
$oldfile->set_source($newfile->get_source());
// Field files.source for draftarea files contains serialised object with source and original information.
// We only store the source part of it for non-draft file area.
$newsource = $newfile->get_source();
if ($source = @unserialize($newfile->get_source())) {
$newsource = $source->source;
}
if ($oldfile->get_source() !== $newsource) {
$oldfile->set_source($newsource);
}
// Updated sort order
@@ -829,44 +836,31 @@ function file_save_draft_area_files($draftitemid, $contextid, $component, $filea
}
// Replaced file content
if ($oldfile->get_contenthash() != $newfile->get_contenthash() || $oldfile->get_filesize() != $newfile->get_filesize()) {
$oldfile->replace_content_with($newfile);
if (!$oldfile->is_directory() &&
($oldfile->get_contenthash() != $newfile->get_contenthash() ||
$oldfile->get_filesize() != $newfile->get_filesize() ||
$oldfile->get_referencefileid() != $newfile->get_referencefileid() ||
$oldfile->get_userid() != $newfile->get_userid())) {
$oldfile->replace_file_with($newfile);
// push changes to all local files that are referencing this file
$fs->update_references_to_storedfile($oldfile);
}
// unchanged file or directory - we keep it as is
unset($newhashes[$oldhash]);
if (!$oldfile->is_directory()) {
$filecount++;
}
}
// Add fresh file or the file which has changed status
// the size and subdirectory tests are extra safety only, the UI should prevent it
foreach ($newhashes as $file) {
$file_record = array('contextid'=>$contextid, 'component'=>$component, 'filearea'=>$filearea, 'itemid'=>$itemid, 'timemodified'=>time());
if (!$options['subdirs']) {
if ($file->get_filepath() !== '/' or $file->is_directory()) {
continue;
}
}
if ($options['maxbytes'] and $options['maxbytes'] < $file->get_filesize()) {
// oversized file - should not get here at all
continue;
}
if ($options['maxfiles'] != -1 and $options['maxfiles'] <= $filecount) {
// more files - should not get here at all
break;
}
if (!$file->is_directory()) {
$filecount++;
if ($source = @unserialize($file->get_source())) {
// Field files.source for draftarea files contains serialised object with source and original information.
// We only store the source part of it for non-draft file area.
$file_record['source'] = $source->source;
}
if ($file->is_external_file()) {
if (!$allowreferences) {
continue;
}
$repoid = $file->get_repository_id();
if (!empty($repoid)) {
$file_record['repositoryid'] = $repoid;
@@ -1886,7 +1880,7 @@ function file_get_typegroup($element, $groups) {
}
$result = array_merge($result, $cached[$element][$group]);
}
return array_unique($result);
return array_values(array_unique($result));
}
/**
@@ -1962,7 +1956,11 @@ function readfile_accel($file, $mimetype, $accelerate) {
header('Last-Modified: '. gmdate('D, d M Y H:i:s', $lastmodified) .' GMT');
if (is_object($file)) {
header('ETag: ' . $file->get_contenthash());
if (empty($_SERVER['HTTP_RANGE'])) {
// Use Etag only when not byteserving,
// is it tag of this range or whole file?
header('Etag: ' . $file->get_contenthash());
}
if (isset($_SERVER['HTTP_IF_NONE_MATCH']) and $_SERVER['HTTP_IF_NONE_MATCH'] === $file->get_contenthash()) {
header('HTTP/1.1 304 Not Modified');
return;
@@ -2612,6 +2610,10 @@ function byteserving_send_file($handle, $mimetype, $ranges, $filesize) {
// better turn off any kind of compression and buffering
@ini_set('zlib.output_compression', 'Off');
// Remove Etag because is is not strictly defined for byteserving,
// is it tag of this range or whole file?
header_remove('Etag');
$chunksize = 1*(1024*1024); // 1MB chunks - must be less than 2MB!
if ($handle === false) {
die;
+34
View File
@@ -210,6 +210,40 @@ class stored_file {
$this->set_filesize($storedfile->get_filesize());
}
/**
* Replaces the fields that might have changed when file was overriden in filepicker:
* reference, contenthash, filesize, userid
*
* Note that field 'source' must be updated separately because
* it has different format for draft and non-draft areas and
* this function will usually be used to replace non-draft area
* file with draft area file.
*
* @param stored_file $newfile
* @throws coding_exception
*/
public function replace_file_with(stored_file $newfile) {
if ($newfile->get_referencefileid() &&
$this->fs->get_references_count_by_storedfile($this)) {
// The new file is a reference.
// The current file has other local files referencing to it.
// Double reference is not allowed.
throw new moodle_exception('errordoublereference', 'repository');
}
$filerecord = new stdClass;
$contenthash = $newfile->get_contenthash();
if ($this->fs->content_exists($contenthash)) {
$filerecord->contenthash = $contenthash;
} else {
throw new file_exception('storedfileproblem', 'Invalid contenthash, content must be already in filepool', $contenthash);
}
$filerecord->filesize = $newfile->get_filesize();
$filerecord->referencefileid = $newfile->get_referencefileid();
$filerecord->userid = $newfile->get_userid();
$this->update($filerecord);
}
/**
* Unlink the stored file from the referenced file
*
+3 -5
View File
@@ -1079,11 +1079,9 @@ abstract class moodleform {
$params = array_merge(array($realelementname), $params);
call_user_func_array(array(&$mform, 'addRule'), $params);
break;
case 'type' :
//Type should be set only once
if (!isset($mform->_types[$elementname])) {
$mform->setType($elementname, $params);
}
case 'type':
$mform->setType($realelementname, $params);
break;
}
}
+2 -2
View File
@@ -36,7 +36,7 @@ function js_send_cached($jspath, $etag, $filename = 'javascript.php') {
$lifetime = 60*60*24*60; // 60 days only - the revision may get incremented quite often
header('Etag: '.$etag);
header('Etag: "'.$etag.'"');
header('Content-Disposition: inline; filename="'.$filename.'"');
header('Last-Modified: '. gmdate('D, d M Y H:i:s', filemtime($jspath)) .' GMT');
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
@@ -86,7 +86,7 @@ function js_send_unmodified($lastmodified, $etag) {
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
header('Cache-Control: public, max-age='.$lifetime);
header('Content-Type: application/javascript; charset=utf-8');
header('Etag: '.$etag);
header('Etag: "'.$etag.'"');
if ($lastmodified) {
header('Last-Modified: '. gmdate('D, d M Y H:i:s', $lastmodified) .' GMT');
}
+2 -2
View File
@@ -192,9 +192,9 @@ class license_manager {
$license->shortname = 'cc-nc';
$license->fullname = 'Creative Commons - No Commercial';
$license->source = 'http://creativecommons.org/licenses/by-nd/3.0/';
$license->source = 'http://creativecommons.org/licenses/by-nc/3.0/';
$license->enabled = 1;
$license->version = '2010033100';
$license->version = '2013051500';
$active_licenses[] = $license->shortname;
self::add($license);
+17 -3
View File
@@ -4031,6 +4031,9 @@ function delete_user(stdClass $user) {
// unauthorise the user for all services
$DB->delete_records('external_services_users', array('userid'=>$user->id));
// Remove users private keys.
$DB->delete_records('user_private_key', array('userid' => $user->id));
// force logout - may fail if file based sessions used, sorry
session_kill_user($user->id);
@@ -9404,9 +9407,10 @@ function format_float($float, $decimalpoints=1, $localized=true, $stripzeros=fal
* Do NOT try to do any math operations before this conversion on any user submitted floats!
*
* @param string $locale_float locale aware float representation
* @return float
* @param bool $strict If true, then check the input and return false if it is not a valid number.
* @return mixed float|bool - false or the parsed float.
*/
function unformat_float($locale_float) {
function unformat_float($locale_float, $strict = false) {
$locale_float = trim($locale_float);
if ($locale_float == '') {
@@ -9414,8 +9418,13 @@ function unformat_float($locale_float) {
}
$locale_float = str_replace(' ', '', $locale_float); // no spaces - those might be used as thousand separators
$locale_float = str_replace(get_string('decsep', 'langconfig'), '.', $locale_float);
return (float)str_replace(get_string('decsep', 'langconfig'), '.', $locale_float);
if ($strict && !is_numeric($locale_float)) {
return false;
}
return (float)$locale_float;
}
/**
@@ -10337,6 +10346,11 @@ function get_performance_info() {
$info['html'] .= '<span class="included">Included '.$info['includecount'].' files</span> ';
$info['txt'] .= 'includecount: '.$info['includecount'].' ';
if (!empty($CFG->early_install_lang) or empty($PAGE)) {
// We can not track more performance before installation or before PAGE init, sorry.
return $info;
}
$filtermanager = filter_manager::instance();
if (method_exists($filtermanager, 'get_performance_summary')) {
list($filterinfo, $nicenames) = $filtermanager->get_performance_summary();
+12 -6
View File
@@ -579,7 +579,7 @@ class navigation_node implements renderable {
public function find_expandable(array &$expandable) {
foreach ($this->children as &$child) {
if ($child->nodetype == self::NODETYPE_BRANCH && $child->children->count() == 0 && $child->display) {
$child->id = 'expandable_branch_'.(count($expandable)+1);
$child->id = 'expandable_branch_'.$child->type.'_'.clean_param($child->key, PARAM_ALPHANUMEXT);
$this->add_class('canexpand');
$expandable[] = array('id' => $child->id, 'key' => $child->key, 'type' => $child->type);
}
@@ -889,8 +889,9 @@ class navigation_node_collection implements IteratorAggregate {
$child = $this->get($key, $type);
if ($child !== false) {
foreach ($this->collection as $colkey => $node) {
if ($node->key == $key && $node->type == $type) {
if ($node->key === $key && $node->type == $type) {
unset($this->collection[$colkey]);
$this->collection = array_values($this->collection);
break;
}
}
@@ -3582,7 +3583,7 @@ class settings_navigation extends navigation_node {
$coursenode->force_open();
}
if (has_capability('moodle/course:update', $coursecontext)) {
if ($this->page->user_allowed_editing()) {
// Add the turn on/off settings
if ($this->page->url->compare(new moodle_url('/course/view.php'), URL_MATCH_BASE)) {
@@ -3605,8 +3606,9 @@ class settings_navigation extends navigation_node {
$coursenode->add($editstring, $editurl, self::TYPE_SETTING, null, null, new pix_icon('i/edit', ''));
// Add the module chooser toggle
$modchoosertoggleurl = clone($baseurl);
if ($this->page->user_is_editing() && course_ajax_enabled($course)) {
if ($this->page->user_is_editing() && has_capability('moodle/course:manageactivities', $coursecontext)
&& course_ajax_enabled($course)) {
$modchoosertoggleurl = clone($baseurl);
if ($usemodchooser = get_user_preferences('usemodchooser', $CFG->modchooserdefault)) {
$modchoosertogglestring = get_string('modchooserdisable', 'moodle');
$modchoosertoggleurl->param('modchooser', 'off');
@@ -3619,7 +3621,9 @@ class settings_navigation extends navigation_node {
$modchoosertoggle->add_class('visibleifjs');
user_preference_allow_ajax_update('usemodchooser', PARAM_BOOL);
}
}
if (has_capability('moodle/course:update', $coursecontext)) {
if ($this->page->user_is_editing()) {
// Removed as per MDL-22732
// $this->add_course_editing_links($course);
@@ -4381,7 +4385,7 @@ class settings_navigation extends navigation_node {
}
$frontpage->id = 'frontpagesettings';
if (has_capability('moodle/course:update', $coursecontext)) {
if ($this->page->user_allowed_editing()) {
// Add the turn on/off settings
$url = new moodle_url('/course/view.php', array('id'=>$course->id, 'sesskey'=>sesskey()));
@@ -4393,7 +4397,9 @@ class settings_navigation extends navigation_node {
$editstring = get_string('turneditingon');
}
$frontpage->add($editstring, $url, self::TYPE_SETTING, null, null, new pix_icon('i/edit', ''));
}
if (has_capability('moodle/course:update', $coursecontext)) {
// Add the course settings link
$url = new moodle_url('/admin/settings.php', array('section'=>'frontpagesettings'));
$frontpage->add(get_string('editsettings'), $url, self::TYPE_SETTING, null, null, new pix_icon('i/settings', ''));
+4 -1
View File
@@ -483,7 +483,10 @@ class theme_config {
$this->rarrow = '&#x25B6;';
$this->larrow = '&#x25C0;';
}
elseif (false !== strpos($uagent, 'Konqueror')) {
elseif ((false !== strpos($uagent, 'Konqueror'))
|| (false !== strpos($uagent, 'Android'))) {
// The fonts on Android don't include the characters required for this to work as expected.
// So we use the same ones Konqueror uses.
$this->rarrow = '&rarr;';
$this->larrow = '&larr;';
}
+1 -1
View File
@@ -821,7 +821,7 @@ class portfolio_exporter {
if ($f->get_filename() == $skipfile) {
continue;
}
$returnfiles[$f->get_filepath() . '/' . $f->get_filename()] = $f;
$returnfiles[$f->get_filepath() . $f->get_filename()] = $f;
}
return $returnfiles;
}
+1 -1
View File
@@ -269,7 +269,7 @@ function rss_standard_header($title = NULL, $link = NULL, $description = NULL) {
$result .= rss_full_tag('language', 2, false, substr($USER->lang,0,2));
}
$today = getdate();
$result .= rss_full_tag('copyright', 2, false, '&#169; '. $today['year'] .' '. format_string($site->fullname));
$result .= rss_full_tag('copyright', 2, false, '(c) '. $today['year'] .' '. format_string($site->fullname));
/*
if (!empty($USER->email)) {
$result .= rss_full_tag('managingEditor', 2, false, fullname($USER));
+91
View File
@@ -0,0 +1,91 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Completion lib advanced test case.
*
* This file contains the advanced test suite for completion lib.
*
* @package core_completion
* @category phpunit
* @copyright 2013 Frédéric Massart
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->libdir.'/completionlib.php');
class completionlib_advanced_testcase extends advanced_testcase {
function test_get_activities() {
global $DB;
$this->resetAfterTest(true);
// Create a course with mixed auto completion data.
$course = $this->getDataGenerator()->create_course();
$completionauto = array('completion' => COMPLETION_TRACKING_AUTOMATIC);
$completionmanual = array('completion' => COMPLETION_TRACKING_MANUAL);
$completionnone = array('completion' => COMPLETION_TRACKING_NONE);
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id), $completionauto);
$page = $this->getDataGenerator()->create_module('page', array('course' => $course->id), $completionauto);
$data = $this->getDataGenerator()->create_module('data', array('course' => $course->id), $completionmanual);
$forum2 = $this->getDataGenerator()->create_module('forum', array('course' => $course->id), $completionnone);
$page2 = $this->getDataGenerator()->create_module('page', array('course' => $course->id), $completionnone);
$data2 = $this->getDataGenerator()->create_module('data', array('course' => $course->id), $completionnone);
// Create data in another course to make sure it's not considered.
$course2 = $this->getDataGenerator()->create_course();
$c2forum = $this->getDataGenerator()->create_module('forum', array('course' => $course2->id), $completionauto);
$c2page = $this->getDataGenerator()->create_module('page', array('course' => $course2->id), $completionmanual);
$c2data = $this->getDataGenerator()->create_module('data', array('course' => $course2->id), $completionnone);
$c = new completion_info($course);
$activities = $c->get_activities();
$this->assertEquals(3, count($activities));
$this->assertTrue(isset($activities[$forum->cmid]));
$this->assertEquals($activities[$forum->cmid]->name, $forum->name);
$this->assertTrue(isset($activities[$page->cmid]));
$this->assertEquals($activities[$page->cmid]->name, $page->name);
$this->assertTrue(isset($activities[$data->cmid]));
$this->assertEquals($activities[$data->cmid]->name, $data->name);
$this->assertFalse(isset($activities[$forum2->cmid]));
$this->assertFalse(isset($activities[$page2->cmid]));
$this->assertFalse(isset($activities[$data2->cmid]));
}
function test_has_activities() {
global $DB;
$this->resetAfterTest(true);
// Create a course with mixed auto completion data.
$course = $this->getDataGenerator()->create_course();
$course2 = $this->getDataGenerator()->create_course();
$completionauto = array('completion' => COMPLETION_TRACKING_AUTOMATIC);
$completionnone = array('completion' => COMPLETION_TRACKING_NONE);
$c1forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id), $completionauto);
$c2forum = $this->getDataGenerator()->create_module('forum', array('course' => $course2->id), $completionnone);
$c1 = new completion_info($course);
$c2 = new completion_info($course2);
$this->assertTrue($c1->has_activities());
$this->assertFalse($c2->has_activities());
}
}
-25
View File
@@ -514,31 +514,6 @@ WHERE
$c->internal_set_data($cm, $data);
}
function test_get_activities() {
global $DB;
$c = new completion_info((object)array('id'=>42));
// Try with no activities
$DB->expects($this->at(0))
->method('get_records_select')
->with('course_modules', 'course=42 AND completion<>'.COMPLETION_TRACKING_NONE)
->will($this->returnValue(array()));
$result = $c->get_activities();
$this->assertEquals(array(), $result);
// Try with an activity (need to fake up modinfo for it as well)
$DB->expects($this->at(0))
->method('get_records_select')
->with('course_modules', 'course=42 AND completion<>'.COMPLETION_TRACKING_NONE)
->will($this->returnValue(array(13=>(object)array('id'=>13))));
$modinfo = new stdClass;
$modinfo->sections = array(array(1, 2, 3), array(12, 13, 14));
$modinfo->cms[13] = (object)array('modname'=>'frog', 'name'=>'kermit');
$result = $c->get_activities($modinfo);
$this->assertEquals(array(13=>(object)array('id'=>13, 'modname'=>'frog', 'name'=>'kermit')), $result);
}
// get_tracked_users() cannot easily be tested because it uses
// get_role_users, so skipping that
+45
View File
@@ -0,0 +1,45 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Moodle environment test.
*
* @package core
* @category phpunit
* @copyright 2013 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Do standard environment.xml tests.
*/
class environment_testcase extends advanced_testcase {
public function test_environment() {
global $CFG;
require_once($CFG->libdir.'/environmentlib.php');
list($envstatus, $environment_results) = check_moodle_environment(normalize_version($CFG->release), ENV_SELECT_RELEASE);
$this->assertNotEmpty($envstatus);
foreach ($environment_results as $environment_result) {
$this->assertTrue($environment_result->getStatus(), "Problem detected in environment ($environment_result->part:$environment_result->info), fix all warnings and errors!");
}
}
}
+75
View File
@@ -226,6 +226,24 @@ class formslib_testcase extends basic_testcase {
'xyz' => PARAM_RAW
),
1 => PARAM_INT
),
'repeatgroupel1' => array(
0 => PARAM_INT,
1 => PARAM_INT
),
'repeatgroupel2' => array(
0 => PARAM_INT,
1 => PARAM_INT
),
'repeatnamedgroup' => array(
0 => array(
'repeatnamedgroupel1' => PARAM_INT,
'repeatnamedgroupel2' => PARAM_INT
),
1 => array(
'repeatnamedgroupel1' => PARAM_INT,
'repeatnamedgroupel2' => PARAM_INT
)
)
);
$valuessubmitted = array(
@@ -262,6 +280,24 @@ class formslib_testcase extends basic_testcase {
'xyz' => '11.01'
),
1 => '11.01'
),
'repeatgroupel1' => array(
0 => '11.01',
1 => '11.01'
),
'repeatgroupel2' => array(
0 => '11.01',
1 => '11.01'
),
'repeatnamedgroup' => array(
0 => array(
'repeatnamedgroupel1' => '11.01',
'repeatnamedgroupel2' => '11.01'
),
1 => array(
'repeatnamedgroupel1' => '11.01',
'repeatnamedgroupel2' => '11.01'
)
)
);
$expectedvalues = array(
@@ -300,6 +336,26 @@ class formslib_testcase extends basic_testcase {
'xyz' => '11.01'
),
1 => 11
),
'repeatablegroup' => 2,
'repeatgroupel1' => array(
0 => 11,
1 => 11
),
'repeatgroupel2' => array(
0 => 11,
1 => 11
),
'repeatablenamedgroup' => 2,
'repeatnamedgroup' => array(
0 => array(
'repeatnamedgroupel1' => 11,
'repeatnamedgroupel2' => 11
),
1 => array(
'repeatnamedgroupel1' => 11,
'repeatnamedgroupel2' => 11
)
)
);
@@ -342,6 +398,7 @@ class formslib_test_form extends moodleform {
}
}
// Used to check value cleaning.
class formslib_clean_value extends moodleform {
public function get_form() {
return $this->_form;
@@ -407,5 +464,23 @@ class formslib_clean_value extends moodleform {
$mform->addElement('text', 'nested[1]', 'nested[1]');
$mform->addElement('text', 'nested[0][xyz]', 'nested[0][xyz]');
$mform->addElement('text', 'nested[0][bob][foo]', 'nested[0][bob][foo]');
// Add group in repeated element (with extra inheritance).
$groupelements = array(
$mform->createElement('text', 'repeatgroupel1', 'repeatgroupel1'),
$mform->createElement('text', 'repeatgroupel2', 'repeatgroupel2')
);
$group = $mform->createElement('group', 'repeatgroup', 'repeatgroup', $groupelements, null, false);
$this->repeat_elements(array($group), 2, array('repeatgroupel1' => array('type' => PARAM_INT),
'repeatgroupel2' => array('type' => PARAM_INT)), 'repeatablegroup', 'add', 0);
// Add named group in repeated element.
$groupelements = array(
$mform->createElement('text', 'repeatnamedgroupel1', 'repeatnamedgroupel1'),
$mform->createElement('text', 'repeatnamedgroupel2', 'repeatnamedgroupel2')
);
$group = $mform->createElement('group', 'repeatnamedgroup', 'repeatnamedgroup', $groupelements, null, true);
$this->repeat_elements(array($group), 2, array('repeatnamedgroup[repeatnamedgroupel1]' => array('type' => PARAM_INT),
'repeatnamedgroup[repeatnamedgroupel2]' => array('type' => PARAM_INT)), 'repeatablenamedgroup', 'add', 0);
}
}
+99 -12
View File
@@ -83,6 +83,29 @@ class moodlelib_testcase extends advanced_testcase {
)
);
/**
* Define a local decimal separator.
*
* It is not possible to directly change the result of get_string in
* a unit test. Instead, we create a language pack for language 'xx' in
* dataroot and make langconfig.php with the string we need to change.
* The example separator used here is 'X'; on PHP 5.3 and before this
* must be a single byte character due to PHP bug/limitation in
* number_format, so you can't use UTF-8 characters.
*
* @global type $SESSION
* @global type $CFG
*/
protected function define_local_decimal_separator() {
global $SESSION, $CFG;
$SESSION->lang = 'xx';
$langconfig = "<?php\n\$string['decsep'] = 'X';";
$langfolder = $CFG->dataroot . '/lang/xx';
check_dir_exists($langfolder);
file_put_contents($langfolder . '/langconfig.php', $langconfig);
}
function test_cleanremoteaddr() {
//IPv4
$this->assertEquals(cleanremoteaddr('1023.121.234.1'), null);
@@ -2119,7 +2142,6 @@ class moodlelib_testcase extends advanced_testcase {
* Test localised float formatting.
*/
public function test_format_float() {
global $SESSION, $CFG;
// Special case for null
$this->assertEquals('', format_float(null));
@@ -2135,17 +2157,8 @@ class moodlelib_testcase extends advanced_testcase {
$this->assertEquals('5.43', format_float(5.43, 5, true, true));
$this->assertEquals('5', format_float(5.0001, 3, true, true));
// It is not possible to directly change the result of get_string in
// a unit test. Instead, we create a language pack for language 'xx' in
// dataroot and make langconfig.php with the string we need to change.
// The example separator used here is 'X'; on PHP 5.3 and before this
// must be a single byte character due to PHP bug/limitation in
// number_format, so you can't use UTF-8 characters.
$SESSION->lang = 'xx';
$langconfig = "<?php\n\$string['decsep'] = 'X';";
$langfolder = $CFG->dataroot . '/lang/xx';
check_dir_exists($langfolder);
file_put_contents($langfolder . '/langconfig.php', $langconfig);
// Tests with a localised decimal separator.
$this->define_local_decimal_separator();
// Localisation on (default)
$this->assertEquals('5X43000', format_float(5.43, 5));
@@ -2156,6 +2169,80 @@ class moodlelib_testcase extends advanced_testcase {
$this->assertEquals('5.43', format_float(5.43, 5, false, true));
}
/**
* Test localised float unformatting.
*/
public function test_unformat_float() {
// Tests without the localised decimal separator.
// Special case for null, empty or white spaces only strings.
$this->assertEquals(null, unformat_float(null));
$this->assertEquals(null, unformat_float(''));
$this->assertEquals(null, unformat_float(' '));
// Regular use.
$this->assertEquals(5.4, unformat_float('5.4'));
$this->assertEquals(5.4, unformat_float('5.4', true));
// No decimal.
$this->assertEquals(5.0, unformat_float('5'));
// Custom number of decimal.
$this->assertEquals(5.43267, unformat_float('5.43267'));
// Empty decimal.
$this->assertEquals(100.0, unformat_float('100.00'));
// With the thousand separator.
$this->assertEquals(1000.0, unformat_float('1 000'));
$this->assertEquals(1000.32, unformat_float('1 000.32'));
// Negative number.
$this->assertEquals(-100.0, unformat_float('-100'));
// Wrong value.
$this->assertEquals(0.0, unformat_float('Wrong value'));
// Wrong value in strict mode.
$this->assertFalse(unformat_float('Wrong value', true));
// Combining options.
$this->assertEquals(-1023.862567, unformat_float(' -1 023.862567 '));
// Bad decimal separator (should crop the decimal).
$this->assertEquals(50.0, unformat_float('50,57'));
// Bad decimal separator in strict mode (should return false).
$this->assertFalse(unformat_float('50,57', true));
// Tests with a localised decimal separator.
$this->define_local_decimal_separator();
// We repeat the tests above but with the current decimal separator.
// Regular use without and with the localised separator.
$this->assertEquals (5.4, unformat_float('5.4'));
$this->assertEquals (5.4, unformat_float('5X4'));
// Custom number of decimal.
$this->assertEquals (5.43267, unformat_float('5X43267'));
// Empty decimal.
$this->assertEquals (100.0, unformat_float('100X00'));
// With the thousand separator.
$this->assertEquals (1000.32, unformat_float('1 000X32'));
// Bad different separator (should crop the decimal).
$this->assertEquals (50.0, unformat_float('50Y57'));
// Bad different separator in strict mode (should return false).
$this->assertFalse (unformat_float('50Y57', true));
// Combining options.
$this->assertEquals (-1023.862567, unformat_float(' -1 023X862567 '));
// Combining options in strict mode.
$this->assertEquals (-1023.862567, unformat_float(' -1 023X862567 ', true));
}
/**
* Test deleting of users.
*/
+18
View File
@@ -60,6 +60,8 @@ class navigation_node_testcase extends basic_testcase {
$this->node = new navigation_node('Test Node');
$this->node->type = navigation_node::TYPE_SYSTEM;
// We add the first child without key. This way we make sure all keys search by comparision is performed using ===
$this->node->add('first child without key', null, navigation_node::TYPE_CUSTOM);
$demo1 = $this->node->add('demo1', $this->inactiveurl, navigation_node::TYPE_COURSE, null, 'demo1', new pix_icon('i/course', ''));
$demo2 = $this->node->add('demo2', $this->inactiveurl, navigation_node::TYPE_COURSE, null, 'demo2', new pix_icon('i/course', ''));
$demo3 = $this->node->add('demo3', $this->inactiveurl, navigation_node::TYPE_CATEGORY, null, 'demo3',new pix_icon('i/course', ''));
@@ -251,8 +253,24 @@ class navigation_node_testcase extends basic_testcase {
$this->assertInstanceOf('navigation_node', $this->node->get('remove2'));
$this->assertInstanceOf('navigation_node', $remove2->get('remove3'));
// Remove element and make sure this is no longer a child.
$this->assertTrue($remove1->remove());
$this->assertFalse($this->node->get('remove1'));
$this->assertFalse(in_array('remove1', $this->node->get_children_key_list(), true));
// Make sure that we can insert element after removal
$insertelement = navigation_node::create('extra element 4', null, navigation_node::TYPE_CUSTOM, null, 'element4');
$this->node->add_node($insertelement, 'remove2');
$this->assertNotEmpty($this->node->get('element4'));
// Remove more elements
$this->assertTrue($this->node->get('remove2')->remove());
$this->assertFalse($this->node->get('remove2'));
// Make sure that we can add element after removal
$this->node->add('extra element 5', null, navigation_node::TYPE_CUSTOM, null, 'element5');
$this->assertNotEmpty($this->node->get('element5'));
$this->assertTrue($remove2->get('remove3')->remove());
$this->assertFalse($this->node->get('remove1'));
+14 -4
View File
@@ -43,14 +43,18 @@ class moodlesimplepie_testcase extends basic_testcase {
const INVALIDURL = 'http://download.moodle.org/unittest/rsstest-which-doesnt-exist.xml';
# This tinyurl redirects to th rsstest.xml file
const REDIRECTURL = 'http://tinyurl.com/lvyslv';
# The number of seconds tests should wait for the server to respond (high to prevent false positives).
const TIMEOUT = 10;
function setUp() {
moodle_simplepie::reset_cache();
}
function test_getfeed() {
$feed = new moodle_simplepie(self::VALIDURL);
$feed = new moodle_simplepie();
$feed->set_timeout(self::TIMEOUT);
$feed->set_feed_url(self::VALIDURL);
$feed->init();
$this->assertInstanceOf('moodle_simplepie', $feed);
$this->assertNull($feed->error(), "Failed to load the sample RSS file. Please check your proxy settings in Moodle. %s");
@@ -108,7 +112,10 @@ EOD;
* Test retrieving a url which doesn't exist
*/
function test_failurl() {
$feed = @new moodle_simplepie(self::INVALIDURL); // we do not want this in php error log
$feed = new moodle_simplepie();
$feed->set_timeout(self::TIMEOUT);
$feed->set_feed_url(self::INVALIDURL);
@$feed->init(); // We do not want this in php error log.
$this->assertNotEmpty($feed->error());
}
@@ -135,7 +142,10 @@ EOD;
function test_redirect() {
global $CFG;
$feed = new moodle_simplepie(self::REDIRECTURL);
$feed = new moodle_simplepie();
$feed->set_timeout(self::TIMEOUT);
$feed->set_feed_url(self::REDIRECTURL);
$feed->init();
$this->assertNull($feed->error());
$this->assertEquals($feed->get_title(), 'Moodle News');
+6
View File
@@ -68,6 +68,12 @@ function xsendfile($filepath) {
}
}
// Remove Etag because is is not strictly defined for byteserving,
// is it tag of this range or whole file?
if (!empty($_SERVER['HTTP_RANGE'])) {
header_remove('Etag');
}
if ($CFG->xsendfile === 'X-LIGHTTPD-send-file') {
// http://redmine.lighttpd.net/projects/lighttpd/wiki/X-LIGHTTPD-send-file says 1.4 it does not support byteserving
header('Accept-Ranges: none');
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More