Permalink
Browse files

Merge branch 'master' of git://github.com/moodle/moodle

  • Loading branch information...
2 parents c00207c + 216f6d8 commit 372a0cf82e0323694f68419f62a5fee2f088b238 @kordan kordan committed Jan 27, 2012
Showing with 8,078 additions and 2,927 deletions.
  1. +3 −1 admin/settings/subsystems.php
  2. +1 −1 backup/util/helper/restore_decode_processor.class.php
  3. +1 −1 backup/util/loggers/file_logger.class.php
  4. +5 −2 blocks/navigation/renderer.php
  5. +1 −1 calendar/lib.php
  6. +26 −0 config-dist.php
  7. +2 −2 course/format/topics/format.php
  8. +1 −1 course/lib.php
  9. +20 −24 enrol/externallib.php
  10. +1 −1 grade/grading/lib.php
  11. +2 −2 install/lang/de/install.php
  12. +2 −1 install/lang/de_du/install.php
  13. +1 −1 install/lang/de_kids/langconfig.php
  14. +1 −2 install/lang/he/install.php
  15. +2 −0 lang/en/admin.php
  16. +1 −0 lang/en/error.php
  17. +2 −2 lang/en/moodle.php
  18. +1 −0 lang/en/question.php
  19. +3,584 −0 lib/csslib.php
  20. +1 −4 lib/enrollib.php
  21. +25 −22 lib/form/dndupload.js
  22. +10 −3 lib/form/filemanager.js
  23. +2 −2 lib/form/filemanager.php
  24. +89 −47 lib/moodlelib.php
  25. +27 −4 lib/navigationlib.php
  26. +1 −1 lib/outputcomponents.php
  27. +1 −1 lib/outputrenderers.php
  28. +1 −1 lib/portfoliolib.php
  29. +2 −2 lib/simpletest/testcompletionlib.php
  30. +706 −0 lib/simpletest/testcsslib.php
  31. +2 −1 lib/simpletest/testfilterconfig.php
  32. +2,149 −2,096 lib/timezone.txt
  33. +2 −6 message/lib.php
  34. +4 −3 mod/forum/lib.php
  35. +9 −9 mod/glossary/lib.php
  36. +4 −0 mod/quiz/locallib.php
  37. +1 −1 mod/quiz/renderer.php
  38. +4 −0 mod/quiz/report/reportlib.php
  39. +13 −0 mod/resource/lang/en/resource.php
  40. +39 −14 mod/resource/lib.php
  41. +69 −3 mod/resource/locallib.php
  42. +21 −0 mod/resource/mod_form.php
  43. +6 −0 mod/resource/settings.php
  44. +4 −0 mod/resource/styles.css
  45. +26 −0 mod/workshop/form/rubric/backup/moodle1/lib.php
  46. +5 −5 question/behaviour/adaptive/simpletest/testwalkthrough.php
  47. +1 −1 question/behaviour/immediatecbm/simpletest/testwalkthrough.php
  48. +3 −3 question/behaviour/interactive/simpletest/testwalkthrough.php
  49. +6 −10 question/editlib.php
  50. +6 −2 question/engine/questionattempt.php
  51. +1 −0 question/engine/questionusage.php
  52. +0 −23 question/engine/simpletest/helpers.php
  53. +3 −1 question/preview.php
  54. +1 −0 question/type/calculated/lang/en/qtype_calculated.php
  55. +28 −8 question/type/calculated/questiontype.php
  56. +37 −0 question/type/calculated/simpletest/helper.php
  57. +20 −0 question/type/calculated/simpletest/testquestion.php
  58. +107 −0 question/type/calculated/simpletest/testquestiontype.php
  59. +5 −1 question/type/match/backup/moodle1/lib.php
  60. +4 −3 question/type/numerical/question.php
  61. +10 −1 question/type/numerical/questiontype.php
  62. +1 −2 question/type/numerical/simpletest/helper.php
  63. +35 −0 question/type/numerical/simpletest/testquestion.php
  64. +16 −1 question/type/numerical/simpletest/testquestiontype.php
  65. +6 −3 question/type/questionbase.php
  66. +3 −17 question/type/questiontypebase.php
  67. +6 −6 question/type/randomsamatch/lang/en/qtype_randomsamatch.php
  68. +10 −0 question/type/shortanswer/questiontype.php
  69. +133 −0 question/type/shortanswer/simpletest/helper.php
  70. +23 −8 question/type/shortanswer/simpletest/testquestion.php
  71. +22 −11 question/type/shortanswer/simpletest/testquestiontype.php
  72. +1 −1 question/type/truefalse/simpletest/testquestiontype.php
  73. +4 −0 question/type/upgrade.txt
  74. +3 −0 repository/draftfiles_ajax.php
  75. +1 −0 theme/afterburner/config.php
  76. +2 −1 theme/afterburner/style/afterburner_dock.css
  77. +3 −0 theme/afterburner/style/afterburner_settings.css
  78. +1 −5 theme/afterburner/style/afterburner_styles.css
  79. +1 −1 theme/formal_white/config.php
  80. +2 −0 theme/formal_white/lang/en/theme_formal_white.php
  81. +12 −10 theme/formal_white/layout/embedded.php
  82. +114 −106 theme/formal_white/layout/frontpage.php
  83. +119 −112 theme/formal_white/layout/general.php
  84. +193 −0 theme/formal_white/layout/report.php
  85. +26 −1 theme/formal_white/lib.php
  86. +9 −0 theme/formal_white/settings.php
  87. +28 −7 theme/formal_white/style/formal_white.css
  88. +2 −2 theme/formal_white/style/frame.css
  89. +3 −1 theme/formal_white/style/quiz.css
  90. +1 −1 theme/formal_white/version.php
  91. +13 −23 theme/magazine/config.php
  92. +3 −4 theme/magazine/style/colors.css
  93. +3 −36 theme/magazine/style/core.css
  94. +4 −17 theme/sky_high/config.php
  95. +43 −34 theme/sky_high/layout/frontpage.php
  96. +53 −45 theme/sky_high/layout/general.php
  97. +35 −14 theme/sky_high/style/core.css
  98. +5 −0 theme/sky_high/style/settings.css
  99. +7 −92 theme/styles.php
  100. +12 −42 theme/styles_debug.php
  101. +1 −1 user/externallib.php
  102. +2 −2 version.php
  103. +5 −1 webservice/rest/locallib.php
@@ -43,4 +43,6 @@
$checkbox->set_affects_modinfo(true);
$optionalsubsystems->add(new admin_setting_configcheckbox('enableplagiarism', new lang_string('enableplagiarism','plagiarism'), new lang_string('configenableplagiarism','plagiarism'), 0));
-}
+
+ $optionalsubsystems->add(new admin_setting_configcheckbox('enablecssoptimiser', new lang_string('enablecssoptimiser','admin'), new lang_string('enablecssoptimiser_desc','admin'), 0));
+}
@@ -63,7 +63,7 @@ public function add_content($content) {
public function add_rule($rule) {
if (!$rule instanceof restore_decode_rule) {
- throw new restore_decode_processor_exception('incorrect_restore_decode_rule', get_class($content));
+ throw new restore_decode_processor_exception('incorrect_restore_decode_rule', get_class($rule));
}
$rule->set_restoreid($this->restoreid);
$rule->set_wwwroots($this->sourcewwwroot, $this->targetwwwroot);
@@ -61,7 +61,7 @@ public function __sleep() {
public function __wakeup() {
if ($this->level > backup::LOG_NONE) { // Only create the file if we are going to log something
if (! $this->fhandle = fopen($this->fullpath, 'a')) {
- throw new base_logger_exception('error_opening_file', $fullpath);
+ throw new base_logger_exception('error_opening_file', $this->fullpath);
}
}
}
@@ -30,12 +30,14 @@ protected function navigation_node($items, $attrs=array(), $expansionlimit=null,
$isexpandable = (empty($expansionlimit) || ($item->type > navigation_node::TYPE_ACTIVITY || $item->type < $expansionlimit) || ($item->contains_active_node() && $item->children->count() > 0));
$isbranch = $isexpandable && ($item->children->count() > 0 || ($item->has_children() && (isloggedin() || $item->type <= navigation_node::TYPE_CATEGORY)));
- $hasicon = ((!$isbranch || $item->type == navigation_node::TYPE_ACTIVITY )&& $item->icon instanceof renderable);
+ $hasicon = ((!$isbranch || $item->type == navigation_node::TYPE_ACTIVITY || $item->type == navigation_node::TYPE_RESOURCE) && $item->icon instanceof renderable);
if ($hasicon) {
$icon = $this->output->render($item->icon);
- $content = $icon.$content; // use CSS for spacing of icons
+ } else {
+ $icon = '';
}
+ $content = $icon.$content; // use CSS for spacing of icons
if ($item->helpbutton !== null) {
$content = trim($item->helpbutton).html_writer::tag('span', $content, array('class'=>'clearhelpbutton'));
}
@@ -57,6 +59,7 @@ protected function navigation_node($items, $attrs=array(), $expansionlimit=null,
} else if ($item->action instanceof action_link) {
//TODO: to be replaced with something else
$link = $item->action;
+ $link->text = $icon.$link->text;
$link->attributes = array_merge($link->attributes, $attributes);
$content = $this->output->render($link);
$linkrendered = true;
View
@@ -1796,7 +1796,7 @@ public function __isset($key) {
* @return stdClass
*/
protected function calculate_context(stdClass $data) {
- global $USER;
+ global $USER, $DB;
$context = null;
if (isset($data->courseid) && $data->courseid > 0) {
View
@@ -385,6 +385,32 @@
//
// $CFG->extramemorylimit = 1G;
//
+// The CSS files the Moodle produces can be extremely large and complex, especially
+// if you are using a custom theme that builds upon several other themes.
+// In Moodle 2.3 a CSS optimiser was added as an experimental feature for advanced
+// users. The CSS optimiser organises the CSS in order to reduce the overall number
+// of rules and styles being sent to the client. It does this by collating the
+// CSS before it is cached removing excess styles and rules and stripping out any
+// extraneous content such as comments and empty rules.
+// The following settings are used to enable and control the optimisation.
+//
+// Enable the CSS optimiser. This will only optimise the CSS if themedesignermode
+// is not enabled. This can be set through the UI however it is noted here as well
+// because the other CSS optimiser settings can not be set through the UI.
+//
+// $CFG->enablecssoptimiser = true;
+//
+// If set the CSS optimiser will add stats about the optimisation to the top of
+// the optimised CSS file. You can then inspect the CSS to see the affect the CSS
+// optimiser is having.
+//
+// $CFG->cssoptimiserstats = true;
+//
+// If set the CSS that is optimised will still retain a minimalistic formatting
+// so that anyone wanting to can still clearly read it.
+//
+// $CFG->cssoptimiserpretty = true;
+//
//=========================================================================
// 8. SETTINGS FOR DEVELOPMENT SERVERS - not intended for production use!!!
//=========================================================================
@@ -189,9 +189,9 @@
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
if ($course->marker == $section) { // Show the "light globe" on/off
- echo '<a href="view.php?id='.$course->id.'&amp;marker=0&amp;sesskey='.sesskey().'#section-'.$section.'" title="'.$strmarkedthistopic.'">'.'<img src="'.$OUTPUT->pix_url('i/marked') . '" alt="'.$strmarkedthistopic.'" /></a><br />';
+ echo '<a href="view.php?id='.$course->id.'&amp;marker=0&amp;sesskey='.sesskey().'#section-'.$section.'" title="'.$strmarkedthistopic.'">'.'<img src="'.$OUTPUT->pix_url('i/marked') . '" alt="'.$strmarkedthistopic.'" class="icon"/></a><br />';
} else {
- echo '<a href="view.php?id='.$course->id.'&amp;marker='.$section.'&amp;sesskey='.sesskey().'#section-'.$section.'" title="'.$strmarkthistopic.'">'.'<img src="'.$OUTPUT->pix_url('i/marker') . '" alt="'.$strmarkthistopic.'" /></a><br />';
+ echo '<a href="view.php?id='.$course->id.'&amp;marker='.$section.'&amp;sesskey='.sesskey().'#section-'.$section.'" title="'.$strmarkthistopic.'">'.'<img src="'.$OUTPUT->pix_url('i/marker') . '" alt="'.$strmarkthistopic.'" class="icon"/></a><br />';
}
if ($thissection->visible) { // Show the hide/show eye
View
@@ -818,7 +818,7 @@ function print_log_ods($course, $user, $date, $order='l.time DESC', $modname,
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
- $myxls->write_string($row, 0, format_string($courses[$log->course], true, array('context' => $context)));
+ $myxls->write_string($row, 0, format_string($courses[$log->course], true, array('context' => $coursecontext)));
$myxls->write_date($row, 1, $log->time);
$myxls->write_string($row, 2, $log->ip);
$fullname = fullname($log, has_capability('moodle/site:viewfullnames', $coursecontext));
View
@@ -172,26 +172,8 @@ public static function get_enrolled_users($courseid, $options) {
}
}
- // to overwrite this parameter, you need role:review capability
- if ($withcapability) {
- require_capability('moodle/role:review', $coursecontext);
- }
- // need accessallgroups capability if you want to overwrite this option
- if (!empty($groupid) && groups_is_member($groupid)) {
- require_capability('moodle/site:accessallgroups', $context);
- }
- // to overwrite this option, you need course:enrolereview permission
- if ($onlyactive) {
- require_capability('moodle/course:enrolreview', $coursecontext);
- }
-
- list($coursectxselect, $coursectxjoin) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');
- $coursesql = "SELECT c.* $coursectxselect
- FROM {course} c $coursectxjoin
- WHERE c.id = $courseid";
- $course = $DB->get_record_sql($coursesql);
- context_instance_preload($course);
- $coursecontext = get_context_instance(CONTEXT_COURSE, $params['courseid']);
+ $course = $DB->get_record('course', array('id'=>$courseid), '*', MUST_EXIST);
+ $coursecontext = get_context_instance(CONTEXT_COURSE, $courseid);
if ($courseid == SITEID) {
$context = get_system_context();
} else {
@@ -206,9 +188,26 @@ public static function get_enrolled_users($courseid, $options) {
throw new moodle_exception(get_string('errorcoursecontextnotvalid' , 'webservice', $exceptionparam));
}
+ if ($courseid == SITEID) {
+ require_capability('moodle/site:viewparticipants', $context);
+ } else {
+ require_capability('moodle/course:viewparticipants', $context);
+ }
+ // to overwrite this parameter, you need role:review capability
+ if ($withcapability) {
+ require_capability('moodle/role:review', $coursecontext);
+ }
+ // need accessallgroups capability if you want to overwrite this option
+ if (!empty($groupid) && groups_is_member($groupid)) {
+ require_capability('moodle/site:accessallgroups', $coursecontext);
+ }
+ // to overwrite this option, you need course:enrolereview permission
+ if ($onlyactive) {
+ require_capability('moodle/course:enrolreview', $coursecontext);
+ }
+
list($enrolledsql, $enrolledparams) = get_enrolled_sql($coursecontext, $withcapability, $groupid, $onlyactive);
list($ctxselect, $ctxjoin) = context_instance_preload_sql('u.id', CONTEXT_USER, 'ctx');
- $records = $DB->get_records_sql($enrolledsql, $enrolledparams);
$sqlparams['courseid'] = $courseid;
$sql = "SELECT u.* $ctxselect
FROM {user} u $ctxjoin
@@ -217,9 +216,6 @@ public static function get_enrolled_users($courseid, $options) {
$enrolledusers = $DB->get_recordset_sql($sql, $enrolledparams);
$users = array();
foreach ($enrolledusers as $user) {
- if (!empty($user->deleted)) {
- continue;
- }
context_instance_preload($user);
if ($userdetails = user_get_user_details($user, $course, $userfields)) {
$users[] = $userdetails;
@@ -461,7 +461,7 @@ public function extend_settings_navigation(settings_navigation $settingsnav, nav
* @return grading_controller
*/
public function get_controller($method) {
- global $CFG;
+ global $CFG, $DB;
$this->ensure_isset(array('context', 'component', 'area'));
@@ -33,7 +33,7 @@
$string['admindirname'] = 'Admin-Verzeichnis';
$string['availablelangs'] = 'Verfügbare Sprachpakete';
$string['chooselanguagehead'] = 'Sprache wählen';
-$string['chooselanguagesub'] = 'Wählen Sie eine Sprache, die Sie während der Installation verwenden wollen. Die ausgewählte Sprache wird nach der Installation als Standardsprache der Instanz benutzt, aber können Sie die Sprache jederzeit ändern.';
+$string['chooselanguagesub'] = 'Wählen Sie eine Sprache, die Sie während der Installation verwenden wollen. Die ausgewählte Sprache wird nach der Installation als Standardsprache der Instanz benutzt, aber Sie dürfen die Sprache jederzeit ändern.';
$string['clialreadyconfigured'] = 'Die Datei config.php existiert bereits. Bitte benutzen Sie admin/cli/install_database.php, wenn sie diese Website installieren möchten.';
$string['clialreadyinstalled'] = 'Die Datei config.php existiert bereits. Bitte benutzen Sie admin/cli/upgrade.php, wenn Sie diese Website aktualisieren möchten.';
$string['cliinstallheader'] = 'Installation von Moodle {$a} über die Kommandozeile';
@@ -45,7 +45,7 @@
$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 einige verbindliche PHP-Extensions. Vor einer Installation oder einer Aktualisierung wird immer eine vollständige Prüfung der Serverausstattung durchgeführt. Bitte fragen Sie den Administrator Ihres Servers, wenn Sie mit der Installation einer neuen Version oder mit der Aktivierung von PHP-Extensions nicht weiterkommen.';
+$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['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.';
@@ -30,7 +30,8 @@
defined('MOODLE_INTERNAL') || die();
-$string['chooselanguagesub'] = 'Wähle eine Sprache, die du während der Installation verwenden möchtest. Nach der Installation kannst du die Sprache für die Oberfläche und die Nutzer/innen festlegen.';
+$string['chooselanguagesub'] = 'Wähle eine Sprache, die du während der Installation verwenden möchtest. Die ausgewählte Sprache wird nach der Installation als Standardsprache der Instanz benutzt, aber du darfst die Sprache jederzeit ändern.';
+$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 frage den Server-Administrator, wenn du mit der Installation einer neuen Version oder mit der Aktivierung von PHP-Extensions nicht weiterkommst.';
$string['memorylimithelp'] = '<p>Die PHP-Einstellung memory_limit für deinen Server ist zur Zeit auf {$a} eingestellt. </p>
<p>Dies wird vermutlich zu Problemen führen, wenn du Moodle mit vielen Aktivitäten oder vielen Nutzer/innen verwendst. </p>
<p>Wir empfehlen die Einstellung zu erhöhen. Empfohlen werden 40M oder mehr. Dies kannst du auf verschiedene Arten machen:</p>
@@ -31,5 +31,5 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'de_du';
-$string['thisdirection'] = '';
+$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Deutsch - Kids';
@@ -92,8 +92,7 @@
(במקרים של גרסת 5.0.x תוכל גם לרדת בגירסה ל- 4.4.x)
</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
-$string['welcomep20'] = 'הינך רואה את עמוד זה מפני שהתקנת והפעלת בהלכה את <strong> $a-packname {$a->packversion}
-</strong>
+$string['welcomep20'] = 'הינך רואה את עמוד זה מפני שהתקנת והפעלת בהלכה את <strong>{$a->packname} {$a->packversion}</strong>
חבילה במחשבך. ברכותינו!';
$string['welcomep30'] = 'גירסת <strong>{$a->installername}</strong> כוללת את היישומים ליצור סביבה אשר בה <strong> Moodle </strong>
יפעל דהיינו:';
View
@@ -466,6 +466,8 @@
$string['enablecourseajax'] = 'Enable AJAX course editing';
$string['enablecourseajax_desc'] = 'Allow AJAX when editing main course pages. Note that the course format and the theme must support AJAX editing and the user has to enable AJAX in their profiles, too.';
$string['enablecourserequests'] = 'Enable course requests';
+$string['enablecssoptimiser'] = 'Enable CSS optimiser';
+$string['enablecssoptimiser_desc'] = 'When enabled CSS will be run through an optimisation process before being cached. The optimiser processes the CSS removing duplicate rules and styles, as well as white space removeable and reformatting. Please note turning this on at the same time as theme designer mode is aweful for performance but will help theme designers create optimised CSS.';
$string['enabledevicedetection'] = 'Enable device detection';
$string['enablegravatar'] = 'Enable Gravatar';
$string['enablegravatar_help'] = 'When enabled Moodle will attempt to fetch a user profile picture from Gravatar if the user has not uploaded an image.';
View
@@ -435,6 +435,7 @@
$string['secretalreadyused'] = 'Change password confirmation link was already used, password was not changed';
$string['sectionnotexist'] = 'This section does not exist';
$string['sendmessage'] = 'Send message';
+$string['serverconnection'] = 'Error connecting to the server';
$string['servicedonotexist'] = 'The service does not exist';
$string['sessionwaiterr'] = 'Timed out while waiting for session lock.<br />Wait for your current requests to finish and try again later.';
$string['sessioncookiesdisable'] = 'Incorrect use of require_key_login() - session cookies must be disabled!';
View
@@ -451,9 +451,9 @@
$string['displayingrecords'] = 'Displaying {$a} records';
$string['displayingusers'] = 'Displaying users {$a->start} to {$a->end}';
$string['displayonpage'] = 'Display on page';
-$string['dndenabled'] = 'You can drag and drop files into this box to upload them';
+$string['dndenabled'] = 'Drag and drop available';
$string['dndenabled_help'] = 'You can drag one or more files from your desktop and drop them onto the box below to upload them.<br />Note: this may not work with other web browsers';
-$string['dndenabled_single'] = 'you can drag and drop a file into this box to upload it';
+$string['dndenabled_insentence'] = 'drag and drop available';
$string['documentation'] = 'Moodle documentation';
$string['down'] = 'Down';
$string['download'] = 'Download';
@@ -99,6 +99,7 @@
$string['deletequestionscheck'] = 'Are you absolutely sure you want to delete the following questions?<br /><br />{$a}';
$string['deletingbehaviour'] = 'Deleting question behaviour \'{$a}\'';
$string['deletingqtype'] = 'Deleting question type \'{$a}\'';
+$string['didnotmatchanyanswer'] = '[Did not match any answer]';
$string['disabled'] = 'Disabled';
$string['disterror'] = 'The distribution {$a} caused problems';
$string['donothing'] = 'Don\'t copy or move files or change links.';
Oops, something went wrong.

0 comments on commit 372a0cf

Please sign in to comment.