Compare commits

...

311 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) f0d8c53ae0 Moodle release 2.3.7 2013-05-13 12:37:12 +02:00
Eloy Lafuente (stronk7) f26acbbf5b Merge branch 'MDL-39642-en_fix-23' of git://github.com/mudrd8mz/moodle into MOODLE_23_STABLE 2013-05-13 11:53:25 +02:00
Helen Foster 25dba50b9d MDL-39642 Merge English strings from the en_fix language pack 2013-05-13 11:34:34 +02:00
Eloy Lafuente (stronk7) c9827a9135 weekly release 2.3.6+ 2013-05-10 17:33:28 +02:00
Eloy Lafuente (stronk7) 13a322f4b6 Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2013-05-10 17:18:12 +02:00
Eloy Lafuente (stronk7) 2e97c22310 Merge branch 'MDL-39518-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2013-05-10 13:18:18 +02:00
Damyon Wiese 05933e48dc MDL-39518: Change hardcoded string MOOCH to Moodle.net 2013-05-10 14:26:10 +08:00
Sam Hemelryk a2d06016f4 Merge branch 'MDL-39488_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2013-05-10 16:30:29 +12:00
Rossiani Wijaya c0f177f19c MDL-39488: Lesson Module: Fixed the potential variable overwritting for answers 2013-05-10 11:17:46 +08:00
Damyon Wiese 4a727367e7 Merge branch 'MDL-39535_m23' of https://github.com/markn86/moodle into MOODLE_23_STABLE 2013-05-10 10:38:37 +08:00
Eloy Lafuente (stronk7) f6735ae534 Merge branch 'MDL-38885-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2013-05-10 03:17:55 +02:00
Eloy Lafuente (stronk7) 48265a6549 Merge branch 'MDL-29758_23' of git://github.com/jmvedrine/moodle into MOODLE_23_STABLE 2013-05-10 02:54:33 +02:00
Frederic Massart e4e1bd900a MDL-38885 form: Fix comments and stricter unit test 2013-05-10 08:38:02 +08:00
Eloy Lafuente (stronk7) 6185fa79e7 Merge branch 'MDL-39488_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2013-05-09 15:49:33 +02:00
Jean-Michel Vedrine ccc0b20a8f MDL-29758 make Cloze question feedback display more informative
as it was in Moodle 1.9
2013-05-09 09:06:15 +02:00
Frederic Massart ee87608e1a MDL-38885 form: Unit tests for data cleaning 2013-05-09 14:10:56 +08:00
Frederic Massart cc2fb80742 MDL-38885 form: Recursively clean parameters based on right type 2013-05-09 14:10:55 +08:00
AMOS bot 50269914ce Automatically generated installer lang files 2013-05-09 00:37:31 +00:00
Jerome Mouneyrac be6281e2cb MDL-37822 fix checkboxes that were always set to on by default 2013-05-09 02:09:04 +02:00
Jerome Mouneyrac 1fc34e37fd MDL-37822 move the default code above the set_config to not make the code less confusing 2013-05-09 02:09:04 +02:00
Jerome Mouneyrac 667eaec4d2 MDL-37822 Moodle send site information to a hub even though it's unchecked 2013-05-09 02:09:04 +02:00
Eloy Lafuente (stronk7) 7f8cc6f777 Merge branch 'MDL-38487_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-05-09 00:55:28 +02:00
Damyon Wiese ce3fa5931d Merge branch 'MDL-31193-23' of git://github.com/mouneyrac/moodle into MOODLE_23_STABLE 2013-05-08 15:28:24 +08:00
Rajesh Taneja 8aa12adcf2 MDL-37245 Blog: Bloglevel is used for checking if blog is enabled 2013-05-08 14:54:27 +08:00
Rossiani Wijaya b26066bf68 MDL-39488 Lesson Module: Improve code performance 2013-05-08 13:49:41 +08:00
Rossiani Wijaya 9705bfa84f MDL-39488 Lesson Module: Fixed PHP error matching question,
if one or more options have not been selected.
2013-05-08 13:49:41 +08:00
Joseph Rézeau 152a040acd MDL-39488 Lesson Module: Fix for "Match question throws PHP error if one or more options have not been selected "
Signed-off-by: Joseph Rézeau <moodle@rezeau.org>
2013-05-08 13:49:30 +08:00
Damyon Wiese 6f9e83e892 Merge branch 'MDL-37552-23' of git://github.com/mouneyrac/moodle into MOODLE_23_STABLE 2013-05-08 12:44:46 +08:00
Andrew Davis bf5f227817 MDL-37475 core_grade:fixed the handling of show totals 2013-05-08 10:35:25 +12:00
Mark Nielsen 700b5b679e MDL-32301: Allow instructor custom parameters for LTI tools 2013-05-07 21:59:49 +02:00
Eloy Lafuente (stronk7) c6b1ff865f Merge branch 'MDL-34275-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2013-05-07 19:14:19 +02:00
Dan Poltawski 0edd01e943 Merge branch 'MDL-36223-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE 2013-05-07 15:28:42 +01:00
Rajesh Taneja 4b5dcd72d5 MDL-37245 Blog: Fixed comments.
Conflicts:

	blog/lib.php

Signed-off-by: Rajesh Taneja <rajesh@moodle.com>

Conflicts:

	blog/lib.php
2013-05-07 14:58:34 +01:00
Rajesh Taneja 28772fb9e7 MDL-37245 Blog: Added permission check for blog comments
Conflicts:

	blog/index.php

Signed-off-by: Rajesh Taneja <rajesh@moodle.com>
2013-05-07 14:58:34 +01:00
Dan Poltawski 14b536dd6f Merge branch 'MDL-38500-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2013-05-07 11:54:32 +01:00
Jerome Mouneyrac d270524855 MDL-37552 external_format_text: missing require_once filelib.php (shared credits to Adam Fredericks for report and patch proposal) 2013-05-07 17:59:07 +08:00
Rex Lorenzo ee439acb1e MDL-34275 - Use default copyright license when restoring files 2013-05-07 09:10:23 +01:00
Damyon Wiese b8401ee7ac Merge branch 'MDL-31713_override_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2013-05-07 15:31:41 +08:00
Mark Nelson 955a081e3a MDL-39535 grade: only display grade errors once 2013-05-07 15:14:36 +08:00
Andrew Davis a035b96fd5 MDL-31713 core_grade: added updating of grade min and max to update_final_grade() 2013-05-07 12:27:39 +08:00
Maria Torres 55157bfc2e MDL-39169: Now the question's tags are added in backup/restore options 2013-05-06 15:44:18 +01:00
Damyon Wiese fc282e4ab3 Merge branch 'MDL-38315-m23' of git://github.com/sammarshallou/moodle into MOODLE_23_STABLE 2013-05-06 22:06:01 +08:00
Dan Poltawski 3565867b4f Merge branch 'MDL-39446_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-05-06 14:48:23 +01:00
Dan Poltawski 100da2dcfb Merge branch 'MDL-39491-workshop-media_23' of git://github.com/mudrd8mz/moodle into MOODLE_23_STABLE 2013-05-06 13:12:23 +01:00
Damyon Wiese b4eeee49cd MDL-38443 Assignment: Missing permissions check on downloadall submissions 2013-05-06 10:21:18 +01:00
Damyon Wiese ed8772d0f5 Merge branch 'MDL-39445_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-05-06 15:17:00 +08:00
AMOS bot 6679bfdbd3 Automatically generated installer lang files 2013-05-06 00:40:38 +00:00
Dan Poltawski 6d28ff14f0 Merge branch 'brokencalc_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2013-05-05 11:30:40 +01:00
AMOS bot b67bb742a0 Automatically generated installer lang files 2013-05-04 00:40:13 +00:00
David Mudrák b908e2fcd9 MDL-39491 Fix order of Workshop submission text processing
The order of format_text() and file_rewrite_pluginfile_urls() is
important to make filters work correctly.
2013-05-03 12:01:18 +02:00
Jerome Mouneyrac fc9fedb375 MDL-31193 display the correct and translated token valid until date 2013-05-03 14:17:15 +08:00
Tim Hunt c8c3599cf4 MDL-39446 calculated qtype: make answer formula input bigger
This makes it easier for teachers editing questions.
2013-05-02 15:47:44 +01:00
Tim Hunt 0fabc84119 MDL-39445 get_plugin_list clean_param use is slow
get_plugin_list was calling clean_param($pluginname, PARAM_PLUGIN) a
lot (600+ times per page), and that is much slower than you would guess.
A specific function for this case, (which we then also use from
clean_param) is a performance win.
2013-05-02 15:47:08 +01:00
Tim Hunt c5602897c1 MDL-38487 qtype match restore: problem with blank ids.
As it happens, this field is useless, and has been removed from the DB
in 2.5. Therefore, we only need a work-around for stable branches.
2013-05-02 15:46:46 +01:00
Dan Poltawski 70d7e35499 weekly release 2.3.6+ 2013-05-02 14:36:56 +01:00
Dan Poltawski 76645b7e6c Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2013-05-02 14:32:32 +01:00
Damyon Wiese 6f0a4b8f24 Merge branch 'MDL-30775-23' of git://github.com/mouneyrac/moodle into MOODLE_23_STABLE 2013-05-02 16:22:48 +08:00
Damyon Wiese 53095b7ebe MDL-36223 Assign: User outline report grade display
Use str_long_grade for user outline report because it handles scales and
no grade.

Thanks to Jean-Daniel Descoteaux for suggesting this fix.
2013-05-02 15:48:09 +08:00
Andrew Davis abd110f8f9 MDL-32913 core_grade:made it more obvious when the gradebook is broken due to a broken calculation 2013-05-02 09:23:36 +08:00
AMOS bot ff198ea740 Automatically generated installer lang files 2013-05-02 00:38:16 +00:00
Eloy Lafuente (stronk7) c738cc946f Merge branch 'MDL-39444_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-05-01 16:54:06 +02:00
Tim Hunt 6137bc9ca2 MDL-39444 get_string: remove unnecessary clean_param
This clean_param was added as part of MDL-22015. It is a good idea when
developer debug is turned on, but it showed up as a surprisingly
expensive cost in our profiling.

This change:

1. Removes the check during string_extist. This will not change
behaviour, the method returns false if the string does not exist.

2. In get_string, it only does the check if debugging is set to
DEVELOPER level.
2013-05-01 10:18:24 +01:00
Frederic Massart 81c19f4d1f MDL-38500 repository: Instance names must be unique 2013-05-01 16:14:15 +08:00
AMOS bot f89ca0ea6e Automatically generated installer lang files 2013-05-01 00:39:27 +00:00
Eloy Lafuente (stronk7) 48c8137388 Merge branch 'wip-MDL-39432-m23' of git://github.com/samhemelryk/moodle into MOODLE_23_STABLE 2013-05-01 01:35:24 +02:00
Sam Hemelryk b6bfe3b35c Merge branch 'MDL-39422-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2013-05-01 11:14:12 +12:00
Sam Hemelryk 55d2126310 Merge branch 'wip-MDL-39099_M23' of git://github.com/gjb2048/moodle into MOODLE_23_STABLE 2013-05-01 11:04:33 +12:00
Sam Hemelryk 8617a082bb Merge branch 'MDL-39414-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2013-05-01 11:01:54 +12:00
Sam Hemelryk c9b3e9eb23 MDL-39432 course: converted closures to lambda functions 2013-05-01 10:41:53 +12:00
Sam Hemelryk c1163a13fe Merge branch 'MDL-36060-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2013-05-01 10:13:51 +12:00
Mark Nielsen 7281117d6e MDL-36060: Remove anonymous functions in mod/lti
This was breaking eaccelerator because it doesn't
support anonymous functions.
2013-04-30 17:50:36 +01:00
Dan Poltawski 10abf35eac MDL-39422 mod_forms: prevent long coruse module names
To prevent ugly DB errors.
2013-04-30 17:42:10 +01:00
Dan Poltawski 6b8f82e412 MDL-39422 course: prevent module names longer 255 chars
To prevent ugly DB errors.
2013-04-30 17:42:10 +01:00
Gareth J Barnard c594709cf4 MDL-39099 course_format: Allow section_summary() to be overridden. 2013-04-30 17:05:44 +01:00
Dan Poltawski cfbf324052 Merge branch 'MDL-35385_chat_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE 2013-04-30 14:08:32 +01:00
Dan Poltawski ff01692765 MDL-39414 portfolio: don't queue google portfolio exports
This is a bit of an ugly way of saying 'I dont support queued exports'.

The google plugins need a valid user session in order to export to the
google services, thereforce we are forcing the export to be interactive
and not queued through cron, as this wont work in the current
implmenetation.

It's possible we could add offline access to the plugins, but I don't
believe it is worth the benefit for the additional complexity.
2013-04-30 10:38:00 +01:00
Damyon Wiese ff6479d21c Merge branch 'MDL-39354_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-04-30 16:27:04 +08:00
Jerome Mouneyrac 46295524d7 MDL-30775 get_course_contents: remove warnings when the section is empty 2013-04-30 14:13:53 +08:00
Andrew Davis 12091f27cf MDL-31713 core_grade:added a unit test to replicate a raw grade max bug 2013-04-30 09:37:49 +08:00
Andrew Davis fa15dda773 MDL-35385 mod_chat: made sure no message popups display within the chat window 2013-04-30 09:10:11 +08:00
AMOS bot 8cee951622 Automatically generated installer lang files 2013-04-30 00:43:52 +00:00
Sam Hemelryk 503630ed47 Merge branch 'w17_MDL-39344_m23_lists' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-04-30 10:11:46 +12:00
Sam Hemelryk de0917ef7f Merge branch 'MDL-39303_m23' of https://github.com/markn86/moodle into MOODLE_23_STABLE 2013-04-30 09:59:32 +12:00
Sam Hemelryk b748564398 Merge branch 'MDL-39365-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2013-04-30 09:36:25 +12:00
Sam Hemelryk d0fc4cf539 Merge branch 'MDL-39398-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2013-04-30 09:31:31 +12:00
Tim Hunt 5ddfd45539 MDL-39354 put back a bit of margin on checkboxes. 2013-04-29 19:16:51 +01:00
Dan Poltawski e46515bd83 Merge branch 'MDL-39378_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-04-29 17:01:12 +01:00
Tim Hunt e47a7b904c MDL-39378 Improve s() performance.
These changes give about a 10% speed-up in this function. The significant changes are:
1. Simplify the if logic to remove unnecssary cases.
2. Dont pass default argument values to htmlspecialchars, just using the
   defaults is faster.
3. I can confirm that /i regex is faster than the equivalent regex without the i.

I also added more unit tests to test the edge cases.
2013-04-29 12:32:29 +01:00
Tim Hunt dc67a0e9b6 MDL-39378 s(): fix bad hex regex 2013-04-29 12:32:26 +01:00
Frederic Massart 81d6802709 MDL-39398 message: Prevent notice when sending Jabber messages
Not tracking the presence prevents a notice to be displayed during disconnect(),
where the the jabber server attempts to subscribe to $CFG->jabberusername presence.
As the server name does not include a resource identifier (stillwit@jabber.org/resource),
an explode('/') fails.
2013-04-29 19:17:47 +08:00
Dan Poltawski d3c575bd6f Merge branch 'MDL-27071_23' of git://github.com/stronk7/moodle into MOODLE_23_STABLE 2013-04-29 10:27:52 +01:00
Eloy Lafuente (stronk7) 08a1a195b4 MDL-27071 Add big IN() unit tests
Let's verify how all databases perform with a big
number of parameters (10000) using IN() SQL clauses.
Both using QM and NAMED parameters.

Ideally only Oracle fails, and only it will need fixing.
2013-04-29 10:03:53 +02:00
Eloy Lafuente (stronk7) e206f3ffcb MDL-27071 Allow Oracle IN() to use > 1000 items
By using a pivoting strategy, we modify the list
of params (QM and NAMED supported) into a
subquery, so the 1000 limit in Oracle (ORA-01795)
is not thrown anymore.

Conflicts:
	lib/dml/oci_native_moodle_database.php
2013-04-29 10:03:39 +02:00
Damyon Wiese 5402f64623 Merge branch 'MDL-39342_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-04-29 15:36:30 +08:00
Damyon Wiese 70f7ea9327 Merge branch 'MDL-30940-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2013-04-29 14:04:26 +08:00
Ankit Agarwal e1aaddef66 MDL-39365 scorm reports: Return correct track count 2013-04-29 13:22:58 +08:00
Damyon Wiese 018e8a9ad4 Merge branch 'MDL-37845_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-04-29 11:47:02 +08:00
Sam Hemelryk 2a6c9c1536 Merge branch 'MDL-39192_m23' of https://github.com/markn86/moodle into MOODLE_23_STABLE 2013-04-29 10:53:33 +12:00
Tim Hunt 50590afe38 MDL-37845 multichoice qtype: Fix some display issues.
1. Better handling of multi-line choices in the correct answer display.
2. Remove dangerous CSS that is no longer needed.
2013-04-25 17:20:46 +01:00
Dan Poltawski 092f45148a Merge branch 'MDL-34403-MOODLE_23_STABLE' of https://github.com/mpetrowi/moodle into MOODLE_23_STABLE 2013-04-25 12:59:31 +01:00
Jason Platts d9c557099c MDL-39342 stop users entering too long matching answers.
Since they lead to an ugly DB error.
2013-04-25 11:59:56 +01:00
Dan Poltawski 161f4e0d79 Merge branch 'MDL-29258_23' of git://github.com/dmonllao/moodle into MOODLE_23_STABLE 2013-04-25 10:32:28 +01:00
Petr Škoda 3c9175acb2 MDL-39344 revert enabling of broken lists plugin from MDL-38329 2013-04-25 09:06:40 +02:00
AMOS bot c464052692 Automatically generated installer lang files 2013-04-25 00:38:10 +00:00
Eloy Lafuente (stronk7) 5e00b9a6e7 weekly release 2.3.6+ 2013-04-25 01:09:23 +02:00
Eloy Lafuente (stronk7) 4b9ae9e997 Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2013-04-25 01:03:22 +02:00
Eloy Lafuente (stronk7) cddf19fccd Merge branch 'MDL-35364_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-04-24 23:37:17 +02:00
Matt Petro c8b33aa772 MDL-34403 mod quiz: fix error during enrolment 2013-04-24 15:05:36 -04:00
Dan Poltawski f8028c2f30 Merge branch 'MDL-39283_23' of git://github.com/jmvedrine/moodle into MOODLE_23_STABLE 2013-04-24 14:36:26 +01:00
Ruslan Kabalin 6b59b89a1b MDL-34939: Fix clamdscan permissions-related issues
Use --fdpass parameter that passes the file descriptor permissions to clamd,
which allows to scan given file irrespective of directory and file
permissions. Changing file permissions is not required.
2013-04-24 15:00:00 +08:00
Mark Nelson b5163c5132 MDL-39303 mod_forum: prevent user from submitting when post threshold reached 2013-04-24 14:02:19 +08:00
Mark Nelson b4eb152f69 MDL-39192 mod_forum: do not need to check the posting threshold when editing a post 2013-04-24 12:32:08 +08:00
Jean-Michel Vedrine 5312d1fbeb MDL-39283 GIFT and XML question export broken for unsupported qtypes
Do no write any data to the export for unsupported qtypes
2013-04-23 09:59:31 +02:00
Damyon Wiese 3c719fafc5 Merge branch 'MDL-34933_23_STABLE' of https://github.com/mchurchward/moodle into MOODLE_23_STABLE
Conflicts:
	lib/db/upgrade.php
	version.php
2013-04-23 12:02:30 +08:00
David Monllao c7f7ad249d MDL-29258 core_portfolio: Fixing broken default breadcrumb 2013-04-23 11:24:22 +08:00
Tim Hunt 9d34eba78d MDL-35364 shorten text: don't return invalid HTML.
I also broke the unit tests into more, smaller, named tests, so that
when things start failing, more tests are run, and it is clearer what
the problem is.

In a couple of cases, I adjusted the $ideal lenght in the test. A
careful counting of the characters in the test input (added as comments)
suggests that the new values make for better tests.
2013-04-22 19:24:58 +01:00
Alex Leontiev 7d7824b0c1 MDL-37514 module.js: fix .js for auto quiz submission in preview mode
The issue: when we attempt the quiz as teacher/admin and timer is up,
quiz is not submitted, even though "Open attempts are submitted
automatically" is set. I've changed the javascript for a timer,
responsible for submission, removing the special behaviour in case of
preview mode. Note, that when the admin/teacher is taking a quiz, the
"preview" mode is automatically switched on.

It is a bit strange, since in the javascript there was clearly no
expressed intention to really submit quiz in preview, even when timer
hits. It does not really seem like a accidental bug, rather it looks
like some misunderstanding. Worse still, it may happen that I did not
understand the intentions of previous editor and ruined some
functionality. Because of this, and the fact that this is my first bug,
I would like to ask about the peer review! Please, see my comments in
bug discussion for the testing steps.
2013-04-22 14:05:47 +01:00
Mike Churchward 54f03faba2 MDL-34933 core_message: Adding index to improve database access on message_working table. 2013-04-22 08:35:44 -04:00
Jason Platts ced8b30bd5 MDL-37942 Images with non-alphanumeric chars in file name won't export 2013-04-22 12:44:16 +01:00
Damyon Wiese 42f64a01c7 MDL-39050 quiz access rules: $module->is_enabled() not available for 23 2013-04-22 10:37:44 +08:00
Damyon Wiese cf473c2189 Merge branch 'MDL-39050_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-04-22 10:31:30 +08:00
AMOS bot 5c728f6303 Automatically generated installer lang files 2013-04-22 00:38:30 +00:00
Sam Hemelryk cbf837ce04 Merge branch 'MDL-39172_23' of git://github.com/jmvedrine/moodle into MOODLE_23_STABLE 2013-04-22 11:01:42 +12:00
Dan Poltawski 18646a683b Merge branch 'MDL-38361_23' of https://github.com/prateeksachan/moodle into MOODLE_23_STABLE 2013-04-19 15:12:00 +01:00
Tim Hunt d519be4dab MDL-39050 quiz access rules: settings.php files should work. 2013-04-19 11:52:56 +01:00
Damyon Wiese 472ec72b2a Merge branch 'MDL-39084-moodle23' of github.com:StudiUM/moodle into MOODLE_23_STABLE 2013-04-19 14:07:38 +08:00
Damyon Wiese 8f6894b5f1 Merge branch 'MDL-39167_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-04-19 13:29:41 +08:00
Frederic Massart 50a40aed52 MDL-30940 form: Mutiple select work correctly without any selection 2013-04-19 11:06:12 +08:00
Sam Hemelryk 8be4f7da65 Merge branch 'MDL-39185_m23' of https://github.com/markn86/moodle into MOODLE_23_STABLE 2013-04-19 13:53:19 +12:00
Jean-Michel Vedrine d56837de60 MDL-39172 Import of .dat files is broken in blackboard_six import format 2013-04-18 17:54:02 +02:00
Dan Poltawski dd8e2dde96 weekly release 2.3.6+ 2013-04-18 12:48:44 +01:00
Dan Poltawski cd8dbd11a2 Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2013-04-18 12:43:54 +01:00
Dan Poltawski a5ce56011a Merge branch 'MDL-39203-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2013-04-18 08:36:32 +01:00
Frederic Massart ce51cb98a6 MDL-39203 repository: Fixed authentication errors with Dropbox 2013-04-18 14:50:47 +08:00
Dan Poltawski 32f2cceecc Merge branch 'MDL-38824-m23' of git://github.com/sammarshallou/moodle into MOODLE_23_STABLE 2013-04-17 14:38:18 +01:00
Tim Hunt ef8d4d590c MDL-39167 quiz access rules: need to validate their settings.
We were missing the hook in the form validation method. We had them
everywhere else they were needed.
2013-04-17 14:26:22 +01:00
Mark Nelson 534707ff8d MDL-39185 mod_forum: declare new object before creating member variables to prevent Strict Standards warning 2013-04-17 15:22:15 +08:00
Jean-Philippe Gaudreau ec934409e6 MDL-39084 grade: Capability checks are incoherent for the Course grade settings section 2013-04-16 09:30:19 -04:00
Dan Poltawski 387dc90072 Merge branch 'MDL-39080_M23' of git://github.com/kordan/moodle into MOODLE_23_STABLE 2013-04-16 12:45:14 +01:00
Daniel Neis Araujo 17c980cc80 MDL-38136: fix user_get_user_details doesn't return idnumber (thanks to Antonio Carlos Mariani) 2013-04-16 15:41:19 +08:00
Damyon Wiese 35c4301b2c Merge branch 'wip-MDL-38055-m23' of git://github.com/samhemelryk/moodle into MOODLE_23_STABLE 2013-04-16 15:14:19 +08:00
Dan Poltawski 770e8c02db Merge branch 'MDL-38880_23' of git://github.com/jmvedrine/moodle into MOODLE_23_STABLE 2013-04-15 16:25:30 +01:00
Dan Poltawski fd33a80fa1 Merge branch 'MDL-39000-m23' of git://github.com/sammarshallou/moodle into MOODLE_23_STABLE 2013-04-15 08:30:32 +01:00
Damyon Wiese f7f4494fb7 Merge branch 'MDL-39068_23' of git://github.com/stronk7/moodle into MOODLE_23_STABLE 2013-04-15 14:24:26 +08:00
Eloy Lafuente (stronk7) c7ed914077 Merge branch 'MDL-39089_23' of git://github.com/dmonllao/moodle into MOODLE_23_STABLE 2013-04-15 01:58:01 +02:00
Eloy Lafuente (stronk7) d84477702d MDL-39068 use cross-db text column ORDER BY
Credit goes to Valerii Kuznetsov, thanks!
2013-04-14 16:10:26 +02:00
AMOS bot 7f96a4dffe Automatically generated installer lang files 2013-04-13 00:37:26 +00:00
David Monllao 1b08751cfa MDL-38089 mod_wiki: Fix incorrect links 2013-04-12 13:18:56 +08:00
Damyon Wiese 38b18a142c MDL-29877 Grades - Remove hardcoded prefix from upgrade step. 2013-04-12 11:52:34 +08:00
Damyon Wiese 726e41abaa MDL-29877 Grades - version bump for upgrade step.
And whitespace...
2013-04-12 11:40:00 +08:00
Damyon Wiese d3b880b578 Merge branch 'MDL-29877_bad_grade_item_23' of git://github.com/andyjdavis/moodle into MOODLE_23_STABLE
Conflicts:
	version.php
2013-04-12 11:37:48 +08:00
Jayesh Anandani 7bfe54c41c MDL-39054 quiz statistics: move hard-coded text to lang file 2013-04-12 11:09:33 +08:00
Dan Poltawski 595ef991ee Merge branch 'MDL-37537-23' of git://github.com/srynot4sale/moodle into MOODLE_23_STABLE 2013-04-12 10:26:57 +08:00
Jean-Michel Vedrine 0b4c2c04f9 MDL-38880 Imported Cloze questions lose embedded images or other media 2013-04-11 22:12:57 +02:00
Jean-Philippe Gaudreau d110758759 MDL-38637 CAS Authentication: Undefined index: QUERY_STRING when executing cron 2013-04-11 10:52:56 -04:00
Aaron Barnes dce8cb0576 MDL-37537 completion: Fix incorrect lang string reference in block 2013-04-12 01:54:49 +12:00
Eloy Lafuente (stronk7) 7b9df2353c weekly release 2.3.6+ 2013-04-11 12:42:56 +02:00
Eloy Lafuente (stronk7) 2a564dc2bf Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2013-04-11 12:33:06 +02:00
Kordan bec7d18248 MDL-39080 theme_formal_white: modified "Main menu" block look to resemble the "Navigation" one 2013-04-11 11:03:10 +02:00
Dan Poltawski bf944109f0 Revert "MDL-38254 Assignment Module: add avaialble message to all assignment types"
This reverts commit 079a76bb37.
2013-04-11 16:53:33 +08:00
Damyon Wiese 932d87f841 MDL-35144 Categories - Allow editing by custom roles
Users with category:manage or course:create should be able to edit
the course/category.php page.
2013-04-11 14:10:29 +08:00
Eloy Lafuente (stronk7) f3d49933b0 Merge branch 'MDL-38525-23' of https://github.com/damyon/moodle into MOODLE_23_STABLE 2013-04-11 00:57:23 +02:00
Damyon Wiese 557383cd94 MDL-38525: Assignment upgrade - Error with comments for unenrolled students.
Students with comments on 'upload' assignments cause errors for the upgrade
tool if they are no longer enrolled. The solution is to allow siteadmin to
see student submissions even if the student is not currently enrolled (you
must be siteadmin to run the upgrade tool).
2013-04-10 16:18:35 +08:00
Ryan Panning 3b89216c24 MDL-38525: Assignment - print exception message when assignment upgrade fails.
Change to use getMessage() from the Exception class will prevent "{$a}" when
$e->error is null.
2013-04-10 16:18:31 +08:00
Dan Poltawski b3e792b946 Merge branch 'MDL-19072_23' of git://github.com/jmvedrine/moodle into MOODLE_23_STABLE 2013-04-10 14:11:03 +08:00
Howard Miller ea6ef858f5 MDL-35144 adding editing capabiltities to page 2013-04-10 12:24:08 +08:00
Dan Poltawski c01f9e8bc1 Merge branch 'wip-mdl-35883-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2013-04-10 12:16:58 +08:00
Dan Poltawski 7d042f6734 Merge branch 'MDL-38254_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2013-04-10 12:13:51 +08:00
Dan Poltawski 2967681e64 Merge branch 'MDL-38999_23' of git://github.com/stronk7/moodle into MOODLE_23_STABLE 2013-04-10 10:36:00 +08:00
Andrew Davis aeacefdb19 MDL-29877 core_grade:add some upgrade code to fix broken grade items introduced by bad restores 2013-04-10 08:34:04 +08:00
Petr Škoda b93ca5a53d MDL-38912 fix incorrect timeout reset 2013-04-10 00:07:51 +02:00
sam marshall 70c3c66943 MDL-39000 Conditional activities: Section condition restore errors 2013-04-09 17:40:55 +01:00
Jean-Michel Vedrine 59b50da6e9 MDL-19072 XHTML export for match questions fix for distractors 2013-04-09 11:49:18 +02:00
Dan Poltawski 650e0141fe Merge branch 'wip-MDL-38442-m23' of git://github.com/samhemelryk/moodle into MOODLE_23_STABLE 2013-04-09 15:40:38 +08:00
Dan Poltawski 112bb36c24 Merge branch 'MDL-38766/MOODLE_23_STABLE' of github.com:kemitix/moodle into MOODLE_23_STABLE 2013-04-09 10:38:22 +08:00
Dan Poltawski e37db6dc17 Merge branch 'wip-MDL-38541-m23' of git://github.com/marinaglancy/moodle into MOODLE_23_STABLE 2013-04-09 09:48:27 +08:00
Marina Glancy 1d05ecfd3e MDL-38541 Restrict calling rebuild_course_cache() from upgrade process
only plugins upgrade scripts can call rebuild_course_cache() and for clearing cache only.
2013-04-09 11:17:47 +10:00
AMOS bot fcb47c06b0 Automatically generated installer lang files 2013-04-09 00:37:52 +00:00
Eloy Lafuente (stronk7) 679620265a Merge branch 'w14_MDL-38753_m23_ocicount' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-04-09 02:25:54 +02:00
Petr Škoda 3848b9c8d5 MDL-39028 fix sqlsrv concat type conversion 2013-04-09 02:18:46 +02:00
Sam Hemelryk 0f16db943c MDL-38442 navigation: set_expansion_limit now only hides structural nodes 2013-04-09 12:08:59 +12:00
Petr Škoda 0992cee1de MDL-39024 fix MSSQL seek past the end of recordset 2013-04-09 02:00:04 +02:00
Petr Škoda 7cfccbb148 MDL-39022 fix MSSQL concat type conversion 2013-04-09 01:57:09 +02:00
Eloy Lafuente (stronk7) f3da6ac7aa Merge branch 'MDL-38912_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-04-09 01:40:06 +02:00
Eloy Lafuente (stronk7) 1b9d0b9e3e Merge branch 'MDL-39023-parentlang_23' of git://github.com/mudrd8mz/moodle into MOODLE_23_STABLE 2013-04-08 16:58:03 +02:00
Eloy Lafuente (stronk7) f80b096a5e MDL-38999 timezones: add some TZ/stamps know to be problematic to tests. 2013-04-08 16:33:01 +02:00
Eloy Lafuente (stronk7) 75899ed480 MDL-38999 timezones: fixed timezone information. 2013-04-08 16:32:53 +02:00
sam marshall 39525889eb MDL-38824 Activity completion: Automatic completion quotes not escaped 2013-04-08 14:55:51 +01:00
David Mudrák a82871d4f7 MDL-39023 Make get_language_dependencies() aware of circular dependency risk
The patch reimplements the core_string_manager::get_language_dependencies()
so that potentially mis-configured language packs with circular
dependencies or self dependency do not make the site unavailable.
Unit tests for the expected behaviour are added.
2013-04-08 15:02:59 +02:00
Petr Škoda 0dec339211 MDL-38753 tweak count SQL to make stupid Oracle happy 2013-04-08 12:35:33 +02:00
Damyon Wiese 2b705fc409 Merge branch 'MDL-38452-23' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2013-04-08 14:08:52 +08:00
Dan Poltawski c2217f57d0 Merge branch 'MDL-37676_23_STABLE' of git://github.com/appalachianstate/moodle into MOODLE_23_STABLE 2013-04-08 14:07:10 +08:00
Tim Lock 7dc59651b0 MDL-35868: quiz: Use correct attemptnumber when a last attempt exists. 2013-04-08 11:10:08 +08:00
AMOS bot ad20106a0b Automatically generated installer lang files 2013-04-08 00:36:07 +00:00
AMOS bot 68d6206d85 Automatically generated installer lang files 2013-04-07 00:37:27 +00:00
Tim Hunt d4aac8e4f6 MDL-38912 prevent time-outs during unit tests. 2013-04-05 18:39:25 +01:00
Dan Poltawski 7d253e0977 weekly release 2.3.6+ 2013-04-05 18:00:55 +08:00
Dan Poltawski 8318d25d49 Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2013-04-05 17:53:03 +08:00
Paul Campbell 927b7c29c8 MDL-38766 wiki2.0: fix redirects
Signed-off-by: Paul Campbell <pcampbell@carnegiecollege.ac.uk>
2013-04-05 09:38:05 +01:00
Rossiani Wijaya 3cee2ad262 MDL-38254 Assignment Module: add avaialble message to all assignment types 2013-04-04 11:13:31 +08:00
AMOS bot 3f8a77fb21 Automatically generated installer lang files 2013-04-04 00:36:11 +00:00
Eloy Lafuente (stronk7) a88b558c83 Merge branch 'MDL-38112-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2013-04-04 00:58:39 +02:00
Dan Poltawski f24fb2fec4 Merge branch 'MDL-38657_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2013-04-03 16:51:39 +08:00
Aparup Banerjee 45d7974cc9 Merge branch 'MDL-38809_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-04-03 16:33:45 +08:00
AMOS bot 17dfe60da0 Automatically generated installer lang files 2013-04-03 00:35:47 +00:00
Rajesh Taneja 8cea78f500 MDL-35883 Accessibility: Added title for login as user link in header and footer for accessibility 2013-04-02 16:07:29 +08:00
Rajesh Taneja d82cef65c6 MDL-35883 Accessibility: Added title for user link in header and footer for accessibility
Conflicts:

	lib/outputrenderers.php
2013-04-02 16:07:29 +08:00
Dan Poltawski d6868e54b8 MDL-35603 backup: fix coding style issues
Conflicts:
	backup/util/ui/restore_ui_components.php
2013-04-02 14:34:15 +08:00
Dan Poltawski e53be83e10 Merge branch 'MDL-35603_23' of git://github.com/rlorenzo/moodle into MOODLE_23_STABLE 2013-04-02 14:27:39 +08:00
Damyon Wiese 772e6ab1bf Merge branch 'MDL-38713-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2013-04-02 13:24:19 +08:00
Damyon Wiese 2dc4d19f79 Merge branch 'MDL-38703-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2013-04-02 13:05:28 +08:00
Damyon Wiese 482823f2b6 Merge branch 'MDL-38700-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE 2013-04-02 12:31:52 +08:00
Dan Poltawski 8132e0f899 Merge branch 'MDL-38702_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2013-04-02 10:04:56 +08:00
Mary Evans c74325d17a MDL-38657 theme_base: fixes misalignment issue in User Report page. 2013-03-31 02:25:47 +01:00
prateeksachan b4dcb723ff MDL-38361: Fixed typos in mod/assign/locallib.php 2013-03-31 00:29:18 +05:30
Tim Hunt ccf46ba2d9 MDL-38809 quiz manual grading: delete expensive unnecssary code. 2013-03-30 17:27:41 +00:00
Rex Lorenzo 13c708233e MDL-35603 - Backup - Course import/restore max results
* Unified UI for import and restore course search
2013-03-28 15:24:14 -07:00
Damyon Wiese 5a2c3ece38 weekly release 2.3.6+ 2013-03-28 14:47:18 +08:00
Damyon Wiese f6d596dd5d Merge branch 'MDL-25631_m23' of git://github.com/merrill-oakland/moodle into MOODLE_23_STABLE 2013-03-28 10:42:18 +08:00
Aparup Banerjee 9efd33dc61 Merge branch 'MDL-38659_23' of git://github.com/stronk7/moodle into MOODLE_23_STABLE 2013-03-27 10:39:10 +08:00
Eloy Lafuente (stronk7) 4984697c12 Merge branch 'MDL-38557_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-03-26 23:42:11 +01:00
Eloy Lafuente (stronk7) e721f2dec8 Merge branch 'MDL-38647_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-03-26 23:24:00 +01:00
Eric Merrill 4c31a15261 MDL-25631 backup Decoupling legacy files from course config settigs. If they are present, they will be restored. 2013-03-26 17:05:05 -04:00
Petr Škoda aca26e0641 MDL-37782 reset DB after each failed database test
Conflicts:
	lib/phpunit/classes/database_driver_testcase.php
2013-03-26 16:14:01 +01:00
Eloy Lafuente (stronk7) 9821beacb6 MDL-38659 environment: fix incorrect feedback messages 2013-03-26 15:37:36 +01:00
Dan Poltawski 642cbeec6b MDL-38713 course: correctly set visibleold on mod creation
Remove uncessary set of visibleold in the form
2013-03-26 16:19:47 +08:00
Dan Poltawski 47b17f9123 MDL-38703 course: backport visibility tests from MDL-36417 2013-03-26 15:58:58 +08:00
Dan Poltawski 470730c86b MDL-38703 course: moving a hidden course module unhides it
When moving to a non-hidden section because visibleold was not
being correctly set. visibleold should only be differnet from visible
when a CM is changed by section visibility
2013-03-26 15:48:28 +08:00
Damyon Wiese 2ec0ba91b8 MDL-38468 Filelib: Fix ordering of new mimetypes and upgrade step 2013-03-26 15:30:24 +08:00
Matteo Scaramuccia 4c1689ba52 MDL-38468 Files API: fixed the support for MTHML (MIME HTML: web page archive) files
Conflicts:

	version.php
2013-03-26 15:28:21 +08:00
Charles Fulton ba7c052171 MDL-38700 course: only change visibility if a module moves to a different section 2013-03-26 15:10:44 +08:00
Dan Poltawski 1a5d5334bf MDL-38700 course: add tests for moveto_module()
* Test visibility when moving around hidden sections
* Test for visiblity changes when moving around in the same sections.
2013-03-26 15:10:44 +08:00
Damyon Wiese 7e53f1a231 Merge branch 'wip-MDL-35875-stable23' of git://github.com/phalacee/moodle into MOODLE_23_STABLE 2013-03-26 14:48:10 +08:00
Damyon Wiese c50107c847 Merge branch 'MDL-30438_b_m23' of git://github.com/rwijaya/moodle into MOODLE_23_STABLE 2013-03-26 14:38:06 +08:00
Damyon Wiese 97707318c3 Merge branch 'MDL-38380_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2013-03-26 13:25:16 +08:00
Dan Poltawski 1947345e42 MDL-38112 - update to the ISO list of countries
According to ISO 3166-1
2013-03-26 10:49:26 +08:00
Damyon Wiese 4523bbba8f Merge branch 'wip-mdl-36882-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2013-03-26 10:43:32 +08:00
Rajesh Taneja 44ee5acee4 MDL-36882 course: Added aria-live for manual completion
This is required so that assistive technologies can notify user about change on completion status
2013-03-26 10:28:27 +08:00
Damyon Wiese 25e348d6aa Merge branch 'wip-mdl-36125-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2013-03-26 10:15:08 +08:00
Mary Evans 3d2ec04484 MDL-38702 theme_mymobile: Replaced missing theme setting to disable CSS Optimiser.
The missing setting was a regression casued by MDL-33357.
2013-03-26 01:01:25 +00:00
Damyon Wiese 8a95402f94 Merge branch 'MDL-38668_23' of git://github.com/stronk7/moodle into MOODLE_23_STABLE 2013-03-25 15:51:56 +08:00
Jason Fowler e8eb6a1d50 MDL-35875 - Accessibility - Remove empty summary attribute for user information table in view user's profile 2013-03-25 11:16:40 +08:00
Damyon Wiese d196b17587 MDL-37033 Environment - Fix indenting in XML 2013-03-25 09:38:30 +08:00
Damyon Wiese 5320a265ab Merge branch 'MDL-37033_23' of git://github.com/stronk7/moodle into MOODLE_23_STABLE 2013-03-25 09:37:07 +08:00
Andrew Robert Nicols 12b6eebf37 MDL-38658 JavaScript: Correct fullpath for dndupload definition 2013-03-24 23:44:38 +01:00
Eloy Lafuente (stronk7) eea80d257c Merge branch 'MDL-36927-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2013-03-24 23:39:42 +01:00
Eloy Lafuente (stronk7) f54579f72a MDL-38668 timezones: update to tzdata 2013b 2013-03-24 10:46:33 +01:00
Eloy Lafuente (stronk7) e848bf1153 MDL-37033 environment: add 2.5 brach details 2013-03-22 18:42:15 +01:00
Fred Woolard 2e83fee85c MDL-37676 Use course grade category if mapping fails for manual grade items 2013-03-22 08:41:15 -04:00
Tim Hunt f466f71902 MDL-38647 quiz review question issue
Page URL should contain 'step=0' if necessary, but not 'step='.
2013-03-22 11:31:53 +00:00
Tim Hunt 23149b2e13 MDL-38557 quiz manual grading should check mod/quiz:grade 2013-03-22 10:19:53 +00:00
Damyon Wiese 8bb0c27f1b weekly release 2.3.6+ 2013-03-22 13:52:38 +08:00
Damyon Wiese 7c5fa92210 Merge branch 'install_23_STABLE' of git://git.moodle.cz/moodle-install into MOODLE_23_STABLE 2013-03-22 13:35:42 +08:00
Rajesh Taneja 8dc10e915e MDL-36125 course: Added aria-describedby for editing activity title 2013-03-22 12:42:48 +08:00
Eloy Lafuente (stronk7) 3ea063fe7d Merge branch 'MDL-37664-23-int' of git://github.com/FMCorz/moodle into MOODLE_23_STABLE 2013-03-21 10:56:31 +01:00
Frederic Massart 4174fc1176 MDL-37664 blocks: Unexisting function for RTL in drag & drop 2013-03-21 17:46:28 +08:00
AMOS bot 1fde603819 Automatically generated installer lang files 2013-03-21 00:37:32 +00:00
David Monllao 4f47ee6476 MDL-38364 phpunit: PHPUnit autoload uses capital A 2013-03-20 16:06:50 +08:00
Ankit Agarwal 63308668d6 MDL-36927 Reports: Page layout is not defined in course/recent.php 2013-03-20 14:13:09 +08:00
Damyon Wiese 4b226f3b37 MDL-38373 Auth - Additional strict warning fix for radius authentication 2013-03-20 12:41:39 +08:00
Damyon Wiese d3a9460d57 Merge branch 'MDL-38373_23' of git://github.com/stronk7/moodle into MOODLE_23_STABLE 2013-03-20 12:40:01 +08:00
Frederic Massart e004354787 MDL-38452 repositories: User logged in as have access to non-private repositories 2013-03-20 12:39:58 +08:00
Sam Hemelryk 4688b27ab3 MDL-38055 course: fixed double encoding of title properties
Conflicts:
	lib/navigationlib.php

Conflicts:
	blocks/course_overview/renderer.php
	lib/navigationlib.php
2013-03-20 17:35:24 +13:00
Eloy Lafuente (stronk7) 417c261001 Revert "MDL-38515 JavaScript: Correct module dependencies for core_filepicker"
This reverts commit e40c3f7cc4.
2013-03-20 00:58:04 +01:00
Eloy Lafuente (stronk7) e815163162 Merge branch 'MDL-38490_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-03-20 00:43:49 +01:00
Eloy Lafuente (stronk7) 665f13c50c Merge branch 'MDL-38370-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2013-03-20 00:32:09 +01:00
Eloy Lafuente (stronk7) 601054daca Merge branch 'w12_MDL-38364_m23_phpunitloading' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-03-20 00:21:58 +01:00
Eloy Lafuente (stronk7) a3a6b68ae9 Merge branch 'MDL-37664-MOODLE_23_STABLE' of https://github.com/lucisgit/moodle into MOODLE_23_STABLE 2013-03-19 23:37:49 +01:00
Eloy Lafuente (stronk7) c2879b7db8 Merge branch 'MDL-38424_m23' of git://github.com/kordan/moodle into MOODLE_23_STABLE 2013-03-19 23:18:59 +01:00
Eloy Lafuente (stronk7) 9146ab295d Merge branch 'MDL-38395_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-03-19 23:13:16 +01:00
Eloy Lafuente (stronk7) 14742ceb73 Merge branch 'MDL-38460_M23' of git://github.com/lazydaisy/moodle into MOODLE_23_STABLE 2013-03-19 21:17:19 +01:00
Eloy Lafuente (stronk7) 7a4605ae62 Merge branch 'wip-MDL-38422_M23' of git://github.com/gjb2048/moodle into MOODLE_23_STABLE 2013-03-19 21:13:22 +01:00
Eloy Lafuente (stronk7) e250e9ae29 Merge branch 'MDL-38363_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-03-19 21:07:29 +01:00
Eloy Lafuente (stronk7) a0b12848a4 Merge branch 'MDL-38355_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-03-19 21:01:24 +01:00
Eloy Lafuente (stronk7) 07c65a6029 Merge branch 'MDL-38388_23' of git://github.com/jonof/moodle into MOODLE_23_STABLE 2013-03-19 19:03:37 +01:00
Eloy Lafuente (stronk7) 7849c44376 Merge branch 'MDL-38412_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-03-19 18:23:04 +01:00
Eloy Lafuente (stronk7) e2c7333c2e Merge branch 'w12_MDL-38329_m23_webkit' of git://github.com/skodak/moodle into MOODLE_23_STABLE 2013-03-19 18:18:05 +01:00
Petr Škoda ecd68bf7b6 MDL-38202 fix loginas logout redirection 2013-03-19 16:54:20 +01:00
Eloy Lafuente (stronk7) b2b512671d Merge branch 'MDL-38542_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-03-19 16:49:45 +01:00
Eloy Lafuente (stronk7) 6211a05866 Merge branch 'MDL-38444_23' of https://github.com/ppichet/moodle into MOODLE_23_STABLE 2013-03-19 16:35:41 +01:00
Tim Hunt e24cb35c18 MDL-38542 shortanswer qtype: was broken for responses of '0'.
This was a regression caused by MDL-37157 & MDL-37746.
2013-03-19 13:55:48 +00:00
Eloy Lafuente (stronk7) dd8ec00067 Merge branch 'MDL-38515-m23' of git://github.com/andrewnicols/moodle into MOODLE_23_STABLE 2013-03-19 12:58:42 +01:00
Eloy Lafuente (stronk7) a3db3bfac0 Merge branch 'MDL-38397_23' of git://github.com/timhunt/moodle into MOODLE_23_STABLE 2013-03-19 12:29:01 +01:00
Eloy Lafuente (stronk7) cf9b57d181 Merge branch 'wip-mdl-38431-m23' of git://github.com/rajeshtaneja/moodle into MOODLE_23_STABLE 2013-03-19 10:24:45 +01:00
Eloy Lafuente (stronk7) 28896f12f7 Merge branch 'MDL-36872-m23' of git://github.com/ankitagarwal/moodle into MOODLE_23_STABLE 2013-03-19 09:37:31 +01:00
Damyon Wiese b100f948cb Merge branch 'MDL-38215-workshop-oracle_23' of git://github.com/mudrd8mz/moodle into MOODLE_23_STABLE 2013-03-18 11:46:15 +08:00
Petr Škoda 2de3def418 MDL-38329 use proper plugin name for the webkit lists workaround
Credit goes to Mauno Korpelainen, thanks.
2013-03-17 21:05:27 +01:00
Petr Škoda 5a3ebd5ea6 MDL-38364 rework PHPUnit autoloading
This is related to BC incompatibility introduced in https://github.com/sebastianbergmann/phpunit/issues/848
2013-03-17 19:57:37 +01:00
Andrew Robert Nicols e40c3f7cc4 MDL-38515 JavaScript: Correct module dependencies for core_filepicker 2013-03-17 16:56:18 +00:00
ppichet 475ba4478d MDL-38444 Saving datasets from edit_calculatedsimple_form.php
Bypassing the 3 steps savequestion() of calculated.
2013-03-16 22:39:52 -04:00
Eloy Lafuente (stronk7) 532c3d8803 MDL-25655 glossary: non full searches now working.
In the process of updting the module from 1.9 to
2.0 the (non) full search feature was lost without notice.

This restitutes it with the same behavior present in 1.9:

- fullsearch disabled: look into concepts and aliases.
- fullsearch enabled (default): look also into definitions.
2013-03-16 18:09:40 +01:00
Eloy Lafuente (stronk7) d312ce89e2 MDL-38373 Use correct PEAR->loadExtension()
Current use is wrong (static) and leads to strict standards notice.
2013-03-16 11:43:51 +01:00
Mary Evans 52a19fac1e MDL-38380 theme_magazine: Fixed typo in style/core.css. 2013-03-16 01:50:52 +00:00
Tim Hunt 682b737316 MDL-38412 fix quiz reports group mode weirdness.
Moodle currently selected group uses the session. This can cause weird
effects when you have two tabs open. This is particularly weird in the
quiz reports, where some actions like delete attempt are checked against
the currently selected group.

The solution is to put the currently selected group into the URL for all
actions like delete/regrade attempt, regrade all attempts, download and
sort table.
2013-03-15 12:02:31 +00:00
Tim Hunt b433c4cedf MDL-38363 qtype_calculated. Fix warnings. 2013-03-15 11:23:39 +00:00
Tim Hunt 340cba5b22 MDL-38395 question categories: wrong URLs after editing.
The problem was that array1 + array2 takes the values from
array1 when a key appears in both places.

While working on this area, I updated it to use html_writer.
2013-03-15 08:15:23 +00:00
Jonathon Fowler 2ffd3701f5 MDL-38388 qformat_blackboard_six: fix question image import
This works on the expectation that the returned array from readdata()
is opaque and will be fed directly into readquestions() since
filebase is different per file and needs to be set up appropriately
before each parse.
2013-03-15 09:09:27 +10:00
Tim Hunt e421b1524f MDL-38355 qtype_multianswer: input boxes too big in Russian.
... and any other language where the characters take multiple
bytes in UTF-8.

This fix was worked out by Dušan Ristić. I am just committing it.
2013-03-14 22:27:48 +00:00
Tim Hunt 0147d3da53 MDL-38397 question editing: only validate default mark if present.
Most qtypes have that field, but not all. multianswer is an example in core.
Also some contrib qtypes.
2013-03-14 22:13:56 +00:00
Tim Hunt d8a20b8828 MDL-38490 question preview, variant is attempt (not display) option 2013-03-14 17:22:37 +00:00
Ankit Agarwal 77df5b724d MDL-36872 reports: Fixing incorrect sorting of recent activites by timestamp 2013-03-14 14:45:11 +08:00
Mary Evans 951a9fcc67 MDL-38460 theme_mymobile: Fixes resources folders to show properly on first access. 2013-03-14 01:27:19 +00:00
David Mudrák 95c7d1d076 MDL-38215 Fix cross-db support in workshop SQL queries
The $sql used in these methods may contain multiple parts glued
together by the UNION operator. Simply appending the ORDER BY statement
to the end of the query does not work in all DBs (failure reported at
Oracle). Following the pattern already applied in MDL-30051, we wrap the
SQL into yet another SELECT statement and perform ordering there.

Credit goes to Sara Cenni for suggesting the fix.
2013-03-13 15:17:42 +01:00
Shamim Rezaie 831ecc9af3 MDL-37664 course: Fix drag & drop RTL mode issue 2013-03-12 15:49:35 +00:00
Kordan 42a42bcd46 MDL-38424 theme_formal_white: added suggestions to css custom styles description 2013-03-12 13:50:24 +01:00
Rossiani Wijaya 1d19d5c219 MDL-30438 Lesson Module: fixed input text editable capability after checking/unchecking unmask option for all browsers except IE8 or lower 2013-03-12 12:44:06 +08:00
Rajesh Taneja 14d6c90f81 MDL-38431 comment: profile url should be escaped, as it's used in html 2013-03-12 12:31:29 +08:00
Ankit Agarwal c1607b5378 MDL-38370 scorm: Fixing strict standard errors in outline report 2013-03-12 11:44:09 +08:00
Gareth J Barnard b5ef760c57 MDL-38422 theme_mymobile: TinyMCE editor difficulties. 2013-03-11 17:51:57 +00:00
Rossiani Wijaya f1192522c8 MDL-30438 Lesson Module: improve password field to disabled when password protect is set to no. 2013-03-11 14:48:45 +08:00
sam marshall 276d1134e2 MDL-38315 Completion: Bugs with 'locked' status in activity form 2013-03-05 16:40:18 +00:00
230 changed files with 5348 additions and 3084 deletions
+136 -20
View File
@@ -227,7 +227,7 @@
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_CHECK message="iconvrequired" />
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
@@ -237,7 +237,7 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_CHECK message="curlrequired" />
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
@@ -277,12 +277,12 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_CHECK message="simplexmlrequired" />
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_CHECK message="splrequired" />
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
@@ -344,7 +344,7 @@
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_CHECK message="iconvrequired" />
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
@@ -354,7 +354,7 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_CHECK message="curlrequired" />
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
@@ -394,12 +394,12 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_CHECK message="simplexmlrequired" />
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_CHECK message="splrequired" />
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
@@ -454,7 +454,7 @@
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_CHECK message="iconvrequired" />
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
@@ -464,7 +464,7 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_CHECK message="curlrequired" />
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
@@ -504,12 +504,12 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_CHECK message="simplexmlrequired" />
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_CHECK message="splrequired" />
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
@@ -569,7 +569,7 @@
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_CHECK message="iconvrequired" />
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
@@ -579,7 +579,7 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_CHECK message="curlrequired" />
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
@@ -619,12 +619,12 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_CHECK message="simplexmlrequired" />
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_CHECK message="splrequired" />
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
@@ -685,7 +685,7 @@
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_CHECK message="iconvrequired" />
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
@@ -695,7 +695,7 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_CHECK message="curlrequired" />
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="optional">
@@ -735,12 +735,128 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_CHECK message="simplexmlrequired" />
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_CHECK message="splrequired" />
<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="40M" 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>
<MOODLE version="2.5" 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="odbc_mssql" version="9.0" />
<VENDOR name="mssql_n" version="9.0" />
<VENDOR name="oracle" version="10.2" />
<VENDOR name="sqlite" version="2.0" />
</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">
+10 -8
View File
@@ -244,6 +244,8 @@ class site_registration_form extends moodleform {
$questionsnumber = get_config('hub', 'site_questionsnumber_' . $cleanhuburl);
$resourcesnumber = get_config('hub', 'site_resourcesnumber_' . $cleanhuburl);
$mediancoursesize = get_config('hub', 'site_mediancoursesize_' . $cleanhuburl);
$participantnumberaveragecfg = get_config('hub', 'site_participantnumberaverage_' . $cleanhuburl);
$modulenumberaveragecfg = get_config('hub', 'site_modulenumberaverage_' . $cleanhuburl);
//hidden parameters
$mform->addElement('hidden', 'huburl', $huburl);
@@ -376,36 +378,36 @@ class site_registration_form extends moodleform {
if (HUB_MOODLEORGHUBURL != $huburl) {
$mform->addElement('checkbox', 'courses', get_string('sendfollowinginfo', 'hub'),
" " . get_string('coursesnumber', 'hub', $coursecount));
$mform->setDefault('courses', true);
$mform->setDefault('courses', $coursesnumber != -1);
$mform->addHelpButton('courses', 'sendfollowinginfo', 'hub');
$mform->addElement('checkbox', 'users', '',
" " . get_string('usersnumber', 'hub', $usercount));
$mform->setDefault('users', true);
$mform->setDefault('users', $usersnumber != -1);
$mform->addElement('checkbox', 'roleassignments', '',
" " . get_string('roleassignmentsnumber', 'hub', $roleassigncount));
$mform->setDefault('roleassignments', true);
$mform->setDefault('roleassignments', $roleassignmentsnumber != -1);
$mform->addElement('checkbox', 'posts', '',
" " . get_string('postsnumber', 'hub', $postcount));
$mform->setDefault('posts', true);
$mform->setDefault('posts', $postsnumber != -1);
$mform->addElement('checkbox', 'questions', '',
" " . get_string('questionsnumber', 'hub', $questioncount));
$mform->setDefault('questions', true);
$mform->setDefault('questions', $questionsnumber != -1);
$mform->addElement('checkbox', 'resources', '',
" " . get_string('resourcesnumber', 'hub', $resourcecount));
$mform->setDefault('resources', true);
$mform->setDefault('resources', $resourcesnumber != -1);
$mform->addElement('checkbox', 'participantnumberaverage', '',
" " . get_string('participantnumberaverage', 'hub', $participantnumberaverage));
$mform->setDefault('participantnumberaverage', true);
$mform->setDefault('participantnumberaverage', $participantnumberaveragecfg != -1);
$mform->addElement('checkbox', 'modulenumberaverage', '',
" " . get_string('modulenumberaverage', 'hub', $modulenumberaverage));
$mform->setDefault('modulenumberaverage', true);
$mform->setDefault('modulenumberaverage', $modulenumberaveragecfg != -1);
} else {
$mform->addElement('static', 'courseslabel', get_string('sendfollowinginfo', 'hub'),
" " . get_string('coursesnumber', 'hub', $coursecount));
+25 -1
View File
@@ -62,7 +62,18 @@ $siteregistrationform = new site_registration_form('',
$fromform = $siteregistrationform->get_data();
if (!empty($fromform) and confirm_sesskey()) {
//save the settings
// Set to -1 all optional data marked as "don't send" by the admin.
// The function get_site_info() will not calculate the optional data if config is set to -1.
$inputnames = array('courses', 'users', 'roleassignments', 'posts', 'questions', 'resources',
'modulenumberaverage', 'participantnumberaverage');
foreach ($inputnames as $inputname) {
if (empty($fromform->{$inputname})) {
$fromform->{$inputname} = -1;
}
}
// Save the settings.
$cleanhuburl = clean_param($huburl, PARAM_ALPHANUMEXT);
set_config('site_name_' . $cleanhuburl, $fromform->name, 'hub');
set_config('site_description_' . $cleanhuburl, $fromform->description, 'hub');
@@ -113,6 +124,19 @@ if ($update and confirm_sesskey()) {
if (!empty($fromform) and empty($update) and confirm_sesskey()) {
if (!empty($fromform) and confirm_sesskey()) { // if the register button has been clicked
// Retrieve the optional info (specially course number, user number, module number average...).
$siteinfo = $registrationmanager->get_site_info($huburl);
$fromform->courses = $siteinfo['courses'];
$fromform->users = $siteinfo['users'];
$fromform->enrolments = $siteinfo['enrolments'];
$fromform->posts = $siteinfo['posts'];
$fromform->questions = $siteinfo['questions'];
$fromform->resources = $siteinfo['resources'];
$fromform->modulenumberaverage = $siteinfo['modulenumberaverage'];
$fromform->participantnumberaverage = $siteinfo['participantnumberaverage'];
$fromform->street = $siteinfo['street'];
$params = (array) $fromform; //we are using the form input as the redirection parameters (token, url and name)
$unconfirmedhub = $registrationmanager->get_unconfirmedhub($huburl);
+2 -2
View File
@@ -38,7 +38,7 @@ class core_register_renderer extends plugin_renderer_base {
public function moodleorg_registration_message() {
$moodleorgurl = html_writer::link('http://moodle.org', 'Moodle.org');
$moodleorgstatsurl = html_writer::link('http://moodle.org/stats', get_string('statsmoodleorg', 'admin'));
$moochurl = html_writer::link(HUB_MOODLEORGHUBURL, 'MOOCH');
$moochurl = html_writer::link(HUB_MOODLEORGHUBURL, 'Moodle.net');
$moodleorgregmsg = get_string('registermoodleorg', 'admin', $moodleorgurl);
$items = array(get_string('registermoodleorgli1', 'admin'),
get_string('registermoodleorgli2', 'admin', $moodleorgstatsurl),
@@ -92,4 +92,4 @@ class core_register_renderer extends plugin_renderer_base {
return html_writer::table($table);
}
}
}
+7 -5
View File
@@ -47,14 +47,16 @@ list($options, $unrecognized) = cli_get_params(
)
);
if (file_exists(__DIR__.'/../../../../vendor/autoload.php')) {
if (file_exists(__DIR__.'/../../../../vendor/phpunit/phpunit/PHPUnit/Autoload.php')) {
// Composer packages present.
require_once(__DIR__.'/../../../../vendor/autoload.php');
}
require_once(__DIR__.'/../../../../vendor/phpunit/phpunit/PHPUnit/Autoload.php');
// Verify PHPUnit libs can be loaded.
if (!include_once('PHPUnit/Autoload.php')) {
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
} else {
// Verify PHPUnit PEAR libs can be loaded.
if (!include('PHPUnit/Autoload.php')) {
phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITMISSING);
}
}
if ($options['run']) {
@@ -69,7 +69,7 @@ $string['showsearch'] = 'Show the search for test files.';
$string['skip'] = 'Skip';
$string['stacktrace'] = 'Stack trace:';
$string['summary'] = '{$a->run}/{$a->total} test cases complete: <strong>{$a->passes}</strong> passes, <strong>{$a->fails}</strong> fails and <strong>{$a->exceptions}</strong> exceptions.';
$string['tablesnotsetup'] = 'Unit test tables are not yet built. Do you want to build them now?.';
$string['tablesnotsetup'] = 'Unit test tables are not yet built. Do you want to build them now?';
$string['testdboperations'] = 'Test database operations';
$string['testtablescsvfileunwritable'] = 'The test tables CSV file is not writable ({$a->filename})';
$string['testtablesneedupgrade'] = 'The test DB tables need to be upgraded. Do you wish to proceed with the upgrade now?';
+3 -2
View File
@@ -32,8 +32,9 @@
//
// hack by Vangelis Haniotakis to handle the absence of $_SERVER['REQUEST_URI'] in IIS
//
if (!isset($_SERVER['REQUEST_URI'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
if (isset($_SERVER['QUERY_STRING'])) {
$_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
}
//
+1 -1
View File
@@ -105,7 +105,7 @@ class auth_plugin_radius extends auth_plugin_base {
}
$result = $rauth->send();
if (PEAR::isError($result)) {
if ($rauth->isError($result)) {
printf("Radius send failed: %s<br/>\n", $result->getMessage());
exit;
} else if ($result === true) {
+13
View File
@@ -1764,6 +1764,10 @@ class backup_questions_structure_step extends backup_structure_step {
$qhint = new backup_nested_element('question_hint', array('id'), array(
'hint', 'hintformat', 'shownumcorrect', 'clearwrong', 'options'));
$tags = new backup_nested_element('tags');
$tag = new backup_nested_element('tag', array('id'), array('name', 'rawname'));
// Build the tree
$qcategories->add_child($qcategory);
@@ -1772,6 +1776,9 @@ class backup_questions_structure_step extends backup_structure_step {
$question->add_child($qhints);
$qhints->add_child($qhint);
$question->add_child($tags);
$tags->add_child($tag);
// Define the sources
$qcategory->set_source_sql("
@@ -1791,6 +1798,12 @@ class backup_questions_structure_step extends backup_structure_step {
ORDER BY id',
array('questionid' => backup::VAR_PARENTID));
$tag->set_source_sql("SELECT t.id, t.name, t.rawname
FROM {tag} t
JOIN {tag_instance} ti ON ti.tagid = t.id
WHERE ti.itemid = ?
AND ti.itemtype = 'question'", array(backup::VAR_PARENTID));
// don't need to annotate ids nor files
// (already done by {@link backup_annotate_all_question_files}
@@ -74,6 +74,8 @@ class restore_course_task extends restore_task {
// Restore course role assignments and overrides (internally will observe the role_assignments setting)
$this->add_step(new restore_ras_and_caps_structure_step('course_ras_and_caps', 'roles.xml'));
$this->add_step(new restore_course_legacy_files_step('legacy_files'));
// Restore course enrolments (plugins and membership). Conditionally prevented for any IMPORT/HUB operation
if ($this->plan->get_mode() != backup::MODE_IMPORT && $this->plan->get_mode() != backup::MODE_HUB) {
$this->add_step(new restore_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
+62 -4
View File
@@ -150,6 +150,11 @@ class restore_gradebook_structure_step extends restore_structure_step {
if ($data->itemtype=='manual') {
// manual grade items store category id in categoryid
$data->categoryid = $this->get_mappingid('grade_category', $data->categoryid, NULL);
// if mapping failed put in course's grade category
if (NULL == $data->categoryid) {
$coursecat = grade_category::fetch_course_category($this->get_courseid());
$data->categoryid = $coursecat->id;
}
} else if ($data->itemtype=='course') {
// course grade item stores their category id in iteminstance
$coursecat = grade_category::fetch_course_category($this->get_courseid());
@@ -1166,7 +1171,7 @@ class restore_section_structure_step extends restore_structure_step {
// Otherwise, when you restore to an existing course, it will mess up
// existing section availability entries.
if (!$this->get_mappingid('course_sections_availability', $data->id, false)) {
return;
continue;
}
// Update source cmid / grade id to new value.
@@ -1179,7 +1184,12 @@ class restore_section_structure_step extends restore_structure_step {
$data->gradeitemid = null;
}
$DB->update_record('course_sections_availability', $data);
// Delete the record if the condition wasn't found, otherwise update it.
if ($data->sourcecmid === null && $data->gradeitemid === null) {
$DB->delete_records('course_sections_availability', array('id' => $data->id));
} else {
$DB->update_record('course_sections_availability', $data);
}
}
}
}
@@ -1340,7 +1350,6 @@ class restore_course_structure_step extends restore_structure_step {
// Add course related files, without itemid to match
$this->add_related_files('course', 'summary', null);
$this->add_related_files('course', 'legacy', null);
// Deal with legacy allowed modules.
if ($this->legacyrestrictmodules) {
@@ -1367,6 +1376,29 @@ class restore_course_structure_step extends restore_structure_step {
}
}
/**
* Execution step that will migrate legacy files if present.
*/
class restore_course_legacy_files_step extends restore_execution_step {
public function define_execution() {
global $DB;
// Do a check for legacy files and skip if there are none.
$sql = 'SELECT count(*)
FROM {backup_files_temp}
WHERE backupid = ?
AND contextid = ?
AND component = ?
AND filearea = ?';
$params = array($this->get_restoreid(), $this->task->get_old_contextid(), 'course', 'legacy');
if ($DB->count_records_sql($sql, $params)) {
$DB->set_field('course', 'legacyfiles', 2, array('id' => $this->get_courseid()));
restore_dbops::send_files_to_pool($this->get_basepath(), $this->get_restoreid(), 'course',
'legacy', $this->task->get_old_contextid(), $this->task->get_userid());
}
}
}
/*
* Structure step that will read the roles.xml file (at course/activity/block levels)
@@ -2843,10 +2875,13 @@ class restore_create_categories_and_questions extends restore_structure_step {
$hint = new restore_path_element('question_hint',
'/question_categories/question_category/questions/question/question_hints/question_hint');
$tag = new restore_path_element('tag',
'/question_categories/question_category/questions/question/tags/tag');
// Apply for 'qtype' plugins optional paths at question level
$this->add_plugin_structure('qtype', $question);
return array($category, $question, $hint);
return array($category, $question, $hint, $tag);
}
protected function process_question_category($data) {
@@ -2993,6 +3028,29 @@ class restore_create_categories_and_questions extends restore_structure_step {
$this->set_mapping('question_hint', $oldid, $newitemid);
}
protected function process_tag($data) {
global $CFG, $DB;
$data = (object)$data;
$newquestion = $this->get_new_parentid('question');
if (!empty($CFG->usetags)) { // if enabled in server
// TODO: This is highly inneficient. Each time we add one tag
// we fetch all the existing because tag_set() deletes them
// so everything must be reinserted on each call
$tags = array();
$existingtags = tag_get_tags('question', $newquestion);
// Re-add all the existitng tags
foreach ($existingtags as $existingtag) {
$tags[] = $existingtag->rawname;
}
// Add the one being restored
$tags[] = $data->rawname;
// Send all the tags back to the question
tag_set('question', $newquestion, $tags);
}
}
protected function after_execute() {
global $DB;
+7 -1
View File
@@ -822,7 +822,7 @@ abstract class restore_dbops {
* @return array of result object
*/
public static function send_files_to_pool($basepath, $restoreid, $component, $filearea, $oldcontextid, $dfltuserid, $itemname = null, $olditemid = null, $forcenewcontextid = null, $skipparentitemidctxmatch = false) {
global $DB;
global $DB, $CFG;
$results = array();
@@ -917,6 +917,12 @@ abstract class restore_dbops {
// create the file in the filepool if it does not exist yet
if (!$fs->file_exists($newcontextid, $component, $filearea, $rec->newitemid, $file->filepath, $file->filename)) {
// If no license found, use default.
if ($file->license == null){
$file->license = $CFG->sitedefaultlicense;
}
$file_record = array(
'contextid' => $newcontextid,
'component' => $component,
+24 -1
View File
@@ -521,6 +521,15 @@ class core_backup_renderer extends plugin_renderer_base {
$url = $component->get_url();
$output = html_writer::start_tag('div', array('class' => 'restore-course-search'));
$countstr = '';
if ($component->has_more_results()) {
$countstr = get_string('morecoursesearchresults', 'backup', $component->get_count());
} else {
$countstr = get_string('totalcoursesearchresults', 'backup', $component->get_count());
}
$output .= html_writer::tag('div', $countstr, array('class'=>'rcs-totalresults'));
$output .= html_writer::start_tag('div', array('class' => 'rcs-results'));
$table = new html_table();
@@ -590,8 +599,14 @@ class core_backup_renderer extends plugin_renderer_base {
return $output;
}
$output .= html_writer::tag('div', get_string('totalcoursesearchresults', 'backup', $component->get_count()), array('class'=>'ics-totalresults'));
$countstr = '';
if ($component->has_more_results()) {
$countstr = get_string('morecoursesearchresults', 'backup', $component->get_count());
} else {
$countstr = get_string('totalcoursesearchresults', 'backup', $component->get_count());
}
$output .= html_writer::tag('div', $countstr, array('class'=>'ics-totalresults'));
$output .= html_writer::start_tag('div', array('class' => 'ics-results'));
$table = new html_table();
@@ -610,6 +625,14 @@ class core_backup_renderer extends plugin_renderer_base {
);
$table->data[] = $row;
}
if ($component->has_more_results()) {
$cell = new html_table_cell(get_string('moreresults', 'backup'));
$cell->colspan = 3;
$cell->attributes['class'] = 'notifyproblem';
$row = new html_table_row(array($cell));
$row->attributes['class'] = 'rcs-course';
$table->data[] = $row;
}
$output .= html_writer::table($table);
$output .= html_writer::end_tag('div');
+16 -5
View File
@@ -65,6 +65,11 @@ abstract class restore_search_base implements renderable {
* @var array
*/
private $requiredcapabilities = array();
/**
* Indicates if we have more than maxresults found.
* @var boolean
*/
private $hasmoreresults = false;
/**
* Constructor
@@ -177,7 +182,7 @@ abstract class restore_search_base implements renderable {
foreach ($this->requiredcapabilities as $cap) {
$requiredcaps[] = $cap['capability'];
}
// Iterate while we have records and haven't reached MAXRESULTS
// Iterate while we have records and haven't reached $this->maxresults.
while ($totalcourses > $offs and $this->totalcount < self::$MAXRESULTS) {
$resultset = $DB->get_records_sql($sql, $params, $offs, $blocksz);
foreach ($resultset as $result) {
@@ -188,11 +193,14 @@ abstract class restore_search_base implements renderable {
continue;
}
}
$this->results[$result->id] = $result;
$this->totalcount++;
if ($this->totalcount >= self::$MAXRESULTS) {
// Check if we are over the limit.
if ($this->totalcount+1 > self::$MAXRESULTS) {
$this->hasmoreresults = true;
break;
}
// If not, then continue.
$this->totalcount++;
$this->results[$result->id] = $result;
}
$offs += $blocksz;
}
@@ -201,7 +209,10 @@ abstract class restore_search_base implements renderable {
}
final public function has_more_results() {
return $this->get_count() >= self::$MAXRESULTS;
if ($this->results === null) {
$this->search();
}
return $this->hasmoreresults;
}
/**
+2 -2
View File
@@ -216,9 +216,9 @@ if (empty($completions)) {
echo '(<i>';
if ($agg == COMPLETION_AGGREGATION_ALL) {
echo strtolower(get_string('aggregateall', 'completion'));
echo strtolower(get_string('all', 'completion'));
} else {
echo strtolower(get_string('aggregateany', 'completion'));
echo strtolower(get_string('any', 'completion'));
}
echo '</i> '.strtolower(get_string('required')).')';
+1 -7
View File
@@ -183,13 +183,7 @@ if (!empty($userid)) {
print_error('donothaveblog', 'blog');
}
} else {
$personalcontext = get_context_instance(CONTEXT_USER, $userid);
if (!has_capability('moodle/blog:view', $sitecontext) && !has_capability('moodle/user:readuserblogs', $personalcontext)) {
print_error('cannotviewuserblog', 'blog');
}
if (!blog_user_can_view_user_entry($userid)) {
if (!has_capability('moodle/blog:view', $sitecontext) || !blog_user_can_view_user_entry($userid)) {
print_error('cannotviewcourseblog', 'blog');
}
+38 -15
View File
@@ -65,35 +65,36 @@ function blog_user_can_view_user_entry($targetuserid, $blogentry=null) {
global $CFG, $USER, $DB;
if (empty($CFG->bloglevel)) {
return false; // blog system disabled
return false; // Blog system disabled.
}
if (isloggedin() && $USER->id == $targetuserid) {
return true; // can view own entries in any case
return true; // Can view own entries in any case.
}
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
if (has_capability('moodle/blog:manageentries', $sitecontext)) {
return true; // can manage all entries
return true; // Can manage all entries.
}
// coming for 1 entry, make sure it's not a draft
// If blog is in draft state, then make sure user have proper capability.
if ($blogentry && $blogentry->publishstate == 'draft' && !has_capability('moodle/blog:viewdrafts', $sitecontext)) {
return false; // can not view draft of others
return false; // Can not view draft of others.
}
// coming for 0 entry, make sure user is logged in, if not a public blog
// If blog entry is not public, make sure user is logged in.
if ($blogentry && $blogentry->publishstate != 'public' && !isloggedin()) {
return false;
}
// If blogentry is not passed or all above checks pass, then check capability based on system config.
switch ($CFG->bloglevel) {
case BLOG_GLOBAL_LEVEL:
return true;
break;
case BLOG_SITE_LEVEL:
if (isloggedin()) { // not logged in viewers forbidden
if (isloggedin()) { // Not logged in viewers forbidden.
return true;
}
return false;
@@ -101,6 +102,7 @@ function blog_user_can_view_user_entry($targetuserid, $blogentry=null) {
case BLOG_USER_LEVEL:
default:
// If user is viewing other user blog, then user should have user:readuserblogs capability.
$personalcontext = get_context_instance(CONTEXT_USER, $targetuserid);
return has_capability('moodle/user:readuserblogs', $personalcontext);
break;
@@ -1001,6 +1003,8 @@ function blog_get_associated_count($courseid, $cmid=null) {
* may have switch to turn on/off comments option, this callback will
* affect UI display, not like pluginname_comment_validate only throw
* exceptions.
* blog_comment_validate will be called before viewing/adding/deleting
* comment, so don't repeat checks.
* Capability check has been done in comment->check_permissions(), we
* don't need to do it again here.
*
@@ -1017,7 +1021,17 @@ function blog_get_associated_count($courseid, $cmid=null) {
* @return array
*/
function blog_comment_permissions($comment_param) {
return array('post'=>true, 'view'=>true);
global $DB;
// If blog is public and current usre is guest, then don't let him post comments.
$blogentry = $DB->get_record('post', array('id' => $comment_param->itemid), 'publishstate', MUST_EXIST);
if ($blogentry->publishstate != 'public') {
if (!isloggedin() || isguestuser()) {
return array('post' => false, 'view' => true);
}
}
return array('post' => true, 'view' => true);
}
/**
@@ -1036,16 +1050,21 @@ function blog_comment_permissions($comment_param) {
* @return boolean
*/
function blog_comment_validate($comment_param) {
global $DB;
// validate comment itemid
if (!$entry = $DB->get_record('post', array('id'=>$comment_param->itemid))) {
throw new comment_exception('invalidcommentitemid');
global $CFG, $DB, $USER;
// Check if blogs are enabled user can comment.
if (empty($CFG->bloglevel) || empty($CFG->blogusecomments)) {
throw new comment_exception('nopermissiontocomment');
}
// validate comment area
// Validate comment area.
if ($comment_param->commentarea != 'format_blog') {
throw new comment_exception('invalidcommentarea');
}
// validation for comment deletion
$blogentry = $DB->get_record('post', array('id' => $comment_param->itemid), '*', MUST_EXIST);
// Validation for comment deletion.
if (!empty($comment_param->commentid)) {
if ($record = $DB->get_record('comments', array('id'=>$comment_param->commentid))) {
if ($record->commentarea != 'format_blog') {
@@ -1061,7 +1080,11 @@ function blog_comment_validate($comment_param) {
throw new comment_exception('invalidcommentid');
}
}
return true;
// Validate if user has blog view permission.
$sitecontext = context_system::instance();
return has_capability('moodle/blog:view', $sitecontext) &&
blog_user_can_view_user_entry($blogentry->userid, $blogentry);
}
/**
+1 -1
View File
@@ -520,7 +520,7 @@ class comment {
$c->format = $u->cformat;
$c->timecreated = $u->ctimecreated;
$url = new moodle_url('/user/view.php', array('id'=>$u->id, 'course'=>$this->courseid));
$c->profileurl = $url->out(false);
$c->profileurl = $url->out(true);
$c->fullname = fullname($u);
$c->time = userdate($c->timecreated, get_string('strftimerecent', 'langconfig'));
$c->content = format_text($c->content, $c->format, $formatoptions);
+6
View File
@@ -61,6 +61,12 @@ $context = $PAGE->context;
// And the object has been loaded for us no need for another DB call
$category = $PAGE->category;
// This needs to match caps checked in can_edit_in_category below.
$PAGE->set_other_editing_capability(array(
'moodle/category:manage',
'moodle/course:create'
));
$canedit = can_edit_in_category($category->id);
if ($canedit) {
if ($categoryedit !== -1) {
+1 -1
View File
@@ -51,7 +51,7 @@ function dndupload_add_to_course($course, $modnames) {
// Add the javascript to the page.
$jsmodule = array(
'name' => 'coursedndupload',
'fullpath' => new moodle_url('/course/dndupload.js'),
'fullpath' => '/course/dndupload.js',
'strings' => array(
array('addfilehere', 'moodle'),
array('dndworkingfiletextlink', 'moodle'),
+56 -53
View File
@@ -108,6 +108,7 @@ class core_course_external extends external_api {
$sections = get_all_sections($course->id);
//for each sections (first displayed to last displayed)
$modinfosections = $modinfo->get_sections();
foreach ($sections as $key => $section) {
$showsection = (has_capability('moodle/course:viewhiddensections', $context) or $section->visible or !$course->hiddensections);
@@ -126,62 +127,64 @@ class core_course_external extends external_api {
$sectioncontents = array();
//for each module of the section
foreach ($modinfo->sections[$section->section] as $cmid) { //matching /course/lib.php:print_section() logic
$cm = $modinfo->cms[$cmid];
if (!empty($modinfosections[$section->section])) {
foreach ($modinfosections[$section->section] as $cmid) {
$cm = $modinfo->cms[$cmid];
// stop here if the module is not visible to the user
if (!$cm->uservisible) {
continue;
}
$module = array();
//common info (for people being able to see the module or availability dates)
$module['id'] = $cm->id;
$module['name'] = format_string($cm->name, true);
$module['modname'] = $cm->modname;
$module['modplural'] = $cm->modplural;
$module['modicon'] = $cm->get_icon_url()->out(false);
$module['indent'] = $cm->indent;
$modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);
if (!empty($cm->showdescription)) {
$module['description'] = $cm->get_content();
}
//url of the module
$url = $cm->get_url();
if ($url) { //labels don't have url
$module['url'] = $cm->get_url()->out();
}
$canviewhidden = has_capability('moodle/course:viewhiddenactivities',
get_context_instance(CONTEXT_MODULE, $cm->id));
//user that can view hidden module should know about the visibility
$module['visible'] = $cm->visible;
//availability date (also send to user who can see hidden module when the showavailabilyt is ON)
if ($canupdatecourse or ($CFG->enableavailability && $canviewhidden && $cm->showavailability)) {
$module['availablefrom'] = $cm->availablefrom;
$module['availableuntil'] = $cm->availableuntil;
}
$baseurl = 'webservice/pluginfile.php';
//call $modulename_export_contents
//(each module callback take care about checking the capabilities)
require_once($CFG->dirroot . '/mod/' . $cm->modname . '/lib.php');
$getcontentfunction = $cm->modname.'_export_contents';
if (function_exists($getcontentfunction)) {
if ($contents = $getcontentfunction($cm, $baseurl)) {
$module['contents'] = $contents;
// stop here if the module is not visible to the user
if (!$cm->uservisible) {
continue;
}
$module = array();
//common info (for people being able to see the module or availability dates)
$module['id'] = $cm->id;
$module['name'] = format_string($cm->name, true);
$module['modname'] = $cm->modname;
$module['modplural'] = $cm->modplural;
$module['modicon'] = $cm->get_icon_url()->out(false);
$module['indent'] = $cm->indent;
$modcontext = context_module::instance($cm->id);
if (!empty($cm->showdescription)) {
$module['description'] = $cm->get_content();
}
//url of the module
$url = $cm->get_url();
if ($url) { //labels don't have url
$module['url'] = $cm->get_url()->out();
}
$canviewhidden = has_capability('moodle/course:viewhiddenactivities',
context_module::instance($cm->id));
//user that can view hidden module should know about the visibility
$module['visible'] = $cm->visible;
//availability date (also send to user who can see hidden module when the showavailabilyt is ON)
if ($canupdatecourse or ($CFG->enableavailability && $canviewhidden && $cm->showavailability)) {
$module['availablefrom'] = $cm->availablefrom;
$module['availableuntil'] = $cm->availableuntil;
}
$baseurl = 'webservice/pluginfile.php';
//call $modulename_export_contents
//(each module callback take care about checking the capabilities)
require_once($CFG->dirroot . '/mod/' . $cm->modname . '/lib.php');
$getcontentfunction = $cm->modname.'_export_contents';
if (function_exists($getcontentfunction)) {
if ($contents = $getcontentfunction($cm, $baseurl)) {
$module['contents'] = $contents;
}
}
//assign result to $sectioncontents
$sectioncontents[] = $module;
}
//assign result to $sectioncontents
$sectioncontents[] = $module;
}
$sectionvalues['modules'] = $sectioncontents;
+1 -1
View File
@@ -324,7 +324,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base {
* @param array $mods course modules indexed by id (from get_all_mods)
* @return string HTML to output.
*/
private function section_activity_summary($section, $course, $mods) {
protected function section_activity_summary($section, $course, $mods) {
if (empty($section->sequence)) {
return '';
}
+6
View File
@@ -44,6 +44,12 @@ $PAGE->set_url('/course/index.php');
$PAGE->set_context($systemcontext);
$PAGE->set_pagelayout('admin');
// This needs to match caps checked in can_edit_in_category below.
$PAGE->set_other_editing_capability(array(
'moodle/category:manage',
'moodle/course:create'
));
if (can_edit_in_category()) {
if ($categoryedit !== -1) {
$USER->editing = $categoryedit;
+33 -20
View File
@@ -857,7 +857,9 @@ function print_overview($courses, array $remote_courses=array()) {
foreach ($courses as $course) {
$fullname = format_string($course->fullname, true, array('context' => get_context_instance(CONTEXT_COURSE, $course->id)));
echo $OUTPUT->box_start('coursebox');
$attributes = array('title' => s($fullname));
// decode &amp;'s. format_string above will have encoded them and html_writer will encode again when it processed the title
// attribute leading to double encoding.
$attributes = array('title' => str_replace('&amp;', '&', $fullname));
if (empty($course->visible)) {
$attributes['class'] = 'dimmed';
}
@@ -1727,13 +1729,15 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
'type' => 'hidden', 'name' => 'completionstate',
'value' => $newstate));
echo html_writer::empty_tag('input', array(
'type' => 'image', 'src' => $imgsrc, 'alt' => $imgalt, 'title' => $imgtitle));
'type' => 'image', 'src' => $imgsrc, 'alt' => $imgalt, 'title' => $imgtitle,
'aria-live' => 'polite'));
echo html_writer::end_tag('div');
echo html_writer::end_tag('form');
} else {
// In auto mode, or when editing, the icon is just an image
echo "<span class='autocompletion'>";
echo "<img src='$imgsrc' alt='$imgalt' title='$imgalt' /></span>";
// In auto mode, or when editing, the icon is just an image.
echo html_writer::tag('span', html_writer::empty_tag('img', array(
'src' => $imgsrc, 'alt' => $imgalt, 'title' => $imgalt)),
array('class' => 'autocompletion'));
}
}
}
@@ -2916,16 +2920,23 @@ function set_coursemodule_visible($id, $visible, $prevstateoverrides=false) {
}
}
$cminfo = new stdClass();
$cminfo->id = $id;
$cminfo->visible = $visible;
if ($prevstateoverrides) {
if ($visible == '0') {
// Remember the current visible state so we can toggle this back.
$DB->set_field('course_modules', 'visibleold', $cm->visible, array('id'=>$id));
// If we making whole section visiblility change..
if ($visible == 0) {
// Retain previous visibility state.
$cminfo->visibleold = $cm->visible;
} else {
// Get the previous saved visible states.
return $DB->set_field('course_modules', 'visible', $cm->visibleold, array('id'=>$id));
// Restore previous visibility state.
$cminfo->visible = $cm->visibleold;
}
} else {
$cminfo->visibleold = $visible;
}
return $DB->set_field("course_modules", "visible", $visible, array("id"=>$id));
return $DB->update_record('course_modules', $cminfo);
}
/**
@@ -3166,15 +3177,17 @@ function moveto_module($mod, $section, $beforemod=NULL) {
/// Update module itself if necessary
// If moving to a hidden section then hide module.
if (!$section->visible && $mod->visible) {
// Set this in the object because it is sent as a response to ajax calls.
set_coursemodule_visible($mod->id, 0, true);
$mod->visible = 0;
}
if ($section->visible && !$mod->visible) {
set_coursemodule_visible($mod->id, 1, true);
// Set this in the object because it is sent as a response to ajax calls.
$mod->visible = $mod->visibleold;
if ($mod->section != $section->id) {
if (!$section->visible && $mod->visible) {
// Set this in the object because it is sent as a response to ajax calls.
set_coursemodule_visible($mod->id, 0, true);
$mod->visible = 0;
}
if ($section->visible && !$mod->visible) {
set_coursemodule_visible($mod->id, 1, true);
// Set this in the object because it is sent as a response to ajax calls.
$mod->visible = $mod->visibleold;
}
}
/// Add the module into the new section
+10 -7
View File
@@ -4,13 +4,22 @@
require_once('../config.php');
require_once('lib.php');
$id = optional_param('id', SITEID, PARAM_INT); // course id
$id = optional_param('id', SITEID, PARAM_INT); // course id
$redirect = optional_param('redirect', 0, PARAM_BOOL);
$url = new moodle_url('/course/loginas.php', array('id'=>$id));
$PAGE->set_url($url);
/// Reset user back to their real self if needed, for security reasons you need to log out and log in again
if (session_is_loggedinas()) {
require_sesskey();
require_logout();
// We can not set wanted URL here because the session is closed.
redirect(new moodle_url($url, array('redirect'=>1)));
}
if ($redirect) {
if ($id and $id != SITEID) {
$SESSION->wantsurl = "$CFG->wwwroot/course/view.php?id=".$id;
} else {
@@ -25,12 +34,6 @@ if (session_is_loggedinas()) {
$userid = required_param('user', PARAM_INT); // login as this user
$url = new moodle_url('/course/loginas.php', array('user'=>$userid, 'sesskey'=>sesskey()));
if ($id !== SITEID) {
$url->param('id', $id);
}
$PAGE->set_url($url);
require_sesskey();
$course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST);
+2 -2
View File
@@ -335,7 +335,7 @@ if ($mform->is_cancelled()) {
$cm->groupmembersonly = $fromform->groupmembersonly;
$completion = new completion_info($course);
if ($completion->is_enabled()) {
if ($completion->is_enabled() && !empty($fromform->completionunlocked)) {
// Update completion settings
$cm->completion = $fromform->completion;
$cm->completiongradeitemnumber = $fromform->completiongradeitemnumber;
@@ -412,6 +412,7 @@ if ($mform->is_cancelled()) {
$newcm->module = $fromform->module;
$newcm->instance = 0; // not known yet, will be updated later (this is similar to restore code)
$newcm->visible = $fromform->visible;
$newcm->visibleold = $fromform->visible;
$newcm->groupmode = $fromform->groupmode;
$newcm->groupingid = $fromform->groupingid;
$newcm->groupmembersonly = $fromform->groupmembersonly;
@@ -481,7 +482,6 @@ if ($mform->is_cancelled()) {
// make sure visibility is set correctly (in particular in calendar)
// note: allow them to set it even without moodle/course:activityvisibility
set_coursemodule_visible($fromform->coursemodule, $fromform->visible);
$DB->set_field('course_modules', 'visibleold', 1, array('id' => $fromform->coursemodule));
if (isset($fromform->cmidnumber)) { //label
// set cm idnumber - uniqueness is already verified by form validation
+5 -2
View File
@@ -303,8 +303,11 @@ abstract class moodleform_mod extends moodleform {
}
// Completion: Don't let them choose automatic completion without turning
// on some conditions
if (array_key_exists('completion', $data) && $data['completion']==COMPLETION_TRACKING_AUTOMATIC) {
// on some conditions. Ignore this check when completion settings are
// locked, as the options are then disabled.
if (array_key_exists('completion', $data) &&
$data['completion'] == COMPLETION_TRACKING_AUTOMATIC &&
!empty($data['completionunlocked'])) {
if (empty($data['completionview']) && empty($data['completionusegrade']) &&
!$this->completion_rule_enabled($data)) {
$errors['completion'] = get_string('badautocompletion', 'completion');
+23 -6
View File
@@ -30,6 +30,7 @@ require_once('recent_form.php');
$id = required_param('id', PARAM_INT);
$PAGE->set_url('/course/recent.php', array('id'=>$id));
$PAGE->set_pagelayout('report');
if (!$course = $DB->get_record('course', array('id'=>$id))) {
print_error("That's an invalid course id");
@@ -280,21 +281,37 @@ echo $OUTPUT->footer();
function compare_activities_by_time_desc($a, $b) {
// make sure the activities actually have a timestamp property
if ((!array_key_exists('timestamp', $a)) or (!array_key_exists('timestamp', $b))) {
return 0;
}
if ($a->timestamp == $b->timestamp)
if ((!array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
return 0;
}
// We treat instances without timestamp as if they have a timestamp of 0.
if ((!array_key_exists('timestamp', $a)) && (array_key_exists('timestamp', $b))) {
return 1;
}
if ((array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
return -1;
}
if ($a->timestamp == $b->timestamp) {
return 0;
}
return ($a->timestamp > $b->timestamp) ? -1 : 1;
}
function compare_activities_by_time_asc($a, $b) {
// make sure the activities actually have a timestamp property
if ((!array_key_exists('timestamp', $a)) or (!array_key_exists('timestamp', $b))) {
if ((!array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
return 0;
}
if ($a->timestamp == $b->timestamp)
// We treat instances without timestamp as if they have a timestamp of 0.
if ((!array_key_exists('timestamp', $a)) && (array_key_exists('timestamp', $b))) {
return -1;
}
if ((array_key_exists('timestamp', $a)) && (!array_key_exists('timestamp', $b))) {
return 1;
}
if ($a->timestamp == $b->timestamp) {
return 0;
}
return ($a->timestamp < $b->timestamp) ? -1 : 1;
}
+2 -6
View File
@@ -191,18 +191,14 @@ class core_course_renderer extends plugin_renderer_base {
$formcontent .= html_writer::start_tag('div', array('class' => 'alloptions'));
// Activities
$activities = array_filter($modules, function($mod) {
return ($mod->archetype !== MOD_ARCHETYPE_RESOURCE && $mod->archetype !== MOD_ARCHETYPE_SYSTEM);
});
$activities = array_filter($modules, create_function('$mod', 'return ($mod->archetype !== MOD_ARCHETYPE_RESOURCE && $mod->archetype !== MOD_ARCHETYPE_SYSTEM);'));
if (count($activities)) {
$formcontent .= $this->course_modchooser_title('activities');
$formcontent .= $this->course_modchooser_module_types($activities);
}
// Resources
$resources = array_filter($modules, function($mod) {
return ($mod->archetype === MOD_ARCHETYPE_RESOURCE);
});
$resources = array_filter($modules, create_function('$mod', 'return ($mod->archetype === MOD_ARCHETYPE_RESOURCE);'));
if (count($resources)) {
$formcontent .= $this->course_modchooser_title('resources');
$formcontent .= $this->course_modchooser_module_types($resources);
+261
View File
@@ -290,4 +290,265 @@ class courselib_testcase extends advanced_testcase {
// Check that the section number has been changed in the cm
$this->assertEquals($newsection->id, $cm->section);
}
public function test_module_visibility() {
$this->setAdminUser();
$this->resetAfterTest(true);
// Create course and modules.
$course = $this->getDataGenerator()->create_course(array('numsections' => 5));
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id));
$page = $this->getDataGenerator()->create_module('page', array('duedate' => time(), 'course' => $course->id));
$modules = compact('forum', 'page');
// Hiding the modules.
foreach ($modules as $mod) {
set_coursemodule_visible($mod->cmid, 0);
$this->check_module_visibility($mod, 0, 0);
}
// Showing the modules.
foreach ($modules as $mod) {
set_coursemodule_visible($mod->cmid, 1);
$this->check_module_visibility($mod, 1, 1);
}
}
public function test_section_visibility() {
$this->setAdminUser();
$this->resetAfterTest(true);
// Create course.
$course = $this->getDataGenerator()->create_course(array('numsections' => 3), array('createsections' => true));
// Testing an empty section.
$sectionnumber = 1;
set_section_visible($course->id, $sectionnumber, 0);
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
$this->assertEquals($section_info->visible, 0);
set_section_visible($course->id, $sectionnumber, 1);
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
$this->assertEquals($section_info->visible, 1);
// Testing a section with visible modules.
$sectionnumber = 2;
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id),
array('section' => $sectionnumber));
$page= $this->getDataGenerator()->create_module('page', array('duedate' => time(),
'course' => $course->id), array('section' => $sectionnumber));
$modules = compact('forum', 'page');
set_section_visible($course->id, $sectionnumber, 0);
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
$this->assertEquals($section_info->visible, 0);
foreach ($modules as $mod) {
$this->check_module_visibility($mod, 0, 1);
}
set_section_visible($course->id, $sectionnumber, 1);
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
$this->assertEquals($section_info->visible, 1);
foreach ($modules as $mod) {
$this->check_module_visibility($mod, 1, 1);
}
// Testing a section with hidden modules, which should stay hidden.
$sectionnumber = 3;
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id),
array('section' => $sectionnumber));
$page = $this->getDataGenerator()->create_module('page', array('duedate' => time(),
'course' => $course->id), array('section' => $sectionnumber));
$modules = compact('forum', 'page');
foreach ($modules as $mod) {
set_coursemodule_visible($mod->cmid, 0);
$this->check_module_visibility($mod, 0, 0);
}
set_section_visible($course->id, $sectionnumber, 0);
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
$this->assertEquals($section_info->visible, 0);
foreach ($modules as $mod) {
$this->check_module_visibility($mod, 0, 0);
}
set_section_visible($course->id, $sectionnumber, 1);
$section_info = get_fast_modinfo($course)->get_section_info($sectionnumber);
$this->assertEquals($section_info->visible, 1);
foreach ($modules as $mod) {
$this->check_module_visibility($mod, 0, 0);
}
}
/**
* Helper function to assert that a module has correctly been made visible, or hidden.
*
* @param stdClass $mod module information
* @param int $visibility the current state of the module
* @param int $visibleold the current state of the visibleold property
* @return void
*/
public function check_module_visibility($mod, $visibility, $visibleold) {
global $DB;
rebuild_course_cache($mod->course);
$course = $DB->get_record('course', array('id' => $mod->course));
$cm = get_fast_modinfo($course)->get_cm($mod->cmid);
$this->assertEquals($visibility, $cm->visible);
$this->assertEquals($visibleold, $cm->visibleold);
// Check the module grade items.
$grade_items = grade_item::fetch_all(array('itemtype' => 'mod', 'itemmodule' => $cm->modname,
'iteminstance' => $cm->instance, 'courseid' => $cm->course));
if ($grade_items) {
foreach ($grade_items as $grade_item) {
if ($visibility) {
$this->assertFalse($grade_item->is_hidden(), "$cm->modname grade_item not visible");
} else {
$this->assertTrue($grade_item->is_hidden(), "$cm->modname grade_item not hidden");
}
}
}
// Check the events visibility.
if ($events = $DB->get_records('event', array('instance' => $cm->instance, 'modulename' => $cm->modname))) {
foreach ($events as $event) {
$calevent = new calendar_event($event);
$this->assertEquals($visibility, $calevent->visible, "$cm->modname calendar_event visibility");
}
}
}
/**
* Tests moving a module between hidden/visible sections and
* verifies that the course/module visiblity seettings are
* retained.
*/
public function test_moveto_module_between_hidden_sections() {
global $DB;
$this->resetAfterTest(true);
$course = $this->getDataGenerator()->create_course(array('numsections' => 4), array('createsections' => true));
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id));
$page = $this->getDataGenerator()->create_module('page', array('course' => $course->id));
$quiz= $this->getDataGenerator()->create_module('quiz', array('course' => $course->id));
// Set the page as hidden
set_coursemodule_visible($page->cmid, 0);
// Set sections 3 as hidden.
set_section_visible($course->id, 3, 0);
$modinfo = get_fast_modinfo($course);
$hiddensection = $modinfo->get_section_info(3);
// New section is definitely not visible:
$this->assertEquals($hiddensection->visible, 0);
$forumcm = $modinfo->cms[$forum->cmid];
$pagecm = $modinfo->cms[$page->cmid];
// Move the forum and the page to a hidden section.
moveto_module($forumcm, $hiddensection);
moveto_module($pagecm, $hiddensection);
// Reset modinfo cache.
$reset = 'reset';
get_fast_modinfo($reset);
$modinfo = get_fast_modinfo($course);
// Verify that forum and page have been moved to the hidden section and quiz has not.
$this->assertContains($forum->cmid, $modinfo->sections[3]);
$this->assertContains($page->cmid, $modinfo->sections[3]);
$this->assertNotContains($quiz->cmid, $modinfo->sections[3]);
// Verify that forum has been made invisible.
$forumcm = $modinfo->cms[$forum->cmid];
$this->assertEquals($forumcm->visible, 0);
// Verify that old state has been retained.
$this->assertEquals($forumcm->visibleold, 1);
// Verify that page has stayed invisible.
$pagecm = $modinfo->cms[$page->cmid];
$this->assertEquals($pagecm->visible, 0);
// Verify that old state has been retained.
$this->assertEquals($pagecm->visibleold, 0);
// Verify that quiz has been unaffected.
$quizcm = $modinfo->cms[$quiz->cmid];
$this->assertEquals($quizcm->visible, 1);
// Move forum and page back to visible section.
$visiblesection = $modinfo->get_section_info(2);
moveto_module($forumcm, $visiblesection);
moveto_module($pagecm, $visiblesection);
// Reset modinfo cache.
$reset = 'reset';
get_fast_modinfo($reset);
$modinfo = get_fast_modinfo($course);
// Verify that forum has been made visible.
$forumcm = $modinfo->cms[$forum->cmid];
$this->assertEquals($forumcm->visible, 1);
// Verify that page has stayed invisible.
$pagecm = $modinfo->cms[$page->cmid];
$this->assertEquals($pagecm->visible, 0);
// Move the page in the same section (this is what mod duplicate does_
moveto_module($pagecm, $visiblesection, $forumcm);
// Reset modinfo cache.
$reset = 'reset';
get_fast_modinfo($reset);
// Verify that the the page is still hidden
$modinfo = get_fast_modinfo($course);
$pagecm = $modinfo->cms[$page->cmid];
$this->assertEquals($pagecm->visible, 0);
}
/**
* Tests moving a module around in the same section. moveto_module()
* is called this way in modduplicate.
*/
public function test_moveto_module_in_same_section() {
global $DB;
$this->resetAfterTest(true);
$course = $this->getDataGenerator()->create_course(array('numsections' => 3), array('createsections' => true));
$page = $this->getDataGenerator()->create_module('page', array('course' => $course->id));
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id));
// Simulate inconsistent visible/visibleold values (MDL-38713).
$cm = $DB->get_record('course_modules', array('id' => $page->cmid), '*', MUST_EXIST);
$cm->visible = 0;
$cm->visibleold = 1;
$DB->update_record('course_modules', $cm);
$modinfo = get_fast_modinfo($course);
$forumcm = $modinfo->cms[$forum->cmid];
$pagecm = $modinfo->cms[$page->cmid];
// Verify that page is hidden.
$this->assertEquals($pagecm->visible, 0);
// Verify section 0 is where all mods added.
$section = $modinfo->get_section_info(0);
$this->assertEquals($section->id, $forumcm->section);
$this->assertEquals($section->id, $pagecm->section);
// Move the forum and the page to a hidden section.
moveto_module($pagecm, $section, $forumcm);
// Reset modinfo cache.
$reset = 'reset';
get_fast_modinfo($reset);
// Verify that the the page is still hidden
$modinfo = get_fast_modinfo($course);
$pagecm = $modinfo->cms[$page->cmid];
$this->assertEquals($pagecm->visible, 0);
}
}
+4 -1
View File
@@ -508,7 +508,9 @@ YUI.add('moodle-course-toolboxes', function(Y) {
.setAttrs({
'name' : 'title',
'value' : titletext,
'autocomplete' : 'off'
'autocomplete' : 'off',
'aria-describedby' : 'id_editinstructions',
'maxLength' : '255'
})
.addClass('titleeditor');
var editform = Y.Node.create('<form />')
@@ -518,6 +520,7 @@ YUI.add('moodle-course-toolboxes', function(Y) {
var editinstructions = Y.Node.create('<span />')
.addClass('editinstructions')
.setAttrs({'id' : 'id_editinstructions'})
.set('innerHTML', M.util.get_string('edittitleinstructions', 'moodle'));
// Clear the existing content and put the editor in
+1 -1
View File
@@ -87,7 +87,7 @@ class core_enrol_external extends external_api {
}
list($enrolledsqlselect, $enrolledparams) = get_enrolled_sql($context);
$enrolledsql = "SELECT COUNT(*) FROM ($enrolledsqlselect) AS enrolleduserids";
$enrolledsql = "SELECT COUNT('x') FROM ($enrolledsqlselect) enrolleduserids";
$enrolledusercount = $DB->count_records_sql($enrolledsql, $enrolledparams);
$result[] = array('id'=>$course->id, 'shortname'=>$course->shortname, 'fullname'=>$course->fullname, 'idnumber'=>$course->idnumber,'visible'=>$course->visible, 'enrolledusercount'=>$enrolledusercount);
+10
View File
@@ -406,3 +406,13 @@ class grade_export_update_buffer {
}
}
/**
* Verify that there is a valid set of grades to export.
* @param $courseid int The course being exported
*/
function export_verify_grades($courseid) {
$regraderesult = grade_regrade_final_grades($courseid);
if (is_array($regraderesult)) {
throw new moodle_exception('gradecantregrade', 'error', '', implode(', ', array_unique($regraderesult)));
}
}
+1
View File
@@ -34,6 +34,7 @@ require_capability('moodle/grade:export', $context);
require_capability('gradeexport/ods:view', $context);
print_grade_page_head($COURSE->id, 'export', 'ods', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_ods'));
export_verify_grades($COURSE->id);
if (!empty($CFG->gradepublishing)) {
$CFG->gradepublishing = has_capability('gradeexport/ods:publish', $context);
+1
View File
@@ -34,6 +34,7 @@ require_capability('moodle/grade:export', $context);
require_capability('gradeexport/txt:view', $context);
print_grade_page_head($COURSE->id, 'export', 'txt', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_txt'));
export_verify_grades($COURSE->id);
if (!empty($CFG->gradepublishing)) {
$CFG->gradepublishing = has_capability('gradeexport/txt:publish', $context);
+1
View File
@@ -34,6 +34,7 @@ require_capability('moodle/grade:export', $context);
require_capability('gradeexport/xls:view', $context);
print_grade_page_head($COURSE->id, 'export', 'xls', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_xls'));
export_verify_grades($COURSE->id);
if (!empty($CFG->gradepublishing)) {
$CFG->gradepublishing = has_capability('gradeexport/xls:publish', $context);
+1
View File
@@ -34,6 +34,7 @@ require_capability('moodle/grade:export', $context);
require_capability('gradeexport/xml:view', $context);
print_grade_page_head($COURSE->id, 'export', 'xml', get_string('exportto', 'grades') . ' ' . get_string('pluginname', 'gradeexport_xml'));
export_verify_grades($COURSE->id);
if (!empty($CFG->gradepublishing)) {
$CFG->gradepublishing = has_capability('gradeexport/xml:publish', $context);
@@ -36,7 +36,7 @@ $string['criterionmovedown'] = 'Move down';
$string['criterionmoveup'] = 'Move up';
$string['definerubric'] = 'Define rubric';
$string['description'] = 'Description';
$string['enableremarks'] = 'Allow grader to add text remarks for each criteria';
$string['enableremarks'] = 'Allow grader to add text remarks for each criterion';
$string['err_mintwolevels'] = 'Each criterion must have at least two levels';
$string['err_nocriteria'] = 'Rubric must contain at least one criterion';
$string['err_nodefinition'] = 'Level definition can not be empty';
+4 -3
View File
@@ -22,7 +22,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once $CFG->libdir.'/gradelib.php';
require_once($CFG->libdir . '/gradelib.php');
require_once($CFG->dirroot . '/grade/export/lib.php');
/**
* This class iterates over all users that are graded in a course.
@@ -123,7 +124,7 @@ class graded_users_iterator {
$this->close();
grade_regrade_final_grades($this->course->id);
export_verify_grades($this->course->id);
$course_item = grade_item::fetch_course_item($this->course->id);
if ($course_item->needsupdate) {
// can not calculate all final grades - sorry
@@ -2424,7 +2425,7 @@ abstract class grade_helper {
return self::$managesetting;
}
$context = get_context_instance(CONTEXT_COURSE, $courseid);
if (has_capability('moodle/course:update', $context)) {
if (has_capability('moodle/grade:manage', $context)) {
self::$managesetting = new grade_plugin_info('coursesettings', new moodle_url('/grade/edit/settings/index.php', array('id'=>$courseid)), get_string('course'));
} else {
self::$managesetting = false;
+8 -3
View File
@@ -357,7 +357,12 @@ abstract class grade_report {
// If we're dealing with multiple courses we need to know when we've moved on to a new course.
static $previous_courseid = null;
if( $this->showtotalsifcontainhidden==GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN ) {
if (!is_array($this->showtotalsifcontainhidden)) {
debugging('showtotalsifcontainhidden should be an array', DEBUG_DEVELOPER);
$this->showtotalsifcontainhidden = array($courseid => $this->showtotalsifcontainhidden);
}
if ($this->showtotalsifcontainhidden[$courseid] == GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN) {
return $finalgrade;
}
@@ -395,7 +400,7 @@ abstract class grade_report {
//if the item definitely depends on a hidden item
if (array_key_exists($course_item->id, $hiding_affected['altered'])) {
if( !$this->showtotalsifcontainhidden ) {
if( !$this->showtotalsifcontainhidden[$courseid] ) {
//hide the grade
$finalgrade = null;
}
@@ -405,7 +410,7 @@ abstract class grade_report {
}
} else if (!empty($hiding_affected['unknown'][$course_item->id])) {
//not sure whether or not this item depends on a hidden item
if( !$this->showtotalsifcontainhidden ) {
if( !$this->showtotalsifcontainhidden[$courseid] ) {
//hide the grade
$finalgrade = null;
}
+5 -2
View File
@@ -71,8 +71,6 @@ class grade_report_overview extends grade_report {
global $CFG, $COURSE, $DB;
parent::__construct($COURSE->id, $gpr, $context);
$this->showtotalsifcontainhidden = grade_get_setting($this->courseid, 'report_overview_showtotalsifcontainhidden', $CFG->grade_report_overview_showtotalsifcontainhidden);
// Get the user (for full name).
$this->user = $DB->get_record('user', array('id' => $userid));
@@ -81,12 +79,17 @@ class grade_report_overview extends grade_report {
$this->showrank = array();
$this->showrank['any'] = false;
$this->showtotalsifcontainhidden = array();
if ($this->courses) {
foreach ($this->courses as $course) {
$this->showrank[$course->id] = grade_get_setting($course->id, 'report_overview_showrank', !empty($CFG->grade_report_overview_showrank));
if ($this->showrank[$course->id]) {
$this->showrank['any'] = true;
}
$this->showtotalsifcontainhidden[$course->id] = grade_get_setting($course->id, 'report_overview_showtotalsifcontainhidden', $CFG->grade_report_overview_showtotalsifcontainhidden);
}
}
+7
View File
@@ -0,0 +1,7 @@
This files describes API changes in /grade/report/*,
information provided here is intended especially for developers.
=== 2.3.5, 2.4.2 ===
* class_grade_report::showtotalsifcontainhidden has been switched from a single integer value to an array.
The array keys are course IDs while the array values are the value of the course setting "report_overview_showtotalsifcontainhidden".
+1 -1
View File
@@ -165,7 +165,7 @@ class grade_report_user extends grade_report {
$this->showrank = grade_get_setting($this->courseid, 'report_user_showrank', $CFG->grade_report_user_showrank);
$this->showpercentage = grade_get_setting($this->courseid, 'report_user_showpercentage', $CFG->grade_report_user_showpercentage);
$this->showhiddenitems = grade_get_setting($this->courseid, 'report_user_showhiddenitems', $CFG->grade_report_user_showhiddenitems);
$this->showtotalsifcontainhidden = grade_get_setting($this->courseid, 'report_user_showtotalsifcontainhidden', $CFG->grade_report_user_showtotalsifcontainhidden);
$this->showtotalsifcontainhidden = array($this->courseid => grade_get_setting($this->courseid, 'report_user_showtotalsifcontainhidden', $CFG->grade_report_user_showtotalsifcontainhidden));
$this->showgrade = grade_get_setting($this->courseid, 'report_user_showgrade', !empty($CFG->grade_report_user_showgrade));
$this->showrange = grade_get_setting($this->courseid, 'report_user_showrange', !empty($CFG->grade_report_user_showrange));
+6 -6
View File
@@ -120,15 +120,15 @@ class gradereportlib_testcase extends advanced_testcase {
$report = new grade_report_test($course->id, $gpr, $coursecontext, $student);
// Should return the supplied student total grade regardless of hiding.
$report->showtotalsifcontainhidden = GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN;
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN);
$this->assertEquals($datagrade + $forumgrade, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
// Should blank the student total as course grade depends on a hidden item.
$report->showtotalsifcontainhidden = GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN;
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN);
$this->assertEquals(null, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
// Should return the course total minus the hidden database activity grade.
$report->showtotalsifcontainhidden = GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN;
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN);
$this->assertEquals($forumgrade, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
// Note: we cannot simply hide modules and call $report->blank_hidden_total() again.
@@ -182,16 +182,16 @@ class gradereportlib_testcase extends advanced_testcase {
$report = new grade_report_test($course->id, $gpr, $coursecontext, $student);
// Should return the supplied student total grade regardless of hiding.
$report->showtotalsifcontainhidden = GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN;
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN);
$this->assertEquals($datagrade + $forumgrade, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
// Should blank the student total as course grade depends on a hidden item.
$report->showtotalsifcontainhidden = GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN;
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN);
$this->assertEquals(null, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
// Should return the course total minus the hidden activity grades.
// They are both hidden so should return null.
$report->showtotalsifcontainhidden = GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN;
$report->showtotalsifcontainhidden = array($course->id => GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN);
$this->assertEquals(null, $report->blank_hidden_total($course->id, $coursegradeitem, $datagrade + $forumgrade));
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ $string['datarootpermission'] = 'Zugriffsrechte zum Datenverzeichnis';
$string['dbprefix'] = 'Tabellen-Prefix';
$string['dirroot'] = 'Moodle-Verzeichnis';
$string['environmenthead'] = 'Installationsvoraussetzungen werden geprüft ...';
$string['environmentsub2'] = 'Jede Moodle-Version hat Mindestvoraussetzungen für der PHP-Version und für verbindliche PHP-Extensions. Vor einer Installation oder einer Aktualisierung wird eine vollständige Prüfung durchgeführt. Bitte fragen Sie den Server-Administrator, wenn Sie mit der Installation einer neuen Version oder mit der Aktivierung von PHP-Extensions nicht weiterkommen.';
$string['environmentsub2'] = 'Jede Version hat Mindestvoraussetzungen für der PHP-Version und für verbindliche PHP-Extensions. Vor einer Installation oder einer Aktualisierung wird eine vollständige Prüfung durchgeführt. Bitte fragen Sie den Administrator des Servers, wenn Sie mit der Installation einer neuen Version oder mit der Aktivierung von PHP-Extensions nicht weiterkommen.';
$string['errorsinenvironment'] = 'Fehler bei der Prüfung der Systemvoraussetzungen!';
$string['installation'] = 'Installation';
$string['langdownloaderror'] = 'Leider konnte das Sprachpaket \'{$a}\' nicht heruntergeladen werden. Die Installation wird in englischer Sprache fortgesetzt.';
+1 -1
View File
@@ -41,7 +41,7 @@ $string['databasehost'] = 'Serveur de base de données';
$string['databasename'] = 'Nom de la base de données';
$string['databasetypehead'] = 'Sélectionner un pilote de base de données';
$string['dataroot'] = 'Dossier de données';
$string['datarootpermission'] = 'Permissions du dossier de données';
$string['datarootpermission'] = 'Droits d\'accès au dossier de données';
$string['dbprefix'] = 'Préfixe des tables';
$string['dirroot'] = 'Dossier Moodle';
$string['environmenthead'] = 'Vérification de l\'environnement...';
+12 -2
View File
@@ -30,5 +30,15 @@
defined('MOODLE_INTERNAL') || die();
$string['environmentrequireinstall'] = 'é solicitada para ser instalada/activada.';
$string['environmentrequireversion'] = 'Solicítase a versión {$a->needed} e está a executar a {$a->current}';
$string['clianswerno'] = 'n';
$string['cliansweryes'] = 's';
$string['cliincorrectvalueerror'] = 'Erro, o valor «{$a->value}» é incorrecto para «{$a->option}»';
$string['cliincorrectvalueretry'] = 'Valor incorrecto. Ténteo outra vez.';
$string['clitypevalue'] = 'valor do tipo';
$string['clitypevaluedefault'] = 'valor do tipo, prema Intro para empregar o valor predeterminado ({$a})';
$string['cliunknowoption'] = 'Opcións non recoñecidas:
{$a}
Use a opción --help.';
$string['cliyesnoprompt'] = 'escriba s (si) ou n (non)';
$string['environmentrequireinstall'] = 'debe ser instalado e activado';
$string['environmentrequireversion'] = 'requírese a versión {$a->needed} e está a executar a {$a->current}';
+10 -10
View File
@@ -30,16 +30,16 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatelangdir'] = 'Non pode crear directorio de idioma';
$string['cannotcreatetempdir'] = 'Non pode crear directorio de tempo';
$string['cannotdownloadcomponents'] = 'Non pode descargar compoñentes.';
$string['cannotdownloadzipfile'] = 'Non pode descargar ficheiros ZIP.';
$string['cannotfindcomponent'] = 'Non pode encontrar compoñentes';
$string['cannotsavemd5file'] = 'Non pode gardar o ficheiro md5.';
$string['cannotsavezipfile'] = 'Non pode gardar un ficheiro ZIP.';
$string['cannotunzipfile'] = 'Non pode descomprimir o ficheiro.';
$string['componentisuptodate'] = 'O compoñente está actualizado.';
$string['downloadedfilecheckfailed'] = 'Fallou a verificación do ficheiro descargado.';
$string['cannotcreatelangdir'] = 'Non se pode crear o directorio de idioma';
$string['cannotcreatetempdir'] = 'Non se pode crear un directorio temporal';
$string['cannotdownloadcomponents'] = 'Non foi posíbel descargar compoñentes';
$string['cannotdownloadzipfile'] = 'Non foi posíbel descargar o ficheiro ZIP';
$string['cannotfindcomponent'] = 'Non foi posíbel atopar o compoñente';
$string['cannotsavemd5file'] = 'Non é posíbel gardar o ficheiro md5';
$string['cannotsavezipfile'] = 'Non é posíbel gardar o ficheiro ZIP';
$string['cannotunzipfile'] = 'Non é posíbel descomprimir o ficheiro';
$string['componentisuptodate'] = 'O compoñente está actualizado';
$string['downloadedfilecheckfailed'] = 'A comprobación do ficheiro descargado non foi satisfactoria';
$string['invalidmd5'] = 'md5 non válido';
$string['missingrequiredfield'] = 'Falta algún campo obrigatorio';
$string['wrongdestpath'] = 'Camiño de destino errado.';
+68 -28
View File
@@ -30,41 +30,81 @@
defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Directorio de administración';
$string['availablelangs'] = 'Paquetes de idioma dispoñibles';
$string['chooselanguagehead'] = 'Escolla idioma';
$string['chooselanguagesub'] = 'Escolla un idioma para a instalación. Poderá escoller o idioma do sitio e o idioma de usuario en próximas pantallas.';
$string['admindirname'] = 'Directorio Admin';
$string['availablelangs'] = 'Lista de idiomas dispoñíbeis';
$string['chooselanguagehead'] = 'Escolla un idioma';
$string['chooselanguagesub'] = 'Escolla un idioma para o proceso de instalación. Este idioma empregarase tamén como idioma predeterminado do sitio, se ben pode cambiarse máis adiante.';
$string['clialreadyconfigured'] = 'Xa existe o ficheiro config.php. Empregue admin/cli/install_database.php se quere actualizar o seu sitio web.';
$string['clialreadyinstalled'] = 'Xa existe o ficheiro config.php. Empregue admin/cli/upgrade.php se quere actualizar o seu sitio web.';
$string['cliinstallheader'] = 'Programa de instalación de Moodle en liña de ordes {$a}';
$string['databasehost'] = 'Enderezo/máquina da base de datos';
$string['databasename'] = 'Nome de base de datos';
$string['databasetypehead'] = 'Escolla o controlador da base de datos';
$string['dataroot'] = 'Directorio de datos';
$string['datarootpermission'] = 'Permisos dos directorios de datos';
$string['dbprefix'] = 'Prefixo das táboas';
$string['dirroot'] = 'Directorio Moodle';
$string['environmenthead'] = 'Verificando o seu ámbito ...';
$string['dirroot'] = 'Directorio de Moodle';
$string['environmenthead'] = 'Comprobando o seu entorno ...';
$string['environmentsub2'] = 'Cada versión de Moodle ten algún requisito mínimo da versión de PHP e un número obrigatorio de extensións de PHP.
Antes de cada instalación ou actualización faise unha comprobación completa do entorno . Póñase en contacto co administrador do servidor se non sabe como instalar a nova versión ou activar as extensións PHP.';
$string['errorsinenvironment'] = 'A comprobación do entorno no foi satisfactoria!';
$string['installation'] = 'Instalación';
$string['langdownloaderror'] = 'Desafortunadamente o idioma "{$a}" non foi instalado. O proceso de instalación continuará en inglés.';
$string['memorylimithelp'] = '<p>O límite de memoria para PHP do seu servidor está actualmente establecido en {$a}.</p>
$string['langdownloaderror'] = 'Non foi posíbel descargar o idioma «{$a}». O proceso de instalación continuará en inglés.';
$string['memorylimithelp'] = '<p>O límite de memoria PHP no seu servidor está estabelecido en {$a}.</p>
<p>Isto fará que Moodle teña problemas de memoria máis tarde, especialmente se ten un número de módulos significativo e/ou un gran número de usuarios.</p>
<p>Isto pode facer que Moodle teña problemas de memoria máis adiante, especialmente
se vostede ten activados un feixe de módulos e/ou unha gran cantidade de usuarios.</p>
<p>Recomendamos que configure PHP cun límite maior se é posible, como por exemplo 16M.
Existen varias formas que pode tentar para facer esta modificación:</p>
<p>Recomendámoslle que configure PHP co límite máis alto posíbel, p.ex. 40M.
Hai varias maneiras de facer isto que vostede pode probar:</p>
<ol>
<li>Se pode, recompile PHP con <i>--enable-memory-limit</i>.
Iso permitirá que o propio Moodle modifique o límite de memoria.</li>
<li>Se ten acceso ao seu ficheiro php.ini pode modificar o valor de <b>memory_limit</b> para algo semellante a 16M. Se non ten acceso a ese ficheiro tal vez poida pedir ao administrador do sistema que o faga.</li>
<li>Nalgúns servidores PHP servers pode crear un ficheiro .htaccess no directorio Moodle coa liña seguinte:
<p><blockquote>php_value memory_limit 16M</blockquote></p>
<p>Porén, nalgúns servidores provocará que <b>non funcione ningunha</b>páxina en PHP (verá erros cando tente visualizar as páxinas) polo que terá que eliminar o ficheiro .htaccess.</p></li>
<li>Se vostede e quen de facelo, volva compilar PHP con <i>--enable-memory-limit</i>.
Isto fai que sexa Moodle quen estabeleza o límite de memoria.</li>
<li>Se vostede ten acceso ao ficheiro php.ini, pode cambiar o <b>memory_limit</b>
estabelecéndoo en, digamos, 40M. Se vostede non ten acceso, podería
solicitarlle ao administrador que o faga por vostede.</li>
<li>Nalgúns servidores PHP, pode crear un ficheiro .htaccess no directorio Moodle
que conteña a seguinte liña:
<blockquote><div>php_value memory_limit 40M</div></blockquote>
<p>Porén, nalgúns servidores isto impide que traballen <b>todas</b> as páxinas PHP
(poderá ver os erros cando se miran as páxinas) de modo que terá que eliminar o ficheiro .htaccess.</p></li>
</ol>';
$string['paths'] = 'Rutas';
$string['pathserrcreatedataroot'] = 'O directorio de datos ({$a->dataroot}) non puido ser creado polo instalador.';
$string['pathshead'] = 'Confirme as rutas';
$string['pathsrodataroot'] = 'O directorio dataroot non ten permisos de escritura.';
$string['pathsroparentdataroot'] = 'O directorio principal ({$a->parent}) non ten permisos de escritura. O instalador non pode crear o directorio de datos ({$a->dataroot}).';
$string['pathssubadmindir'] = 'Moi poucos enderezos web empregan /admin como URL especial para
permitirlle acceder a un panel de control ou semellante. Desafortunadamente, isto entra en conflito coa localización estándar das páxinas de administración de Moodle. Vostede pode corrixir isto
renomeando o directorio admin na súa instalación, e poñendo aquí ese novo nome. Por exemplo: <em>moodleadmin</em>. Iso corrixirá as ligazóns admin en Moodle.';
$string['pathssubdataroot'] = 'Necesitase un lugar no que Moodle poida gardar os ficheiros enviados. Este directorio debe ser lexíbel E ESCRIBÍBEL polo usuario do servidor web
(normalmente «nobody», «apache», «www-data»), mais non debería ser accesíbel directamente desde o web. Se non existe o instalador tentará crealo.';
$string['pathssubdirroot'] = 'Ruta completa do directorio de instalación de Moodle.';
$string['pathssubwwwroot'] = 'Enderezo web completo para acceder a Moodle.
Non é posíbel acceder a Moodle empregando enderezos múltiplos.
Se o seu sitio ten varios enderezos públicos debe configurar encamiñamentos permanentes en todos eles, agás neste.
Se o seu sitio web é accesíbel tanto desde unha Intranet como desde Internet, escriba aquí o enderezo público e configure o DNS para que os usuarios da Intranet poidan empregar tamén o enderezo público.
Se o enderezo non é correcto, cambie o URL no seu navegador para reiniciar a instalación cun valor diferente.';
$string['pathsunsecuredataroot'] = 'A localización de dataroot non é segura';
$string['pathswrongadmindir'] = 'Non existe o directorio Admin';
$string['phpextension'] = 'Extensión PHP {$a}';
$string['phpversion'] = 'Versión PHP';
$string['phpversionhelp'] = '<p>Moodle require unha versión de PHP de 4.3.0 como mínimo ou 5.1.0 (5.0.x ten problemas coñecidos).</p>
<p>Actualmente está a executar a versión {$a}</p>
<p>Debe actualizar o PHP ou migrar a outro servidor cunha versión máis nova de PHP!<br/>
(No caso de ter unha versión 5.0.x pode retornar para unha versión 4.4.x)</p>';
$string['phpversionhelp'] = '<p>Moodle require polo menos unha das versións de PHP 4.3.0 ou 5.1.0 ( as versións 5.0.x teñen unha serie de problemas coñecidos).</p>
<p>Neste momento está executandose a versión {$a}</p>
<p>Debe actualizar PHP ou trasladarse a outro servidor cunha versión máis recente de PHP!<br />
(NO caso de 5.0.x podería tamén reverter cara a versión 4.4.x)</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Está a ver esta páxina porque conseguiu instalar e iniciar o paquete <strong>{$a->packname} {$a->packversion}</strong> no seu computador. Parabéns!';
$string['welcomep30'] = 'Esta versión do <strong>{$a->installername}</strong> inclúe as aplicacións
para crear o ámbito en que <strong>Moodle</strong> pode funcionar, nomeadamente:';
$string['welcomep40'] = 'O paquete tamén inclúe <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep50'] = 'A utilización de todas as aplicacións deste paquete réxese polas respectivas licenzas. O paquete <strong>{$a->installername}</strong> completo é <a href="http://www.opensource.org/docs/definition_plain.html"> código aberto</a> distribuído nos termos da licenza <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
$string['welcomep60'] = 'As páxinas seguintes irán conducilo por algúns pasos fáciles de seguir para configurar o <strong>Moodle</strong> no computador. Pode aceptar a configuración por defecto ou, opcionalmente, utilizar outras máis adecuadas ás súas necesidades.';
$string['welcomep70'] = 'Prema o botón "Seguinte" debaixo para continuar coa configuración de <strong>Moodle</strong>.';
$string['welcomep20'] = 'Se esta a ver esta páxina é porque puido instalar satisfactoriamente e
executar o paquete <strong>{$a->packname} {$a->packversion}</strong> no seu computador. Parabéns!';
$string['welcomep30'] = 'Esta versión de <strong>{$a->installername}</strong> inclúe os aplicativos
para crear un entorno no que <strong>Moodle</strong> funcione, nomeadamente:';
$string['welcomep40'] = 'O paquete inclúe tamen <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep50'] = 'O uso de todos os aplicativos do paquete está rexido polas súas respectivas
licenzas. O paquete completo <strong>{$a->installername}</strong> é
<a href="http://www.opensource.org/docs/definition_plain.html">código aberto</a> e distribúese
baixo a licenza <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
$string['welcomep60'] = 'As páxinas seguintes guiarano a través de algúns sinxelos pasos para configurar
e axustar <strong>Moodle</strong> no seu computador. Pode empregar os axustes predeterminados
ou, opcionalmente, modificalos para que se axusten ás súas necesidades.';
$string['welcomep70'] = 'Prema no botón «Seguinte» para continuar coa configuración de <strong>Moodle</strong>.';
$string['wwwroot'] = 'Enderezo web';
+1 -1
View File
@@ -30,6 +30,6 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'pt';
$string['parentlanguage'] = '';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Galego';
+1 -1
View File
@@ -31,6 +31,6 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'שפת ממשק';
$string['next'] = לאה';
$string['next'] = בא';
$string['previous'] = 'קודם';
$string['reload'] = 'טען מחדש';
+1 -1
View File
@@ -31,4 +31,4 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'he';
$string['thislanguage'] = 'Hebrew kids';
$string['thislanguage'] = 'עברית בתי־ספר';
+2 -2
View File
@@ -41,8 +41,8 @@ $string['cannotunzipfile'] = 'Nije moguće otpakirati datoteku';
$string['componentisuptodate'] = 'Komponenta je dostupna u svojoj najnovijoj inačici.';
$string['downloadedfilecheckfailed'] = 'Došlo je do pogreške pri provjeri preuzete datoteke';
$string['invalidmd5'] = 'Neispravna md5 datoteka';
$string['missingrequiredfield'] = 'Nedostaje neko obavezno polje';
$string['remotedownloaderror'] = 'Nije uspjelo preuzimanje komponente na poslužitelj, provjerite postavke proxyja. Preporuča se uporaba PHP cURL dodatka.<br /><br />Ručno preuzmite datoteku s <a href="{$a->url}">{$a->url}</a> iskopirajte ju u "{$a->dest}" na poslužitelj i raspakirajte.';
$string['missingrequiredfield'] = 'Nedostaje neko obvezno polje';
$string['remotedownloaderror'] = 'Nije uspjelo preuzimanje komponente na poslužitelj, provjerite postavke proxyja. Preporuča se uporaba PHP cURL dodatka.<br /><br />Ručno preuzmite datoteku s <a href="{$a->url}">{$a->url}</a> iskopirajte ju u "{$a->dest}" na poslužitelju i raspakirajte.';
$string['wrongdestpath'] = 'Pogrešna odredišna putanja.';
$string['wrongsourcebase'] = 'Pogrešna baza izvornog URL-a';
$string['wrongzipfilename'] = 'Pogrešno ime ZIP datoteke';
+4 -4
View File
@@ -45,14 +45,14 @@ $string['datarootpermission'] = 'Ovlasti nad mapom s podacima';
$string['dbprefix'] = 'Prefiks tablice';
$string['dirroot'] = 'Moodle mapa';
$string['environmenthead'] = 'Provjera okruženja vašeg poslužitelja ...';
$string['environmentsub2'] = 'Svaka inačica Moodle-a ima minimalne zahtjeve po pitanju odgovarajuće PHP inačice i nekoliko obaveznih PHP ekstenzija.
$string['environmentsub2'] = 'Svaka inačica Moodle-a ima minimalne zahtjeve po pitanju odgovarajuće PHP inačice i nekoliko obveznih PHP ekstenzija.
Puna provjera okruženja se obavlja prije svake instalacije ili nadogradnje postojeće inačice. Ako ne znate kako instalirati novu inačicu ili omogućiti PHP ekstenzije, kontaktirajte administratora vašeg poslužitelja.';
$string['errorsinenvironment'] = 'Pogreške u okruženju poslužitelja!';
$string['installation'] = 'Instalacija';
$string['langdownloaderror'] = 'Nažalost, jezik "{$a}" nije instaliran. Proces instalacije će biti nastavljen na engleskom jeziku.';
$string['memorylimithelp'] = '<p>PHP ograničenje memorije na poslužitelju je trenutno podešeno na {$a}.</p>
<p>Ova postavka može kasnije rezultirati memorijskim problemima na vašem Moodle sustavu, posebno ako imate veći broj uključenih modula i/ili veći broj korisnika.</p>
<p>Ova postavka može kasnije rezultirati memorijskim problemima na vašem Moodle sustavu, posebno ako imate veći broj omogućenih modula i/ili veći broj korisnika.</p>
<p>Preporučujemo da konfigurirate PHP s većim ograničenjem ako je moguće, recimo 40M. Postoji nekoliko načina na koje to možete napraviti:</p>
<ol>
@@ -67,7 +67,7 @@ $string['pathsrodataroot'] = 'Nije moguće zapisivanje u podatkovnu (dataroot) m
$string['pathsroparentdataroot'] = 'Nije moguće zapisivati podatke u nadređenu mapu ({$a->parent}). Instalacijska skripta ne može stvoriti mapu za podatke ({$a->dataroot}).';
$string['pathssubadmindir'] = 'Manji broj webhosting tvrtki koristi /admin kao posebni URL za Vaš pristup upravljanju vašim hosting paketom. Nažalost, to rezultira konfliktom sa standardnom lokacijom za Moodle administratorsku stranicu. Navedenu lokaciju unutar Moodle sustava možete preimenovati. Na primjer: <br /> <br /><em>moodleadmin</em><br /> <br />
Ovo će promijeniti administratorsku poveznicu na Moodle sustavu u novu vrijednost.';
$string['pathssubdataroot'] = 'Mora postojati mapa u koju Moodle može pohraniti upload datoteke. Korisnik pod kojim je pokrenut web server (obično \'nobody\' ili \'apache\') bi morao imati mogućnost čitanja/pisanja podataka u toj mapi, ali oni ne bi trebali biti dostupni direktno preko weba. Instalacijska skripta će pokušati stvoriti navedenu mapu ako ista ne postoji.';
$string['pathssubdataroot'] = 'Mora postojati mapa u koju Moodle može pohraniti prenešene datoteke. Korisnik pod kojim je pokrenut web server (obično \'nobody\' ili \'apache\') bi morao imati mogućnost čitanja/pisanja podataka u toj mapi, ali oni ne bi trebali biti dostupni direktno preko weba. Instalacijska skripta će pokušati stvoriti navedenu mapu ako ista ne postoji.';
$string['pathssubdirroot'] = 'Puna putanja (PATH) do Moodle instalacije.';
$string['pathssubwwwroot'] = 'Unesite punu web adresu putem koje će se pristupati vašem Moodle sustavu.
Moodle sustavu NIJE MOGUĆE pristupiti preko više URL-ova, odaberite onaj koji vam najviše odgovara.
@@ -78,7 +78,7 @@ $string['pathsunsecuredataroot'] = 'Podatkovna (dataroot) mapa nije sigurna';
$string['pathswrongadmindir'] = 'Admin mapa ne postoji';
$string['phpextension'] = 'PHP ekstenzija {$a}';
$string['phpversion'] = 'PHP inačica';
$string['phpversionhelp'] = '<p>Moodle zahtijeva najmanje PHP inačicu 4.3.0 ili 5.1.0 (5.0.x funkcionira uz brojne uočene probleme).</p> <p>Trenutno imate inačicu {$a}</p> <p>Morate nadograditi PHP ili premestiti Moodle instalaciju na web poslužitelj s novijom verzijom PHP-a!</br> (U slučaju inačice 5.0.x bilo bi najbolje da je vratite na inačicu 4.4.x)</p>';
$string['phpversionhelp'] = '<p>Moodle zahtijeva najmanje PHP inačicu 4.3.0 ili 5.1.0 (5.0.x funkcionira uz brojne uočene probleme).</p> <p>Trenutno imate inačicu {$a}</p> <p>Morate nadograditi PHP ili premestiti Moodle instalaciju na web poslužitelj s novijom inačicom PHP-a!</br> (U slučaju inačice 5.0.x bilo bi najbolje da je vratite na inačicu 4.4.x)</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Prikazana vam je ova stranica jer ste uspješno instalirali i pokrenuli <strong>{$a->packname} {$a->packversion}</strong> paket na svom poslužitelju. Čestitamo!';
$string['welcomep30'] = 'Ova inačica <strong>{$a->installername}</strong> uključuje aplikacije za stvaranje okruženja u kojem će sustav <strong>Moodle</strong> uspješno funkcionirati, konkretno:';
+37
View File
@@ -0,0 +1,37 @@
<?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['clitypevalue'] = 'tipo reikšmė';
$string['clitypevaluedefault'] = 'tipo reikšmė, paspauskite „Enter“, jei norite naudoti numatytąją reikšmę ({$a})';
$string['cliunknowoption'] = 'Neatpažintos parinktys: {$a} naudokite --žinyno parinktį.';
$string['environmentrequireinstall'] = 'turi būti įdiegta ir įjungta';
$string['environmentrequireversion'] = 'būtina naudoti versiją {$a->needed}, o jūs naudojate {$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'] = 'Negalima sukurti kalbos katalogo';
$string['cannotcreatetempdir'] = 'Negalima sukurti laikinojo katalogo';
$string['cannotdownloadcomponents'] = 'Negalima atsisiųsti komponentų';
$string['cannotdownloadzipfile'] = 'Negalima atsisiųsti ZIP failo';
$string['cannotfindcomponent'] = 'Nepavyko rasti komponento';
$string['cannotsavemd5file'] = 'Negalima įrašyti md5 failo';
$string['cannotsavezipfile'] = 'Negalima įrašyti ZIP failo';
$string['cannotunzipfile'] = 'Negalima išskleisti failo';
$string['componentisuptodate'] = 'Komponentas atnaujintas';
$string['downloadedfilecheckfailed'] = 'Nepavyko patikrinti atsisiųsto failo';
$string['invalidmd5'] = 'Kintamojo patikra nepavyko bandykite dar kartą';
$string['missingrequiredfield'] = 'Trūksta būtino lauko';
$string['remotedownloaderror'] = 'Nepavyko į serverį atsisiųsti komponento, patikrinkite tarpinio serverio parametrus, labai rekomenduojama naudoti PHP cURL plėtinį.<br /><br />Turite rankiniu būdu atsisiųsti <a href="{$a->url}">{$a->url}</a> failą, nukopijuoti jį į {$a->dest} serveryje ir ten jį išskleisti.';
$string['wrongdestpath'] = 'Neteisingas paskirties kelias';
$string['wrongsourcebase'] = 'Neteisingas šaltinio URL pagrindas';
$string['wrongzipfilename'] = 'Neteisingas ZIP failo vardas';
+66
View File
@@ -0,0 +1,66 @@
<?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'] = 'Administratoriaus katalogas';
$string['chooselanguagesub'] = 'Pasirinkite diegimo kalbą. Ši kalba bus naudojama ir kaip numatytoji svetainės kalba, nors vėliau ją bus galima pakeisti.';
$string['clialreadyconfigured'] = 'Failas config.php jau yra, prašau naudoti admin/cli/install_database.php jei norite įrašyti šią svetainę.';
$string['clialreadyinstalled'] = 'Failas config.php jau yra. Jei norite atnaujinti svetainę, naudokite admin/cli/upgrade.php.';
$string['cliinstallheader'] = '„Moodle“ {$a} komandų eilutės diegimo programa';
$string['databasehost'] = 'Duomenų bazės pagrindinis kompiuteris';
$string['dataroot'] = 'Duomenų katalogas';
$string['datarootpermission'] = 'Duomenų katalogo leidimai';
$string['dbprefix'] = 'Lentelių priešvardis';
$string['dirroot'] = '„Moodle“ katalogas';
$string['environmenthead'] = 'Tikrinama aplinka...';
$string['environmentsub2'] = 'Kiekvienas „Moodle“ leidimas turi minimalius PHP versijos ir privalomų PHP plėtinių skaičiaus reikalavimus. Prieš kiekvieną diegimą ir versijos naujinimą, išsamiai tikrinama aplinka. Jei nežinote, kaip įdiegti naują versiją arba įjungti PHP plėtinius, kreipkitės į serverio administratorių.';
$string['errorsinenvironment'] = 'Aplinkos patikra nepavyko!';
$string['installation'] = 'Diegimas';
$string['langdownloaderror'] = 'Deja, {$a} kalbos atsisiųsti nepavyko. Diegimo procesas bus tęsiamas anglų kalba.';
$string['memorylimithelp'] = '<p>Serverio PHP atminties limitas dabar nustatytas kaip {$a}.</p> <p>Vėliau dėl to „Moodle“ gali iškilti atminties problemų, ypač jei įjungta daug modulių ir (arba) yra daug vartotojų.</p> <p>Rekomenduojame sukonfigūruoti didesnį PHP limitą, jei galima, pvz., 40M. Galite pabandyti tai atlikti keliais būdais:</p> <ol> <li>Jei galite, pakartotinai sukompiliuokite PHP naudodami <i>--enable-memory-limit</i>. Taip „Moodle“ pati galės nustatyti atminties limitą.</li> <li>Jei turite prieigą prie php.ini failo, galite pakeisti <b>memory_limit</b> parametro reikšmę į 40M ar pan. Jei prieigos neturite, galite paprašyti, kad tai padarytų administratorius.</li> <li>Kai kuriuose PHP serveriuose „Moodle“ kataloge galite sukurti .htaccess failą, kuriame būtų ši eilutė : <blockquote><div>php_value memory_limit 40M</div></blockquote> <p>Tačiau kai kuriuose serveriuose dėl to neveiks <b>visi</b> PHP puslapiai (peržiūrėdami puslapius matysite klaidą), todėl the .htaccess failą teks pašalinti.</p></li> </ol>';
$string['pathserrcreatedataroot'] = 'Diegimo programa negali sukurti duomenų katalogo ({$a->dataroot}).';
$string['pathshead'] = 'Patvirtinti kelius';
$string['pathsrodataroot'] = 'Į šakninį duomenų katalogą negalima įrašyti.';
$string['pathsroparentdataroot'] = 'Į pirminį katalogą ({$a->parent}) negalima įrašyti. Diegimo programa negali sukurti katalogo ({$a->dataroot}).';
$string['pathssubadmindir'] = 'Labai mažai žiniatinklio pagrindinių kompiuterių naudoja /admin kaip specialų URL, kad galėtumėte pasiekti valdymo skydą ar pan. Deja, dėl to kyla konfliktas su „Moodle“ administratoriaus puslapių standartine vieta. Tai galite ištaisyti, jei diegdami pervardysite administratoriaus katalogą ir tą naują pavadinimą įdėsite čia. Pavyzdžiui, <em>moodleadmin</em>. Taip bus ištaisyti administratoriaus saitai „Moodle“.';
$string['pathssubdataroot'] = 'Reikalinga vieta, kur „Moodle“ galėtų saugoti įkeltus failus. Iš šio katalogo turi galėti skaityti IR Į JĮ ĮRAŠYTI žiniatinklio serverio vartotojas (paprastai „nobody“ arba „apache“), bet jis neturi būti tiesiogiai pasiekiamas per žiniatinklį. Diegimo programa bandys jį sukurti, jei jo dar nėra.';
$string['pathssubdirroot'] = 'Visas „Moodle“ diegimo katalogo kelias.';
$string['pathssubwwwroot'] = 'Visas žiniatinklio adresas, kur bus galima pasiekti „Moodle“. „Moodle“ negalima pasiekti naudojant kelis adresus. Jei jūsų svetainė turi kelis viešuosius adresus, turite nustatyti nuolatinį peradresavimą iš jų visų, išskyrus šį vieną. Jei svetainę galima pasiekti tiek iš intraneto, tiek iš interneto, čia naudokite viešąjį adresą ir nustatykite DNS, kad intraneto vartotojai taip pat galėtų naudoti viešąjį adresą. Jei adresas klaidingas, naršyklėje pakeiskite URL, kad pakartotinai paleidus diegti būtų naudojama kita reikšmė.';
$string['pathsunsecuredataroot'] = 'Šakninio duomenų katalogo kelias nesaugus';
$string['pathswrongadmindir'] = 'Nėra administratoriaus katalogo';
$string['phpversionhelp'] = '<p>„Moodle“ reikalauja, kad PHP versija būtų bent 4.3.0 arba 5.1.0 (5.0.x versijoje yra daug problemų).</p> <p>Dabar naudojate versiją {$a}</p> <p>Turite atnaujinti PHP versiją arba perkelti į pagrindinį kompiuterį, kuriame veikia naujesnė PHP versija!<br /> (Jei naudojate 5.0.x versiją, taip pat galite paleisti senesnę 4.4.x versiją)</p>';
$string['welcomep20'] = 'Matote šį puslapį, nes į kompiuterį sėkmingai įdiegėte ir paleidote <strong>{$a->packname} {$a->packversion}</strong> paketą. Sveikiname!';
$string['welcomep30'] = 'Šiame <strong>{$a->installername}</strong> leidime yra taikomosios programos, skirtos aplinkai, kurioje veiks <strong>Moodle</strong>, sukurti:';
$string['welcomep40'] = 'Pakete taip pat yra <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
$string['welcomep50'] = 'Visoms šio paketo taikomosioms programoms taikomos atitinkamos licencijos. Visas <strong>{$a->installername}</strong> paketas yra <a href="http://www.opensource.org/docs/definition_plain.html">atvirojo kodo</a> ir platinamas pagal <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> licenciją.';
$string['welcomep60'] = 'Šiuose puslapiuose bus pateikta keletas paprastų veiksmų, kad būtų galima sukonfigūruoti ir nustatyti <strong>Moodle</strong> kompiuteryje. Galite priimti numatytuosius parametrus arba pasirinktinai juos pakeisti, kad atitiktų jūsų poreikius.';
$string['welcomep70'] = 'Norėdami tęsti <strong>Moodle</strong> sąranką, spustelėkite žemiau esantį mygtuką Kitas.';
$string['wwwroot'] = 'Žiniatinklio adresas';
+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['next'] = 'Pirmyn';
+11 -4
View File
@@ -33,11 +33,15 @@ defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Katalog admin';
$string['availablelangs'] = 'Dostępne paczki językowe';
$string['chooselanguagehead'] = 'Wybierz język';
$string['chooselanguagesub'] = 'Proszę wybrać język TYLKO do instalacji. Stronę i języki dla użytkowników będzie można wybrać na następnym ekranie.';
$string['clialreadyinstalled'] = 'Plik config.php już istnieje, użyj admin/cli/upgrade.php jeśli chcesz uaktualnić witrynę.';
$string['chooselanguagesub'] = 'Proszę wybrać język do instalacji. Ten język będą również użyty jako domyślny język witryny, przy czym może być później zmieniony.';
$string['clialreadyconfigured'] = 'Plik config.php już istnieje, użyj admin/cli/install_database.php jeśli chcesz zainstalować tę witrynę.';
$string['clialreadyinstalled'] = 'Plik config.php już istnieje, użyj admin/cli/upgrade.php, jeśli chcesz uaktualnić witrynę.';
$string['cliinstallheader'] = 'Program instalacyjny Moodle {$a} z linii poleceń';
$string['databasehost'] = 'Host bazy danych';
$string['databasename'] = 'Nazwa bazy danych';
$string['dataroot'] = 'Katalog z danymi';
$string['databasetypehead'] = 'Wybierz sterownik bazy danych';
$string['dataroot'] = 'Katalog danych';
$string['datarootpermission'] = 'Prawa katalogów danych';
$string['dbprefix'] = 'Prefiks tabel';
$string['dirroot'] = 'Katalog Moodle';
$string['environmenthead'] = 'Sprawdzam środowisko (ustawienia) ...';
@@ -64,10 +68,13 @@ $string['pathserrcreatedataroot'] = 'Katalog danych ({$a->dataroot}) nie może z
$string['pathshead'] = 'Potwierdź ścieżki';
$string['pathsrodataroot'] = 'Główny katalog danych nie ma uprawnień do zapisu. ';
$string['pathsroparentdataroot'] = 'Nadrzędny katalog ({$a->parent}) jest tylko do odczytu. Katalog danych ({$a->dataroot}) nie może zostać utworzony przez instalator. ';
$string['pathssubadmindir'] = 'Nieliczne portale używają URL /admin jako specjalnego adresu panelu sterowania. Niestety jest to sprzeczne ze standardowej lokalizacją folderu stron administratora Moodle. Można to naprawić poprzez zmianę nazwy katalogu administratora w instalacji i podanie tej nazwy tu, np.: <em>moodleadmin.</em> Linki administratora Moodle będą automatycznie poprawione.';
$string['pathssubdataroot'] = 'Potrzebny jest obszar, gdzie Moodle może zapisywać ładowane do niego pliki. Katalog ten powinien mieć prawo do odczyt i ZAPISU przez użytkownika serwera WWW (zwykle &quot;nobody&quot; lub &quot;apache&quot;), ale może być być dostępny bezpośrednio przez sieć. Instalator spróbuje go utworzyć, jeśli nie istnieje.';
$string['pathssubdirroot'] = 'Pełna ścieżka do katalogu z instalacją Moodle.';
$string['pathssubwwwroot'] = 'Pełny adres internetowy, pod którym Moodle będzie dostępny. Moodle nie może być dostępny przy użyciu wielu adresów. Jeśli twoja witryna ma kilka adresów publicznych, należy skonfigurować trwałe przekierowania z wszystkich z nich na jeden. Jeśli Twoja witryna jest dostępna zarówno z intranetu i Internetu, korzystaj z publicznego adresu i ustaw DNS tak, aby użytkownicy Intranetu korzystali też z adresu publicznego. Jeśli adres nie jest poprawny, należy ponownie uruchomić instalację z innym adresem.';
$string['pathsunsecuredataroot'] = 'Lokalizacja głównego katalogu danych nie jest bezpieczna';
$string['pathswrongadmindir'] = 'Katalog admin nie istnieje';
$string['phpextension'] = '{$a} rozszerzenie PHP';
$string['phpextension'] = 'rozszerzenie PHP {$a}';
$string['phpversion'] = 'Wersja PHP';
$string['phpversionhelp'] = '<p>Moodle wymaga wersji PHP co najmniej 4.3.0 lub 5.1.0 (5.0.x posiada kilka znanych problemów).</p>
<p>Obecnie jest uruchomiona wersja {$a}</p>
+1
View File
@@ -34,6 +34,7 @@ $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} в режиме командной строки';
$string['databasehost'] = 'Сервер баз данных';
+2 -2
View File
@@ -45,8 +45,8 @@ $string['datarootpermission'] = 'Овлашћења над директориј
$string['dbprefix'] = 'Префикс табеле';
$string['dirroot'] = 'Moodle директоријум';
$string['environmenthead'] = 'Проверавање Вашег окружења...';
$string['environmentsub2'] = 'Свака верзија Moodlea има минимум захтева по питању одговарајуће PHP верзије и неколико обавезних PHP екстензија.
Пуна провера окружења се врши пре сваке инсталације или ажурирања постојеће верзије. Уколико не знате како да инсталирате нову верзију или омогућите PHP ектензије контактирајте Вашег сервер администратора.';
$string['environmentsub2'] = 'Свако издање Moodlea има минимум захтева по питању одговарајуће PHP верзије и неколико обавезних PHP екстензија.
Комплетна провера окружења се врши пре сваке инсталације и надоградње постојеће верзије. Уколико не знате како да инсталирате нову верзију или омогућите PHP екстензије контактирајте свог администратора сервера.';
$string['errorsinenvironment'] = 'Провера окружења није прошла!';
$string['installation'] = 'Инсталација';
$string['langdownloaderror'] = 'Нажалост, језик "{$a}" се не може преузети. Процес инсталације биће настављен на енглеском језику.';
+2 -2
View File
@@ -45,8 +45,8 @@ $string['datarootpermission'] = 'Ovlašćenja nad direktorijumom podataka';
$string['dbprefix'] = 'Prefiks tabele';
$string['dirroot'] = 'Moodle direktorijum';
$string['environmenthead'] = 'Proveravanje Vašeg okruženja...';
$string['environmentsub2'] = 'Svaka verzija Moodlea ima minimum zahteva po pitanju odgovarajuće PHP verѕije i nekoliko obaveznih PHP ekstenzija.
Puna provera okruženja se vrši pre svake instalacije ili ažuriranja postojeće verzije. Ukoliko ne znate kako da instalirate novu verziju ili omogućite PHP ektenzije kontaktirajte Vašeg server administratora.';
$string['environmentsub2'] = 'Svako izdanje Moodlea ima minimum zahteva po pitanju odgovarajuće PHP verzije i nekoliko obaveznih PHP ekstenzija.
Kompletna provera okruženja se vrši pre svake instalacije i nadogradnje postojeće verzije. Ukoliko ne znate kako da instalirate novu verziju ili omogućite PHP ekstenzije kontaktirajte svog administratora servera.';
$string['errorsinenvironment'] = 'Provera okruženja nije prošla!';
$string['installation'] = 'Instalacija';
$string['langdownloaderror'] = 'Nažalost, jezik "{$a}" se ne može preuzeti. Proces instalacije biće nastavljen na engleskom jeziku.';
+44
View File
@@ -0,0 +1,44 @@
<?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'] = 'не';
$string['cliansweryes'] = 'ҳа';
$string['cliincorrectvalueerror'] = 'Хато, нишондиҳандаи нодурусти "{$a->value}" барои "{$a->option}"';
$string['cliincorrectvalueretry'] = 'Нишондиҳандаи нодуруст, илтимос, аз нав кӯшиш карда бинед';
$string['clitypevalue'] = 'Нишондиҳандаро ворид намоед';
$string['clitypevaluedefault'] = 'Нишондиҳандаро ворид намоед, Enter-ро барои истифодаи нишондиҳанда аз рӯи хомӯшӣ ({$a}) зер кунед';
$string['cliunknowoption'] = 'Параметрҳои шинохтанашуда:
{$a}
Илтимос, аз параметри --help истифода баред';
$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'] = 'Файлро кушодан муяссар нашуд';
$string['componentisuptodate'] = 'Қисмат ба навсозӣ эҳтиёҷ надорад';
$string['downloadedfilecheckfailed'] = 'Хатои тафтиши файли боркардашуда';
$string['invalidmd5'] = 'md5-и нодуруст';
$string['missingrequiredfield'] = 'Баъзе майдонҳои ҳатмӣ нестанд';
$string['remotedownloaderror'] = 'Қисматро ба сервер бор кардан муяссар нашуд, танзимҳои прокси-серверро тафтиш кунед, бо исрор тавсия дода мешавад, ки васеъкунии cURL-и забони PHP ҷойгир карда шавад.<br /> <br />Шумо бояд файлро аз рӯи истиноди <a href="{$a->url}">{$a->url}</a> дастӣ бор кунед, онро ба папкаи "{$a->dest}" дар сервери худ нусхабардорӣ намоед ва дар он ҷо онро кушоед.';
$string['wrongdestpath'] = 'Роҳи хатои таъйинкунӣ';
$string['wrongsourcebase'] = 'Адреси нодурусти сарчашма';
$string['wrongzipfilename'] = 'Номи нодурусти ZIP-файл';
+94
View File
@@ -0,0 +1,94 @@
<?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['clialreadyinstalled'] = 'Файли config.php аллакай вуҷуд дорад. Агар сомонаро навсозӣ карданӣ бошед, скрипти admin/cli/upgrade.php -ро истифода баред.';
$string['cliinstallheader'] = 'Барномаи ҷойгиркунии Moodle {$a} дар реҷаи сатри фармонҳо';
$string['databasehost'] = 'Сервери базаҳои маълумотҳо';
$string['databasename'] = 'Номи базаи маълумотҳо';
$string['databasetypehead'] = 'Драйвери базаи маълумотҳоро интихоб намоед';
$string['dataroot'] = 'Феҳристи маълумотҳо';
$string['datarootpermission'] = 'Иҷозатҳо ба феҳристи маълумотҳо';
$string['dbprefix'] = 'Префикси номҳои ҷадвалҳо';
$string['dirroot'] = 'феҳристи Moodle';
$string['environmenthead'] = 'Тафтиши муҳит...';
$string['environmentsub2'] = 'Ҳар як версияи Moodle талаботҳои минималӣ ба версияи PHP ва маҷмӯи васеъшавиҳои ҳатмии PHP-ро дорад.
Тафтиши пурраи муҳит пеш аз ҳар як ҷойгиркунӣ ва навсозӣ ба ҷо оварда мешавад.
Илтимос, агар тарзи ҷойгиркунии версияи нав ё ба кор андохтани васеъшавии PHP-ро надонед, бо администратори сервер робита намоед.';
$string['errorsinenvironment'] = 'Тафтиши муҳит иҷро нашудааст!';
$string['installation'] = 'Ҷойгир кардан';
$string['langdownloaderror'] = 'Мутаассифона, забони "{$a}"-ро муқаррар кардан муяссар нашуд. Раванди ҷойгиркунӣ ба забони англисӣ давом хоҳад кард.';
$string['memorylimithelp'] = '<p>Ҳозир маҳдудкунии хотира дар PHP дар сервери Шумо ба андозаи {$a} муқаррар шудааст.</p>
<p>Аз ин сабаб баъди муддате дар Moodle мушкилоти хотира пайдо шуда метавонанд, хусусан агар Шумо бисёр модулҳо ва/ё истифодабарандаҳо дошта бошед.</p>
<p>Мо тавсия медиҳем, агар имкон бошад, дар PHP маҳдудкунии баландтари хотира муқаррар карда шавад, масалан 40M.
Инро бо тарзҳои зерин карда дида метавонед:</p>
<ol>
<li>Агар имкон бошад, PHP-ро бо калиди <i>--enable-memory-limit</i> аз нав нусхабардорӣ кунед.
Дар ин маврид Moodle метавонад мустақилона маҳдудкунии хотираро муқаррар намояд.</li>
<li>Агар Шумо ба файли php.ini дастрасӣ дошта бошед, метавонед параметри <b>memory_limit</b> -ро ба чизе монанди 40M тағйир диҳед. Агар дастрасӣ надошта бошед, шояд Шумо имкон доред аз администратор хоҳиш намоед, ки ин корро кунад.</li>
<li>Дар баъзе серверҳои PHP дар феҳристи Moodle файли .htaccess бунёд кардан мумкин аст, ки сатри зеринро дорад:
<blockquote><div>php_value memory_limit 40M</div></blockquote>
<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 барои дастрасӣ ба ба панели идоракунӣ ё ягон чизи дигар истифода мешавад. Мутаассифона, ин ба ҷойгиршавии стандартии саҳифаҳои идоракунии Moodle мухолифат дорад. Инро бо аз нав номгузорӣ кардани папкаи "admin" дар феҳристи Moodle ва дар ин ҷо зикр намудани номи нави он ислоҳ кардан мумкин аст. Масалан: <em>moodleadmin</em>. Дар айни ҳол ҳамаи истинодҳо ба панели идоракунии Moodle автоматӣ ислоҳ мешаванд';
$string['pathssubdataroot'] = 'Ҷоеро зикр намудан даркор аст, ки Moodle файлҳои боршавандаро нигаҳдорӣ хоҳад кард. Ин феҳрист бояд барои хондан ва САБТ НАМУДАНИ истифодабаранда, ки веб-сервер аз номи ӯ ба кор андохта шудааст, дастрас бошад (одатан \'nobody\' ё \'apache\'), аммо дар айни ҳол он набояд бевосита аз Интернет дастрас бошад. Барномаи ҷойгиркунӣ кӯшиш мекунад, ки ин феҳристро бунёд кунад, агар он вуҷуд надошта бошад.';
$string['pathssubdirroot'] = 'Роҳи пурра ба феҳристи ҷойгиркунии Moodle.';
$string['pathssubwwwroot'] = 'Веб-адреси пурра, ки аз он Moodle дастрас хоҳад буд.
Барои дастрасӣ ба Moodle якчанд адресҳои умумиро истифода бурдан ғайриимкон аст.
Агар сомонаи Шумо боз якчанд адресҳои умумӣ дошта бошад, Шумо бояд доимо аз ин адресҳо ба адреси зикршуда равона карданро танзим намоед. Агар сомонаи Шумо ҳам аз Интернета, ҳам аз шабакаи маҳаллӣ дастрас бошад, дар ин ҷо адреси умумкиро зикр намоед ва DNS-ро чунон танзим намоед, ки ин адрес ба истифодабарандаҳои маҳаллӣ низ дастрас бошад.
Агар адреси дар ин ҷо зикршуда нодуруст бошад, URL-ро дар сатри адреси браузер тағйир диҳед, то ки дастгоҳро бо нишондиҳандаи дигар аз нав ба кор андозед.';
$string['pathsunsecuredataroot'] = 'Ҷойгиршавии феҳристи маълумотҳо ба талаботи бехатарӣ ҷавобгӯ нест';
$string['pathswrongadmindir'] = 'Феҳристи admin вуҷуд надорад';
$string['phpextension'] = 'Васеъшавии PHP "{$a}"';
$string['phpversion'] = 'Версияи PHP';
$string['phpversionhelp'] = '<p>Барои Moodle PHP-и версияи 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> -ро бо муваффақият ҷойгир намудед. Табрик мекунем!';
$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://ru.wikipedia.org/wiki/Таъмини_барномавии_кушода">кушода аст </a> ва бо шартҳои иҷозатнома паҳн карда мешавад <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
$string['welcomep60'] = 'Дар саҳифаҳои минбаъда Шумо якчанд қадамҳои оддии ба компютери худ танзим ва ҷойгир кардани <strong>Moodle</strong> -ро дида метавонед. Шумо метавонед танзимҳоро аз рӯи хомӯшӣ қабул намоед ё онҳоро вобаста ба эҳтиёҷоти худ тағйир диҳед.';
$string['welcomep70'] = 'Тугмаи "Давомаш"-ро зер кунед, то ки раванди ҷойгиркунии <strong>Moodle</strong>-ро давом диҳед';
$string['wwwroot'] = 'Веб-адрес';
+2 -1
View File
@@ -30,4 +30,5 @@
defined('MOODLE_INTERNAL') || die();
$string['thislanguage'] = 'тоҷикӣ';
$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'] = 'Навсозӣ карда шавад';
+6 -7
View File
@@ -32,12 +32,11 @@ defined('MOODLE_INTERNAL') || die();
$string['clianswerno'] = 'n';
$string['cliansweryes'] = 'y';
$string['cliincorrectvalueerror'] = '錯誤,不正確的值 "{$a->value}" 用於 "{$a->option}"';
$string['cliincorrectvalueretry'] = '不正確值,請再試一次';
$string['cliincorrectvalueerror'] = '錯誤,將“{$a->option}”的值設為“{$a->value}”是不正確的';
$string['cliincorrectvalueretry'] = '不正確值,請重試';
$string['clitypevalue'] = '輸入值';
$string['clitypevaluedefault'] = '輸入值,按Enter可使用預設值({$a})';
$string['cliunknowoption'] = '不認得的選項: {$a}
請使用 --幫助 選項。';
$string['cliyesnoprompt'] = '輸入y(是) 或n(否)';
$string['clitypevaluedefault'] = '輸入值,按回車使用預設值{$a}';
$string['cliunknowoption'] = '錯誤選項:{$a}請使用 --help 選項。';
$string['cliyesnoprompt'] = '輸入y(表示是)或n(表示否)';
$string['environmentrequireinstall'] = '必須安裝並啟用';
$string['environmentrequireversion'] = '求版本為 {$a->needed} ,您目前版本為 {$a->current}';
$string['environmentrequireversion'] = '求版本為{$a->needed}您目前版本為 {$a->current}';
+8 -7
View File
@@ -353,7 +353,7 @@ $string['country'] = 'Default country';
$string['coursecontact'] = 'Course contacts';
$string['coursecontact_desc'] = 'This setting allows you to control who appears on the course description. Users need to have at least one of these roles in a course to be shown on the course description for that course.';
$string['courselistshortnames'] = 'Display extended course names';
$string['courselistshortnames_desc'] = 'When showing lists of courses, or when referring to courses on administration screens, show the course short name as well as the full name. In fact, when you turn this setting on, the display uses the \'courseextendednamedisplay\' language string, so you can changewhat is displayed using Language customisation.';
$string['courselistshortnames_desc'] = 'If enabled, course short names will be displayed in addition to full names in course lists. If required, extended course names may be customised by editing the \'courseextendednamedisplay\' language string using the language customisation feature.';
$string['coursemgmt'] = 'Add/edit courses';
$string['courseoverview'] = 'Course overview';
$string['courserequestnotify'] = 'Course request notification';
@@ -537,6 +537,7 @@ $string['frontpageroles'] = 'Front page roles';
$string['frontpagesettings'] = 'Front page settings';
$string['fullnamedisplay'] = 'Full name format';
$string['gdrecommended'] = 'GD extension is used for conversion of images, some features such as user profile images will not be available if missing.';
$string['gdrequired'] = 'The GD extension is now required by Moodle for image conversion.';
$string['gdversion'] = 'GD version';
$string['generalsettings'] = 'General settings';
$string['geoipfile'] = 'GeoIP city data file';
@@ -824,7 +825,7 @@ $string['profilingallowall_help'] = 'If you enable this setting, then, at any mo
$string['profilingallowme'] = 'Selective profiling';
$string['profilingallowme_help'] = 'If you enable this setting, then, selectively, you can use the PROFILEME parameter anywhere (PGC) and profiling for that script will happen. Analogously, you can use the DONTPROFILEME parameter to prevent profiling to happen';
$string['profilingautofrec'] = 'Automatic profiling';
$string['profilingautofrec_help'] = 'By configuring this setting, some request (randomly, based on the frecuency specified - 1 of XXX) will be picked and automatically profiled, storing results for further analysis. Note that this way of profiling observes the include/exclude settings. Set it to 0 to disable automatic profiling.';
$string['profilingautofrec_help'] = 'By configuring this setting, some request (randomly, based on the frequency specified - 1 of N) will be picked and automatically profiled, storing results for further analysis. Note that this way of profiling observes the include/exclude settings. Set it to 0 to disable automatic profiling.';
$string['profilingenabled'] = 'Enable profiling';
$string['profilingenabled_help'] = 'If you enable this setting, then profiling will be available in this site and you will be able to define its behavior by configuring the next options.';
$string['profilingexcluded'] = 'Exclude profiling';
@@ -857,10 +858,10 @@ $string['register'] = 'Register your site';
$string['registermoodleorg'] = 'When you register your site with {$a}';
$string['registermoodleorgli1'] = 'You are added to a low-volume mailing list for important notifications such as security alerts and new releases of Moodle.';
$string['registermoodleorgli2'] = 'Statistics about your site will be added to the {$a} of the worldwide Moodle community.';
$string['registermoodleorgli3'] = 'Your site is also registered with the Moodle.org Open Community Hub ({$a}), allowing users with the publish courses capability (by default only managers) the option of publishing courses to MOOCH.';
$string['registermoodleorgli3'] = 'Your site is also registered with Moodle.net ({$a}), allowing users with the publish courses capability (by default only managers) the option of publishing courses to Moodle.net.';
$string['registerwithmoodleorg'] = 'Register with Moodle.org';
$string['registration'] = 'Registration';
$string['registration_help'] = 'Registering your site with Moodle.org is recommended in order to receive security alert notifications, to contribute <a href="http://moodle.org/stats">Moodle usage statistics</a> and to be able to share courses on <a href="http://hub.moodle.org/">MOOCH</a>.';
$string['registration_help'] = 'Registering your site with Moodle.org is recommended in order to receive security alert notifications, to contribute <a href="http://moodle.org/stats">Moodle usage statistics</a> and to be able to share courses on <a href="http://moodle.net/">Moodle.net</a>.';
$string['registrationwarning'] = 'Your site is not yet registered.';
$string['releasenoteslink'] = 'For information about this version of Moodle, please see the online <a target="_blank" href="{$a}">Release Notes</a>';
$string['rememberusername'] = 'Remember username';
@@ -1024,16 +1025,16 @@ This can cause significant problems later, so in order to continue you must ensu
The recommended way to clean your Moodle directory is as follows:
* rename the current Moodle directory to "moodle_old"
* create a new Moodle directory containing only files from either a standard Moodle package download, or from the Moodle CVS or GIT repositories
* create a new Moodle directory containing only files from either a standard Moodle package download, or from the Moodle Git repository
* move the original config.php file and any non-standard plugins from the "moodle_old" directory to the new Moodle directory
When you have a clean Moodle directory, refresh this page to resume the Moodle update process.
This warning is often caused by unzipping a standard Moodle package over a previous version of Moodle. While this is OK for minor upgrades, it is strongly discouraged for major Moodle upgrades.
This warning can also be caused by an incomplete checkout or update operation from a CVS, SVN or GIT repository, in which case you may just have to wait for the operation complete, or perhaps run the appropriate clean up command and retry the operation.
This warning can also be caused by an incomplete checkout or update operation from the Git repository, in which case you may just have to wait for the operation to complete, or perhaps run the appropriate clean-up command and retry the operation.
You can find more information in upgrade documentation at <a href="{$a}">{$a}</a>';
You can find more information in upgrade documentation at <a href="{$a}">{$a}</a>.';
$string['upgradesure'] = 'Your Moodle files have been changed, and you are about to automatically upgrade your server to this version: <br /><br />
<strong>{$a}</strong> <br /><br />
Once you do this you can not go back again. <br /><br />
+2 -1
View File
@@ -235,8 +235,9 @@ $string['selectacourse'] = 'Select a course';
$string['setting_overwriteconf'] = 'Overwrite course configuration';
$string['setting_course_fullname'] = 'Course name';
$string['setting_course_shortname'] = 'Course short name';
$string['setting_course_startdate'] = 'Course startdate';
$string['setting_course_startdate'] = 'Course start date';
$string['setting_keep_roles_and_enrolments'] = 'Keep current roles and enrolments';
$string['setting_keep_groups_and_groupings'] = 'Keep current groups and groupings';
$string['totalcategorysearchresults'] = 'Total categories: {$a}';
$string['totalcoursesearchresults'] = 'Total courses: {$a}';
$string['morecoursesearchresults'] = 'More than {$a} courses found, showing first {$a} results';
+1 -1
View File
@@ -29,7 +29,7 @@ $string['availabilityconditions'] = 'Restrict access';
$string['availablefrom'] = 'Allow access from';
$string['availablefrom_help'] = 'Access from/to dates determine when students can access the activity via a link on the course page.
The difference between access from/to dates and availability settings for the activity is that outside the set dates the latter allows students to view the activity description, whereas access from/to dates prevent access completely.';
The difference between access from/to dates and availability settings for the activity is that outside the set dates, access from/to prevents access completely, while availability allows students to view the activity description.';
$string['availableuntil'] = 'Allow access until';
$string['badavailabledates'] = 'Invalid dates. If you set both dates, the \'Allow access from\' date should be before the \'until\' date.';
$string['badgradelimits'] = 'If you set both an upper and lower grade limit, the upper limit must be higher than the lower limit.';
+11 -7
View File
@@ -52,7 +52,8 @@ $string['BJ'] = 'Benin';
$string['BL'] = 'Saint Barthélemy';
$string['BM'] = 'Bermuda';
$string['BN'] = 'Brunei Darussalam';
$string['BO'] = 'Bolivia';
$string['BO'] = 'Bolivia, Plurinational State Of';
$string['BQ'] = 'Bonaire, Sint Eustatius And Saba';
$string['BR'] = 'Brazil';
$string['BS'] = 'Bahamas';
$string['BT'] = 'Bhutan';
@@ -65,6 +66,7 @@ $string['CC'] = 'Cocos (Keeling) Islands';
$string['CD'] = 'Congo, The Democratic Republic Of The';
$string['CF'] = 'Central African Republic';
$string['CG'] = 'Congo';
$string['CH'] = 'Switzerland';
$string['CI'] = 'Côte D\'Ivoire';
$string['CK'] = 'Cook Islands';
$string['CL'] = 'Chile';
@@ -74,6 +76,7 @@ $string['CO'] = 'Colombia';
$string['CR'] = 'Costa Rica';
$string['CU'] = 'Cuba';
$string['CV'] = 'Cape Verde';
$string['CW'] = 'Curaçao';
$string['CX'] = 'Christmas Island';
$string['CY'] = 'Cyprus';
$string['CZ'] = 'Czech Republic';
@@ -121,7 +124,6 @@ $string['HN'] = 'Honduras';
$string['HR'] = 'Croatia';
$string['HT'] = 'Haiti';
$string['HU'] = 'Hungary';
$string['CH'] = 'Switzerland';
$string['ID'] = 'Indonesia';
$string['IE'] = 'Ireland';
$string['IL'] = 'Israel';
@@ -157,12 +159,12 @@ $string['LS'] = 'Lesotho';
$string['LT'] = 'Lithuania';
$string['LU'] = 'Luxembourg';
$string['LV'] = 'Latvia';
$string['LY'] = 'State of Libya';
$string['LY'] = 'Libya';
$string['MA'] = 'Morocco';
$string['MC'] = 'Monaco';
$string['MD'] = 'Moldova, Republic Of';
$string['ME'] = 'Montenegro';
$string['MF'] = 'Saint Martin';
$string['MF'] = 'Saint Martin (French Part)';
$string['MG'] = 'Madagascar';
$string['MH'] = 'Marshall Islands';
$string['MK'] = 'Macedonia, The Former Yugoslav Republic Of';
@@ -204,7 +206,7 @@ $string['PL'] = 'Poland';
$string['PM'] = 'Saint Pierre And Miquelon';
$string['PN'] = 'Pitcairn';
$string['PR'] = 'Puerto Rico';
$string['PS'] = 'Palestinian Territory, Occupied';
$string['PS'] = 'Palestine, State Of';
$string['PT'] = 'Portugal';
$string['PW'] = 'Palau';
$string['PY'] = 'Paraguay';
@@ -220,7 +222,7 @@ $string['SC'] = 'Seychelles';
$string['SD'] = 'Sudan';
$string['SE'] = 'Sweden';
$string['SG'] = 'Singapore';
$string['SH'] = 'Saint Helena';
$string['SH'] = 'Saint Helena, Ascension And Tristan Da Cunha';
$string['SI'] = 'Slovenia';
$string['SJ'] = 'Svalbard And Jan Mayen';
$string['SK'] = 'Slovakia';
@@ -229,8 +231,10 @@ $string['SM'] = 'San Marino';
$string['SN'] = 'Senegal';
$string['SO'] = 'Somalia';
$string['SR'] = 'Suriname';
$string['SS'] = 'South Sudan';
$string['ST'] = 'Sao Tome And Principe';
$string['SV'] = 'El Salvador';
$string['SX'] = 'Sint Maarten (Dutch Part)';
$string['SY'] = 'Syrian Arab Republic';
$string['SZ'] = 'Swaziland';
$string['TC'] = 'Turks And Caicos Islands';
@@ -257,7 +261,7 @@ $string['UY'] = 'Uruguay';
$string['UZ'] = 'Uzbekistan';
$string['VA'] = 'Holy See (Vatican City State)';
$string['VC'] = 'Saint Vincent And The Grenadines';
$string['VE'] = 'Venezuela';
$string['VE'] = 'Venezuela, Bolivarian Republic Of';
$string['VG'] = 'Virgin Islands, British';
$string['VI'] = 'Virgin Islands, U.S.';
$string['VN'] = 'Viet Nam';
+1
View File
@@ -238,6 +238,7 @@ $string['filternotinstalled'] = 'Filter {$a} is not currently installed';
$string['forumblockingtoomanyposts'] = 'You have exceeded the posting threshold set for this forum';
$string['generalexceptionmessage'] = 'Exception - {$a}';
$string['gradepubdisable'] = 'Grade publishing disabled';
$string['gradecantregrade'] = 'An error occurred during grade calculation: {$a}';
$string['groupalready'] = 'User already belongs to group {$a}';
$string['groupexistforcourse'] = 'Group "{$a}" already exists for this course';
$string['groupexistforcoursewithidnumber'] = '{$a->problemgroup}: Group "{$a->name}" with an idnumber of "{$a->idnumber}" already exists for this course';
+1
View File
@@ -172,6 +172,7 @@ $string['enableoutcomes_help'] = 'Support for Outcomes (also known as Competenci
$string['encoding'] = 'Encoding';
$string['errorcalculationnoequal'] = 'Formula must start with equal sign (=1+2)';
$string['errorcalculationunknown'] = 'Invalid formula';
$string['errorcalculationbroken'] = 'Probably circular reference or broken calculation formula';
$string['errorgradevaluenonnumeric'] = 'Received non-numeric for low or high grade for';
$string['errornocalculationallowed'] = 'Calculations are not allowed for this item';
$string['errornocategorisedid'] = 'Could not get an uncategorised id!';
+1 -1
View File
@@ -160,7 +160,7 @@ $string['registeredsites'] = 'Registered sites';
$string['registrationinfo'] = 'Registration information';
$string['registeredmoodleorg'] = 'Moodle.org ({$a})';
$string['registeredon'] = 'Hubs with which you are registered';
$string['registermoochtips'] = 'To be registered with Moodle.org Open Community Hub (MOOCH), your site must be registered with Moodle.org.';
$string['registermoochtips'] = 'In order to register with Moodle.net, your site must be registered with Moodle.org.';
$string['registersite'] = 'Register with {$a}';
$string['registerwith'] = 'Register with a hub';
$string['registrationconfirmed'] = 'Site registration confirmed';
+2 -4
View File
@@ -312,7 +312,7 @@ $string['coursehelpforce'] = 'Force the course group mode to every activity in t
$string['coursehelpformat'] = 'The course main page will be displayed in this format.';
$string['coursehelphiddensections'] = 'How the hidden sections in the course are displayed to students.';
$string['coursehelpmaximumupload'] = 'Define the largest size of file that can be uploaded in this course, limited by the site-wide setting.';
$string['coursehelpnewsitemsnumber'] = 'Number of recent items appearing on the course home page, in a news box down the right-hand side (0 means the news box won\'t appear).';
$string['coursehelpnewsitemsnumber'] = 'Number of recent items from the news forum appearing in the latest news block on the course page. If set to zero, the latest news block will not be displayed.';
$string['coursehelpnumberweeks'] = 'Number of sections in the course (applies to certain course formats only).';
$string['coursehelpshowgrades'] = 'Enable the display of the gradebook. It does not prevent grades from being displayed within the individual activities.';
$string['coursehidden'] = 'This course is currently unavailable to students';
@@ -322,9 +322,7 @@ $string['coursenotaccessible'] = 'This course does not allow public access';
$string['courselegacyfiles'] = 'Legacy course files';
$string['courselegacyfiles_help'] = 'The course files area provides some backward compatibility with Moodle 1.9 and earlier. All files in this area are always accessible to all participants in the course (whether you link to them or not) and there is no way to know where any of these files are being used in Moodle.
If you use this area to store course files, you can expose yourself to a number of privacy and security issues, as well as experiencing missing files in backups, course imports and any time content is shared or re-used. It is therefore recommended that you do not use this area unless you really know what you are doing.
The link below provides more information about all this and will show you some better ways to manage files in Moodle 2.';
If you use this area to store course files, you can expose yourself to a number of privacy and security issues, as well as experiencing missing files in backups, course imports and any time content is shared or re-used. It is therefore recommended that you do not use this area unless you really know what you are doing.';
$string['courselegacyfiles_link'] = 'coursefiles2';
$string['courseoverview'] = 'Course overview';
$string['courseoverviewgraph'] = 'Course overview graph';
+1 -1
View File
@@ -7544,7 +7544,7 @@ class admin_setting_managewebservicetokens extends admin_setting {
$validuntil = '';
if (!empty($token->validuntil)) {
$validuntil = date("F j, Y"); //TODO: language support (look for moodle function)
$validuntil = userdate($token->validuntil, get_string('strftimedatetime', 'langconfig'));
}
$iprestriction = '';
+3
View File
@@ -2328,6 +2328,9 @@
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="primary key of the table, please edit me"/>
</KEYS>
<INDEXES>
<INDEX NAME="unreadmessageid_idx" UNIQUE="false" FIELDS="unreadmessageid" COMMENT="Index on unreadmessage id"/>
</INDEXES>
</TABLE>
<TABLE NAME="files" COMMENT="description of files, content is stored in sha1 file pool" PREVIOUS="message_working" NEXT="files_reference">
<FIELDS>
+40
View File
@@ -1126,5 +1126,45 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2012062504.13);
}
if ($oldversion < 2012062506.02) {
// Fixing possible wrong MIME type for MIME HTML (MHTML) files.
$extensions = array('%.mht', '%.mhtml');
$select = $DB->sql_like('filename', '?', false);
foreach ($extensions as $extension) {
$DB->set_field_select(
'files',
'mimetype',
'message/rfc822',
$select,
array($extension)
);
}
upgrade_main_savepoint(true, 2012062506.02);
}
if ($oldversion < 2012062506.06) {
// MDL-29877 Some bad restores created grade items with no category information.
$sql = "UPDATE {grade_items}
SET categoryid = courseid
WHERE itemtype <> 'course' and itemtype <> 'category'
AND categoryid IS NULL";
$DB->execute($sql);
upgrade_main_savepoint(true, 2012062506.06);
}
if ($oldversion < 2012062506.08) {
// Adding index to unreadmessageid field of message_working table (MDL-34933)
$table = new xmldb_table('message_working');
$index = new xmldb_index('unreadmessageid_idx', XMLDB_INDEX_NOTUNIQUE, array('unreadmessageid'));
// Conditionally launch add index unreadmessageid
if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2012062506.08);
}
return true;
}
+6 -2
View File
@@ -713,7 +713,11 @@ class mssql_native_moodle_database extends moodle_database {
$this->query_end($result);
if ($limitfrom) { // Skip $limitfrom records
mssql_data_seek($result, $limitfrom);
if (!@mssql_data_seek($result, $limitfrom)) {
// Nothing, most probably seek past the end.
mssql_free_result($result);
$result = null;
}
}
return $this->create_recordset($result);
@@ -1176,7 +1180,7 @@ class mssql_native_moodle_database extends moodle_database {
public function sql_concat() {
$arr = func_get_args();
foreach ($arr as $key => $ele) {
$arr[$key] = ' CAST(' . $ele . ' AS VARCHAR(255)) ';
$arr[$key] = ' CAST(' . $ele . ' AS NVARCHAR(255)) ';
}
$s = implode(' + ', $arr);
if ($s === '') {
+66
View File
@@ -1570,6 +1570,72 @@ class oci_native_moodle_database extends moodle_database {
return " $s ";
}
/**
* Constructs 'IN()' or '=' sql fragment
*
* Method overriding {@link moodle_database::get_in_or_equal} to be able to get
* more than 1000 elements working, to avoid ORA-01795. We use a pivoting technique
* to be able to transform the params into virtual rows, so the original IN()
* expression gets transformed into a subquery. Once more, be noted that we shouldn't
* be using ever get_in_or_equal() with such number of parameters (proper subquery and/or
* chunking should be used instead).
*
* @param mixed $items A single value or array of values for the expression.
* @param int $type Parameter bounding type : SQL_PARAMS_QM or SQL_PARAMS_NAMED.
* @param string $prefix Named parameter placeholder prefix (a unique counter value is appended to each parameter name).
* @param bool $equal True means we want to equate to the constructed expression, false means we don't want to equate to it.
* @param mixed $onemptyitems This defines the behavior when the array of items provided is empty. Defaults to false,
* meaning throw exceptions. Other values will become part of the returned SQL fragment.
* @throws coding_exception | dml_exception
* @return array A list containing the constructed sql fragment and an array of parameters.
*/
public function get_in_or_equal($items, $type=SQL_PARAMS_QM, $prefix='param', $equal=true, $onemptyitems=false) {
list($sql, $params) = parent::get_in_or_equal($items, $type, $prefix, $equal, $onemptyitems);
// Less than 1000 elements, nothing to do.
if (count($params) < 1000) {
return array($sql, $params); // Return unmodified.
}
// Extract the interesting parts of the sql to rewrite.
if (preg_match('!(^.*IN \()([^\)]*)(.*)$!', $sql, $matches) === false) {
return array($sql, $params); // Return unmodified.
}
$instart = $matches[1];
$insql = $matches[2];
$inend = $matches[3];
$newsql = '';
// Some basic verification about the matching going ok.
$insqlarr = explode(',', $insql);
if (count($insqlarr) !== count($params)) {
return array($sql, $params); // Return unmodified.
}
// Arrived here, we need to chunk and pivot the params, building a new sql (params remain the same).
$addunionclause = false;
while ($chunk = array_splice($insqlarr, 0, 125)) { // Each chunk will handle up to 125 (+125 +1) elements (DECODE max is 255).
$chunksize = count($chunk);
if ($addunionclause) {
$newsql .= "\n UNION ALL";
}
$newsql .= "\n SELECT DECODE(pivot";
$counter = 1;
foreach ($chunk as $element) {
$newsql .= ",\n {$counter}, " . trim($element);
$counter++;
}
$newsql .= ")";
$newsql .= "\n FROM dual";
$newsql .= "\n CROSS JOIN (SELECT LEVEL AS pivot FROM dual CONNECT BY LEVEL <= {$chunksize})";
$addunionclause = true;
}
// Rebuild the complete IN() clause and return it.
return array($instart . $newsql . $inend, $params);
}
/**
* Returns the SQL for returning searching one string for the location of another.
*/
+1 -1
View File
@@ -1241,7 +1241,7 @@ class sqlsrv_native_moodle_database extends moodle_database {
$arr = func_get_args();
foreach ($arr as $key => $ele) {
$arr[$key] = ' CAST('.$ele.' AS VARCHAR(255)) ';
$arr[$key] = ' CAST('.$ele.' AS NVARCHAR(255)) ';
}
$s = implode(' + ', $arr);
+21
View File
@@ -4152,6 +4152,27 @@ class dml_testcase extends database_driver_testcase {
$DB->insert_record($tablename, array('course' => 7, 'content' => 'xx', 'name'=>'1abc'));
$this->assertEquals(count($DB->get_records_sql($sql, array(1))), 1);
$this->assertEquals(count($DB->get_records_sql($sql, array("1"))), 1);
// Test get_in_or_equal() with a big number of elements. Note that ideally
// we should be detecting and warning about any use over, say, 200 elements
// and recommend to change code to use subqueries and/or chunks instead.
$currentcount = $DB->count_records($tablename);
$numelements = 10000; // Verify that we can handle 10000 elements (crazy!)
$values = range(1, $numelements);
list($insql, $inparams) = $DB->get_in_or_equal($values, SQL_PARAMS_QM); // With QM params.
$sql = "SELECT *
FROM {{$tablename}}
WHERE id $insql";
$results = $DB->get_records_sql($sql, $inparams);
$this->assertEquals($currentcount, count($results));
list($insql, $inparams) = $DB->get_in_or_equal($values, SQL_PARAMS_NAMED); // With NAMED params.
$sql = "SELECT *
FROM {{$tablename}}
WHERE id $insql";
$results = $DB->get_records_sql($sql, $inparams);
$this->assertEquals($currentcount, count($results));
}
function test_onelevel_commit() {
+1 -1
View File
@@ -139,7 +139,7 @@ class tinymce_texteditor extends texteditor {
'apply_source_formatting' => true,
'remove_script_host' => false,
'entity_encoding' => "raw",
'plugins' => "{$xmedia}advimage,safari,table,style,layer,advhr,advlink,emotions,inlinepopups,searchreplace,paste,directionality,fullscreen,moodlenolink,{$xemoticon}{$xdragmath}nonbreaking,contextmenu,insertdatetime,save,iespell,preview,print,noneditable,visualchars,xhtmlxtras,template,pagebreak,spellchecker",
'plugins' => "{$xmedia}advimage,table,style,layer,advhr,advlink,emotions,inlinepopups,searchreplace,paste,directionality,fullscreen,moodlenolink,{$xemoticon}{$xdragmath}nonbreaking,contextmenu,insertdatetime,save,iespell,preview,print,noneditable,visualchars,xhtmlxtras,template,pagebreak,spellchecker",
'theme_advanced_font_sizes' => "1,2,3,4,5,6,7",
'theme_advanced_layout_manager' => "SimpleLayout",
'theme_advanced_toolbar_align' => "left",
+1
View File
@@ -687,6 +687,7 @@ function external_format_text($text, $textformat, $contextid, $component, $filea
$settings = external_settings::get_instance();
if ($settings->get_fileurl()) {
require_once($CFG->libdir . "/filelib.php");
$text = file_rewrite_pluginfile_urls($text, $settings->get_file(), $contextid, $component, $filearea, $itemid);
}
+2
View File
@@ -1445,6 +1445,8 @@ function &get_mimetypes_array() {
'm' => array ('type'=>'text/plain', 'icon'=>'sourcecode'),
'mbz' => array ('type'=>'application/vnd.moodle.backup', 'icon'=>'moodle'),
'mdb' => array ('type'=>'application/x-msaccess', 'icon'=>'base'),
'mht' => array ('type'=>'message/rfc822', 'icon'=>'archive'),
'mhtml'=> array ('type'=>'message/rfc822', 'icon'=>'archive'),
'mov' => array ('type'=>'video/quicktime', 'icon'=>'quicktime', 'groups'=>array('video','web_video'), 'string'=>'video'),
'movie'=> array ('type'=>'video/x-sgi-movie', 'icon'=>'quicktime', 'groups'=>array('video'), 'string'=>'video'),
'm3u' => array ('type'=>'audio/x-mpegurl', 'icon'=>'mp3', 'groups'=>array('audio'), 'string'=>'audio'),
+4 -1
View File
@@ -82,8 +82,11 @@ class MoodleQuickForm_passwordunmask extends MoodleQuickForm_password {
} else {
$unmask = get_string('unmaskpassword', 'form');
//Pass id of the element, so that unmask checkbox can be attached.
$attributes = array('formid' => $this->getAttribute('id'),
'checkboxlabel' => $unmask,
'checkboxname' => $this->getAttribute('name'));
$PAGE->requires->yui_module('moodle-form-passwordunmask', 'M.form.passwordunmask',
array(array('formid' => $this->getAttribute('id'), 'checkboxname' => $unmask)));
array($attributes));
return $this->_getTabs() . '<input' . $this->_getAttrString($this->_attributes) . ' />';
}
}
+10 -4
View File
@@ -71,13 +71,19 @@ class MoodleQuickForm_select extends HTML_QuickForm_select{
* @return string
*/
function toHtml(){
$html = '';
if ($this->getMultiple()) {
// Adding an hidden field forces the browser to send an empty data even though the user did not
// select any element. This value will be cleaned up in self::exportValue() as it will not be part
// of the select options.
$html .= '<input type="hidden" name="'.$this->getName().'" value="_qf__force_multiselect_submission">';
}
if ($this->_hiddenLabel){
$this->_generateId();
return '<label class="accesshide" for="'.$this->getAttribute('id').'" >'.
$this->getLabel().'</label>'.parent::toHtml();
} else {
return parent::toHtml();
$html .= '<label class="accesshide" for="'.$this->getAttribute('id').'" >'.$this->getLabel().'</label>';
}
$html .= parent::toHtml();
return $html;
}
/**
+5 -4
View File
@@ -7,18 +7,19 @@ YUI.add('moodle-form-passwordunmask', function(Y) {
//Initialize checkbox if id is passed
initializer : function(params) {
if (params && params.formid) {
this.add_checkbox(params.formid, params.checkboxname);
this.add_checkbox(params.formid, params.checkboxlabel, params.checkboxname);
}
},
//Create checkbox for unmasking password
add_checkbox : function(elementid, checkboxlabel) {
add_checkbox : function(elementid, checkboxlabel, checkboxname) {
var node = Y.one('#'+elementid);
//retaining unmask div from previous implementation.
var unmaskdiv = Y.Node.create('<div id="'+elementid+'unmaskdiv" class="unmask"></div>');
//Add checkbox for unmasking to unmaskdiv
var unmaskchb = Y.Node.create('<input id="'+elementid+'unmask" type="checkbox">');
var unmaskchb = Y.Node.create('<input id="'+elementid+'unmask" type="checkbox" name="'+
checkboxname+'unmask">');
unmaskdiv.appendChild(unmaskchb);
//Attach event using static javascript function for unmasking password.
unmaskchb.on('click', function() {unmaskPassword(elementid);});
@@ -36,4 +37,4 @@ YUI.add('moodle-form-passwordunmask', function(Y) {
M.form.passwordunmask = function(params) {
return new PASSWORDUNMASK(params);
}
}, '@VERSION@', {requires:['base', 'node']});
}, '@VERSION@', {requires:['base', 'node']});
+78 -11
View File
@@ -1513,6 +1513,81 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless {
$this->_types = $paramtypes + $this->_types;
}
/**
* Return the type(s) to use to clean an element.
*
* In the case where the element has an array as a value, we will try to obtain a
* type defined for that specific key, and recursively until done.
*
* This method does not work reverse, you cannot pass a nested element and hoping to
* fallback on the clean type of a parent. This method intends to be used with the
* main element, which will generate child types if needed, not the other way around.
*
* Example scenario:
*
* You have defined a new repeated element containing a text field called 'foo'.
* By default there will always be 2 occurence of 'foo' in the form. Even though
* you've set the type on 'foo' to be PARAM_INT, for some obscure reason, you want
* the first value of 'foo', to be PARAM_FLOAT, which you set using setType:
* $mform->setType('foo[0]', PARAM_FLOAT).
*
* Now if you call this method passing 'foo', along with the submitted values of 'foo':
* array(0 => '1.23', 1 => '10'), you will get an array telling you that the key 0 is a
* FLOAT and 1 is an INT. If you had passed 'foo[1]', along with its value '10', you would
* get the default clean type returned (param $default).
*
* @param string $elementname name of the element.
* @param mixed $value value that should be cleaned.
* @param int $default default constant value to be returned (PARAM_...)
* @return string|array constant value or array of constant values (PARAM_...)
*/
public function getCleanType($elementname, $value, $default = PARAM_RAW) {
$type = $default;
if (array_key_exists($elementname, $this->_types)) {
$type = $this->_types[$elementname];
}
if (is_array($value)) {
$default = $type;
$type = array();
foreach ($value as $subkey => $subvalue) {
$typekey = "$elementname" . "[$subkey]";
if (array_key_exists($typekey, $this->_types)) {
$subtype = $this->_types[$typekey];
} else {
$subtype = $default;
}
if (is_array($subvalue)) {
$type[$subkey] = $this->getCleanType($typekey, $subvalue, $subtype);
} else {
$type[$subkey] = $subtype;
}
}
}
return $type;
}
/**
* Return the cleaned value using the passed type(s).
*
* @param mixed $value value that has to be cleaned.
* @param int|array $type constant value to use to clean (PARAM_...), typically returned by {@link self::getCleanType()}.
* @return mixed cleaned up value.
*/
public function getCleanedValue($value, $type) {
if (is_array($type) && is_array($value)) {
foreach ($type as $key => $param) {
$value[$key] = $this->getCleanedValue($value[$key], $param);
}
} else if (!is_array($type) && !is_array($value)) {
$value = clean_param($value, $type);
} else if (!is_array($type) && is_array($value)) {
$value = clean_param_array($value, $type, true);
} else {
throw new coding_exception('Unexpected type or value received in MoodleQuickForm::getCleanedValue()');
}
return $value;
}
/**
* Updates submitted values
*
@@ -1525,17 +1600,9 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless {
if (empty($submission)) {
$this->_submitValues = array();
} else {
foreach ($submission as $key=>$s) {
if (array_key_exists($key, $this->_types)) {
$type = $this->_types[$key];
} else {
$type = PARAM_RAW;
}
if (is_array($s)) {
$submission[$key] = clean_param_array($s, $type, true);
} else {
$submission[$key] = clean_param($s, $type);
}
foreach ($submission as $key => $s) {
$type = $this->getCleanType($key, $s);
$submission[$key] = $this->getCleanedValue($s, $type);
}
$this->_submitValues = $submission;
$this->_flagSubmitted = true;
+6 -2
View File
@@ -1152,13 +1152,17 @@ class grade_category extends grade_object {
} else {
$categoryid = $item->categoryid;
if (empty($categoryid)) {
debugging('Found a grade item that isnt in a category');
}
}
// prevent problems with duplicate sortorders in db
$sortorder = $item->sortorder;
while (array_key_exists($sortorder, $cats[$categoryid]->children)) {
//debugging("$sortorder exists in item loop");
while (array_key_exists($categoryid, $cats)
&& array_key_exists($sortorder, $cats[$categoryid]->children)) {
$sortorder++;
}
+5
View File
@@ -1503,6 +1503,11 @@ class grade_item extends grade_object {
$oldgrade->feedback = $grade->feedback;
$oldgrade->feedbackformat = $grade->feedbackformat;
// MDL-31713 rawgramemin and max must be up to date so conditional access %'s works properly.
$grade->rawgrademin = $this->grademin;
$grade->rawgrademax = $this->grademax;
$grade->rawscaleid = $this->scaleid;
// changed grade?
if ($finalgrade !== false) {
if ($this->is_overridable_item()) {
+31
View File
@@ -63,6 +63,7 @@ class grade_item_testcase extends grade_base_testcase {
$this->sub_test_grade_item_set_calculation();
$this->sub_test_grade_item_get_calculation();
$this->sub_test_grade_item_compute();
$this->sub_test_update_final_grade();
}
protected function sub_test_grade_item_construct() {
@@ -552,4 +553,34 @@ class grade_item_testcase extends grade_base_testcase {
$grade_grade = grade_grade::fetch(array('userid'=>$this->grade_grades[5]->userid, 'itemid'=>$this->grade_grades[5]->itemid));
$this->assertEquals($this->grade_grades[5]->finalgrade, $grade_grade->finalgrade);
}
protected function sub_test_update_final_grade() {
// MDL-31713 Check that min and max are set on the grade_grade instance
// if the grade is overridden before the activity has supplied a grade.
$min = 2;
$max = 8;
// Create a brand new grade item.
$grade_item = new grade_item();
$this->assertTrue(method_exists($grade_item, 'insert'));
$grade_item->courseid = $this->courseid;
$grade_item->categoryid = $this->grade_categories[1]->id;
$grade_item->itemname = 'brand new unit test grade item';
$grade_item->itemtype = 'mod';
$grade_item->itemmodule = 'quiz';
$grade_item->iteminfo = 'Grade item used for unit testing';
$grade_item->grademin = $min;
$grade_item->grademax = $max;
$grade_item->insert();
// Override the student grade.
$grade_item->update_final_grade($this->user[1]->id, 7, 'gradebook', '', FORMAT_MOODLE);
// Check the student's grade has the correct min and max grade.
$grade_grade = grade_grade::fetch(array('userid'=>$this->user[1]->id, 'itemid'=>$grade_item->id));
$this->assertEquals($min, $grade_grade->rawgrademin);
$this->assertEquals($max, $grade_grade->rawgrademax);
}
}
+2 -2
View File
@@ -1097,9 +1097,9 @@ function grade_regrade_final_grades($courseid, $userid=null, $updated_item=null)
continue; // this one is ok
}
$grade_items[$gid]->force_regrading();
$errors[$grade_items[$gid]->id] = 'Probably circular reference or broken calculation formula'; // TODO: localize
$errors[$grade_items[$gid]->id] = get_string('errorcalculationbroken', 'grades');
}
break; // oki, found error
break; // Found error.
}
}
+45 -25
View File
@@ -1022,34 +1022,54 @@ function findChildNodes(start, tagName, elementClass, elementID, elementName) {
}
function unmaskPassword(id) {
var pw = document.getElementById(id);
var chb = document.getElementById(id+'unmask');
var pw = document.getElementById(id);
var chb = document.getElementById(id+'unmask');
var IEbrowser = navigator.userAgent.toLowerCase().indexOf('msie');
var IEversion = 0;
try {
// first try IE way - it can not set name attribute later
if (chb.checked) {
var newpw = document.createElement('<input type="text" autocomplete="off" name="'+pw.name+'">');
} else {
var newpw = document.createElement('<input type="password" autocomplete="off" name="'+pw.name+'">');
if (IEbrowser != -1) {
var position = navigator.userAgent.indexOf("MSIE") + 5;
var end = navigator.userAgent.search("; Windows");
IEversion = parseInt(navigator.userAgent.substring(position,end));
}
newpw.attributes['class'].nodeValue = pw.attributes['class'].nodeValue;
} catch (e) {
var newpw = document.createElement('input');
newpw.setAttribute('autocomplete', 'off');
newpw.setAttribute('name', pw.name);
if (chb.checked) {
newpw.setAttribute('type', 'text');
} else {
newpw.setAttribute('type', 'password');
// MDL-30438 - The capability to changing the value of input type is not supported by IE8 or lower.
// Replacing existing child with a new one, removed all yui properties for the node. Therefore, this
// functionality won't work in IE8 or lower.
// This is a temporary fixed for 2.4 or lower branches to allow other browsers to function properly.
if (IEbrowser == -1 || (IEversion >= 9)) {
if (chb.checked) {
pw.type = "text";
} else {
pw.type = "password";
}
} else { //IE Browser version 8 or lower
try {
// first try IE way - it can not set name attribute later
if (chb.checked) {
var newpw = document.createElement('<input type="text" autocomplete="off" name="'+pw.name+'">');
} else {
var newpw = document.createElement('<input type="password" autocomplete="off" name="'+pw.name+'">');
}
newpw.attributes['class'].nodeValue = pw.attributes['class'].nodeValue;
} catch (e) {
var newpw = document.createElement('input');
newpw.setAttribute('autocomplete', 'off');
newpw.setAttribute('name', pw.name);
if (chb.checked) {
newpw.setAttribute('type', 'text');
} else {
newpw.setAttribute('type', 'password');
}
newpw.setAttribute('class', pw.getAttribute('class'));
}
newpw.id = pw.id;
newpw.size = pw.size;
newpw.onblur = pw.onblur;
newpw.onchange = pw.onchange;
newpw.value = pw.value;
pw.parentNode.replaceChild(newpw, pw);
}
newpw.setAttribute('class', pw.getAttribute('class'));
}
newpw.id = pw.id;
newpw.size = pw.size;
newpw.onblur = pw.onblur;
newpw.onchange = pw.onchange;
newpw.value = pw.value;
pw.parentNode.replaceChild(newpw, pw);
}
function filterByParent(elCollection, parentFinder) {
+6
View File
@@ -1279,6 +1279,12 @@ function get_fast_modinfo(&$course, $userid=0) {
function rebuild_course_cache($courseid=0, $clearonly=false) {
global $COURSE, $DB, $CFG;
if (!$clearonly && !empty($CFG->upgraderunning)) {
debugging('Function rebuild_course_cache() should not be called from upgrade script unless with argument clearonly.',
DEBUG_DEVELOPER);
$clearonly = true;
}
// Destroy navigation caches
navigation_cache::destroy_volatile_caches();
+122 -89
View File
@@ -901,10 +901,7 @@ function clean_param($param, $type) {
case PARAM_PLUGIN:
case PARAM_AREA:
// we do not want any guessing here, either the name is correct or not
if (!preg_match('/^[a-z][a-z0-9_]*[a-z0-9]$/', $param)) {
return '';
}
if (strpos($param, '__') !== false) {
if (!is_valid_plugin_name($param)) {
return '';
}
return $param;
@@ -6455,28 +6452,18 @@ class core_string_manager implements string_manager {
}
/**
* Returns dependencies of current language, en is not included.
* Returns list of all explicit parent languages for the given language.
*
* @param string $lang
* @return array all parents, the lang itself is last
* English (en) is considered as the top implicit parent of all language packs
* and is not included in the returned list. The language itself is appended to the
* end of the list. The method is aware of circular dependency risk.
*
* @see self::populate_parent_languages()
* @param string $lang the code of the language
* @return array all explicit parent languages with the lang itself appended
*/
public function get_language_dependencies($lang) {
if ($lang === 'en') {
return array();
}
if (!file_exists("$this->otherroot/$lang/langconfig.php")) {
return array();
}
$string = array();
include("$this->otherroot/$lang/langconfig.php");
if (empty($string['parentlanguage'])) {
return array($lang);
} else {
$parentlang = $string['parentlanguage'];
unset($string);
return array_merge($this->get_language_dependencies($parentlang), array($lang));
}
return $this->populate_parent_languages($lang);
}
/**
@@ -6613,10 +6600,6 @@ class core_string_manager implements string_manager {
* @return boot true if exists
*/
public function string_exists($identifier, $component) {
$identifier = clean_param($identifier, PARAM_STRINGID);
if (empty($identifier)) {
return false;
}
$lang = current_language();
$string = $this->load_component_strings($component, $lang);
return isset($string[$identifier]);
@@ -6981,6 +6964,46 @@ class core_string_manager implements string_manager {
fulldelete($this->menucache);
$this->get_list_of_translations(true);
}
/// End of external API ////////////////////////////////////////////////////
/**
* Helper method that recursively loads all parents of the given language.
*
* @see self::get_language_dependencies()
* @param string $lang language code
* @param array $stack list of parent languages already populated in previous recursive calls
* @return array list of all parents of the given language with the $lang itself added as the last element
*/
protected function populate_parent_languages($lang, array $stack = array()) {
// English does not have a parent language.
if ($lang === 'en') {
return $stack;
}
// Prevent circular dependency (and thence the infinitive recursion loop).
if (in_array($lang, $stack)) {
return $stack;
}
// Load language configuration and look for the explicit parent language.
if (!file_exists("$this->otherroot/$lang/langconfig.php")) {
return $stack;
}
$string = array();
include("$this->otherroot/$lang/langconfig.php");
if (empty($string['parentlanguage']) or $string['parentlanguage'] === 'en') {
unset($string);
return array_merge(array($lang), $stack);
} else {
$parentlang = $string['parentlanguage'];
unset($string);
return $this->populate_parent_languages($parentlang, array_merge(array($lang), $stack));
}
}
}
@@ -7033,10 +7056,6 @@ class install_string_manager implements string_manager {
* @return boot true if exists
*/
public function string_exists($identifier, $component) {
$identifier = clean_param($identifier, PARAM_STRINGID);
if (empty($identifier)) {
return false;
}
// simple old style hack ;)
$str = get_string($identifier, $component);
return (strpos($str, '[[') === false);
@@ -7282,8 +7301,7 @@ function get_string($identifier, $component = '', $a = NULL, $lazyload = false)
return new lang_string($identifier, $component, $a);
}
$identifier = clean_param($identifier, PARAM_STRINGID);
if (empty($identifier)) {
if (debugging('', DEBUG_DEVELOPER) && clean_param($identifier, PARAM_STRINGID) === '') {
throw new coding_exception('Invalid string identifier. The identifier cannot be empty. Please fix your get_string() call.');
}
@@ -7988,6 +8006,15 @@ function get_plugin_types($fullpaths=true) {
return ($fullpaths ? $fullinfo : $info);
}
/**
* This method validates a plug name. It is much faster than calling clean_param.
* @param string $name a string that might be a plugin name.
* @return bool if this string is a valid plugin name.
*/
function is_valid_plugin_name($name) {
return (bool) preg_match('/^[a-z](?:[a-z0-9_](?!__))*[a-z0-9]$/', $name);
}
/**
* Simplified version of get_list_of_plugins()
* @param string $plugintype type of plugin
@@ -8049,9 +8076,8 @@ function get_plugin_list($plugintype) {
if (in_array($pluginname, $ignored)) {
continue;
}
$pluginname = clean_param($pluginname, PARAM_PLUGIN);
if (empty($pluginname)) {
// better ignore plugins with problematic names here
if (!is_valid_plugin_name($pluginname)) {
// Better ignore plugins with problematic names here.
continue;
}
$result[$pluginname] = $fulldir.'/'.$pluginname;
@@ -9126,13 +9152,13 @@ function shorten_text($text, $ideal=30, $exact = false, $ending='...') {
global $CFG;
// if the plain text is shorter than the maximum length, return the whole text
// If the plain text is shorter than the maximum length, return the whole text.
if (textlib::strlen(preg_replace('/<.*?>/', '', $text)) <= $ideal) {
return $text;
}
// Splits on HTML tags. Each open/close/empty tag will be the first thing
// and only tag in its 'line'
// and only tag in its 'line'.
preg_match_all('/(<.+?>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
$total_length = textlib::strlen($ending);
@@ -9141,37 +9167,43 @@ function shorten_text($text, $ideal=30, $exact = false, $ending='...') {
// This array stores information about open and close tags and their position
// in the truncated string. Each item in the array is an object with fields
// ->open (true if open), ->tag (tag name in lower case), and ->pos
// (byte position in truncated text)
// (byte position in truncated text).
$tagdetails = array();
foreach ($lines as $line_matchings) {
// if there is any html-tag in this line, handle it and add it (uncounted) to the output
// If there is any html-tag in this line, handle it and add it (uncounted) to the output.
if (!empty($line_matchings[1])) {
// if it's an "empty element" with or without xhtml-conform closing slash (f.e. <br/>)
// If it's an "empty element" with or without xhtml-conform closing slash (f.e. <br/>).
if (preg_match('/^<(\s*.+?\/\s*|\s*(img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param)(\s.+?)?)>$/is', $line_matchings[1])) {
// do nothing
// if tag is a closing tag (f.e. </b>)
// Do nothing.
} else if (preg_match('/^<\s*\/([^\s]+?)\s*>$/s', $line_matchings[1], $tag_matchings)) {
// record closing tag
$tagdetails[] = (object)array('open'=>false,
'tag'=>textlib::strtolower($tag_matchings[1]), 'pos'=>textlib::strlen($truncate));
// if tag is an opening tag (f.e. <b>)
// Record closing tag.
$tagdetails[] = (object) array(
'open' => false,
'tag' => textlib::strtolower($tag_matchings[1]),
'pos' => textlib::strlen($truncate),
);
} else if (preg_match('/^<\s*([^\s>!]+).*?>$/s', $line_matchings[1], $tag_matchings)) {
// record opening tag
$tagdetails[] = (object)array('open'=>true,
'tag'=>textlib::strtolower($tag_matchings[1]), 'pos'=>textlib::strlen($truncate));
// Record opening tag.
$tagdetails[] = (object) array(
'open' => true,
'tag' => textlib::strtolower($tag_matchings[1]),
'pos' => textlib::strlen($truncate),
);
}
// add html-tag to $truncate'd text
// Add html-tag to $truncate'd text.
$truncate .= $line_matchings[1];
}
// calculate the length of the plain text part of the line; handle entities as one character
// Calculate the length of the plain text part of the line; handle entities as one character.
$content_length = textlib::strlen(preg_replace('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i', ' ', $line_matchings[2]));
if ($total_length+$content_length > $ideal) {
// the number of characters which are left
if ($total_length + $content_length > $ideal) {
// The number of characters which are left.
$left = $ideal - $total_length;
$entities_length = 0;
// search for html entities
// Search for html entities.
if (preg_match_all('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i', $line_matchings[2], $entities, PREG_OFFSET_CAPTURE)) {
// calculate the real length of all entities in the legal range
foreach ($entities[0] as $entity) {
@@ -9184,7 +9216,32 @@ function shorten_text($text, $ideal=30, $exact = false, $ending='...') {
}
}
}
$truncate .= textlib::substr($line_matchings[2], 0, $left+$entities_length);
$breakpos = $left + $entities_length;
// if the words shouldn't be cut in the middle...
if (!$exact) {
// ...search the last occurence of a space...
for (; $breakpos > 0; $breakpos--) {
if ($char = textlib::substr($line_matchings[2], $breakpos, 1)) {
if ($char === '.' or $char === ' ') {
$breakpos += 1;
break;
} else if (strlen($char) > 2) { // Chinese/Japanese/Korean text
$breakpos += 1; // can be truncated at any UTF-8
break; // character boundary.
}
}
}
}
if ($breakpos == 0) {
// This deals with the test_shorten_text_no_spaces case.
$breakpos = $left + $entities_length;
} else if ($breakpos > $left + $entities_length) {
// This deals with the previous for loop breaking on the first char.
$breakpos = $left + $entities_length;
}
$truncate .= textlib::substr($line_matchings[2], 0, $breakpos);
// maximum length is reached, so get off the loop
break;
} else {
@@ -9192,55 +9249,31 @@ function shorten_text($text, $ideal=30, $exact = false, $ending='...') {
$total_length += $content_length;
}
// if the maximum length is reached, get off the loop
// If the maximum length is reached, get off the loop.
if($total_length >= $ideal) {
break;
}
}
// if the words shouldn't be cut in the middle...
if (!$exact) {
// ...search the last occurence of a space...
for ($k=textlib::strlen($truncate);$k>0;$k--) {
if ($char = textlib::substr($truncate, $k, 1)) {
if ($char === '.' or $char === ' ') {
$breakpos = $k+1;
break;
} else if (strlen($char) > 2) { // Chinese/Japanese/Korean text
$breakpos = $k+1; // can be truncated at any UTF-8
break; // character boundary.
}
}
}
if (isset($breakpos)) {
// ...and cut the text in this position
$truncate = textlib::substr($truncate, 0, $breakpos);
}
}
// add the defined ending to the text
// Add the defined ending to the text.
$truncate .= $ending;
// Now calculate the list of open html tags based on the truncate position
// Now calculate the list of open html tags based on the truncate position.
$open_tags = array();
foreach ($tagdetails as $taginfo) {
if(isset($breakpos) && $taginfo->pos >= $breakpos) {
// Don't include tags after we made the break!
break;
}
if($taginfo->open) {
// add tag to the beginning of $open_tags list
if ($taginfo->open) {
// Add tag to the beginning of $open_tags list.
array_unshift($open_tags, $taginfo->tag);
} else {
$pos = array_search($taginfo->tag, array_reverse($open_tags, true)); // can have multiple exact same open tags, close the last one
// Can have multiple exact same open tags, close the last one.
$pos = array_search($taginfo->tag, array_reverse($open_tags, true));
if ($pos !== false) {
unset($open_tags[$pos]);
}
}
}
// close all unclosed html-tags
// Close all unclosed html-tags.
foreach ($open_tags as $tag) {
$truncate .= '</' . $tag . '>';
}
@@ -11083,7 +11116,7 @@ class lang_string {
// Check if we need to process the string
if ($this->string === null) {
// Check the quality of the identifier.
if (clean_param($this->identifier, PARAM_STRINGID) == '') {
if (debugging('', DEBUG_DEVELOPER) && clean_param($this->identifier, PARAM_STRINGID) === '') {
throw new coding_exception('Invalid string identifier. Most probably some illegal character is part of the string identifier. Please check your string definition');
}
+27 -12
View File
@@ -667,12 +667,18 @@ class navigation_node implements renderable {
* Hides the node and any children it has.
*
* @since 2.3.5
* @param array $typestohide Optional. An array of node types that should be hidden.
* If null all nodes will be hidden.
* If an array is given then nodes will only be hidden if their type mtatches an element in the array.
* e.g. array(navigation_node::TYPE_COURSE) would hide only course nodes.
*/
public function hide() {
$this->display = false;
if ($this->has_children()) {
foreach ($this->children as $child) {
$child->hide();
public function hide(array $typestohide = null) {
if ($typestohide === null || in_array($this->type, $typestohide)) {
$this->display = false;
if ($this->has_children()) {
foreach ($this->children as $child) {
$child->hide($typestohide);
}
}
}
}
@@ -2524,6 +2530,7 @@ class global_navigation extends navigation_node {
$issite = ($course->id == $SITE->id);
$shortname = format_string($course->shortname, true, array('context' => $coursecontext));
$fullname = format_string($course->fullname, true, array('context' => $coursecontext));
if ($issite) {
$parent = $this;
@@ -2559,7 +2566,9 @@ class global_navigation extends navigation_node {
$coursenode = $parent->add($shortname, $url, self::TYPE_COURSE, $shortname, $course->id);
$coursenode->nodetype = self::NODETYPE_BRANCH;
$coursenode->hidden = (!$course->visible);
$coursenode->title(format_string($course->fullname, true, array('context' => get_context_instance(CONTEXT_COURSE, $course->id))));
// We need to decode &amp;'s here as they will have been added by format_string above and attributes will be encoded again
// later.
$coursenode->title(str_replace('&amp;', '&', $fullname));
if (!$forcegeneric) {
$this->addedcourses[$course->id] = $coursenode;
}
@@ -2745,18 +2754,24 @@ class global_navigation extends navigation_node {
public function set_expansion_limit($type) {
global $SITE;
$nodes = $this->find_all_of_type($type);
// We only want to hide specific types of nodes.
// Only nodes that represent "structure" in the navigation tree should be hidden.
// If we hide all nodes then we risk hiding vital information.
$typestohide = array(
self::TYPE_CATEGORY,
self::TYPE_COURSE,
self::TYPE_SECTION,
self::TYPE_ACTIVITY
);
foreach ($nodes as $node) {
// We need to generate the full site node
if ($type == self::TYPE_COURSE && $node->key == $SITE->id) {
continue;
}
foreach ($node->children as $child) {
// We still want to show course reports and participants containers
// or there will be navigation missing.
if ($type == self::TYPE_COURSE && $child->type === self::TYPE_CONTAINER) {
continue;
}
$child->hide();
$child->hide($typestohide);
}
}
return true;
+2
View File
@@ -264,6 +264,8 @@ class oauth_helper {
$this->sign_secret = $this->consumer_secret.'&'.$secret;
$params = $this->prepare_oauth_parameters($this->access_token_api, array('oauth_token'=>$token, 'oauth_verifier'=>$verifier), 'POST');
$this->setup_oauth_http_header($params);
// Should never send the callback in this request.
unset($params['oauth_callback']);
$content = $this->http->post($this->access_token_api, $params, $this->http_options);
$keys = $this->parse_result($content);
$this->set_access_token($keys['oauth_token'], $keys['oauth_token_secret']);
+5 -2
View File
@@ -529,7 +529,9 @@ class core_renderer extends renderer_base {
if (session_is_loggedinas()) {
$realuser = session_get_realuser();
$fullname = fullname($realuser, true);
$realuserinfo = " [<a href=\"$CFG->wwwroot/course/loginas.php?id=$course->id&amp;sesskey=".sesskey()."\">$fullname</a>] ";
$loginastitle = get_string('loginas');
$realuserinfo = " [<a href=\"$CFG->wwwroot/course/loginas.php?id=$course->id&amp;sesskey=".sesskey()."\"";
$realuserinfo .= "title =\"".$loginastitle."\">$fullname</a>] ";
} else {
$realuserinfo = '';
}
@@ -544,7 +546,8 @@ class core_renderer extends renderer_base {
$fullname = fullname($USER, true);
// Since Moodle 2.0 this link always goes to the public profile page (not the course profile page)
$username = "<a href=\"$CFG->wwwroot/user/profile.php?id=$USER->id\">$fullname</a>";
$linktitle = get_string('viewprofile');
$username = "<a href=\"$CFG->wwwroot/user/profile.php?id=$USER->id\" title=\"$linktitle\">$fullname</a>";
if (is_mnet_remote_user($USER) and $idprovider = $DB->get_record('mnet_host', array('id'=>$USER->mnethostid))) {
$username .= " from <a href=\"{$idprovider->wwwroot}\">{$idprovider->name}</a>";
}

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