Compare commits
89 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d6cf0e56d1 | |||
| 6ee6517142 | |||
| d88aa76c77 | |||
| 3f3e62e4fc | |||
| 7815c64b0c | |||
| a444a47d14 | |||
| 9267c05fb1 | |||
| 172d31e9a5 | |||
| 76523cdfa9 | |||
| 4733c7050b | |||
| 98bb032ead | |||
| 12eeadd914 | |||
| 1504e9b81e | |||
| 7bef8b0693 | |||
| 4120362395 | |||
| 8c35f12a8f | |||
| f81c6fdec8 | |||
| d92b0800d4 | |||
| 413f973528 | |||
| 9ebc70478c | |||
| ec452fbb5c | |||
| d37bb7c46b | |||
| 8f4e115c4f | |||
| d4f9bdbcc1 | |||
| cc1614d05f | |||
| b163efd07f | |||
| 2678d6f078 | |||
| 9d3e4f4340 | |||
| 2045bc333a | |||
| ecfb290941 | |||
| 9ad7551401 | |||
| 07c4ebe443 | |||
| dc3655f55a | |||
| e552a8c7a2 | |||
| 321e82a9a8 | |||
| feb2e0bebd | |||
| bf44038b22 | |||
| 607beb59b0 | |||
| 1f04e7c685 | |||
| f9705ee40a | |||
| 9a866e798c | |||
| ab924a2bdb | |||
| 2cbc50c4f2 | |||
| ef1da08e16 | |||
| 53ae713302 | |||
| 686a1a8add | |||
| 9d613188bf | |||
| 64a011a163 | |||
| 94e882e044 | |||
| e75204b50f | |||
| 6480b0c1ea | |||
| 5b25976c77 | |||
| 80c861c1fe | |||
| 719293b5b0 | |||
| 24593b48cc | |||
| cd48d26b5a | |||
| cd69ae6435 | |||
| 8bcdea8b9f | |||
| 73acf1b228 | |||
| fe1f8f6fbd | |||
| d3a6608388 | |||
| 9f8ac03403 | |||
| 9127f98c56 | |||
| fb8bd4eefe | |||
| 764a377498 | |||
| a4bacca03b | |||
| 0cc5fd542c | |||
| 932572a65f | |||
| 188a3e7f70 | |||
| 24b0c3c86a | |||
| 4c27175d35 | |||
| 1f5c494f76 | |||
| 3b0357ec11 | |||
| 3c3a2e5a9b | |||
| e7bca5e773 | |||
| ea28e5c16f | |||
| f85098f750 | |||
| bf659cf992 | |||
| 3ac5c9214f | |||
| a33bcb1ad4 | |||
| 58bdad73f9 | |||
| 4f3d703a04 | |||
| dfe76fd4aa | |||
| 3a775835f7 | |||
| 858d152f00 | |||
| f507b978cb | |||
| 83174c10ed | |||
| 8b41f763fd | |||
| a5ea6951e4 |
@@ -1145,6 +1145,11 @@
|
||||
<ON_CHECK message="unsupporteddbtablerowformat" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="libcurlwarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
</CUSTOM_CHECKS>
|
||||
</MOODLE>
|
||||
<MOODLE version="2.8" requires="2.2">
|
||||
@@ -1418,6 +1423,11 @@
|
||||
<ON_CHECK message="unsupporteddbtablerowformat" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="libcurlwarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
</CUSTOM_CHECKS>
|
||||
</MOODLE>
|
||||
<MOODLE version="3.0" requires="2.2">
|
||||
@@ -1434,6 +1444,7 @@
|
||||
<VENDOR name="oracle" version="10.2" />
|
||||
</DATABASE>
|
||||
<PHP version="5.4.4" level="required">
|
||||
<RESTRICT function="restrict_php_version_71" message="unsupportedphpversion71" />
|
||||
</PHP>
|
||||
<PCREUNICODE level="optional">
|
||||
<FEEDBACK>
|
||||
@@ -1556,6 +1567,11 @@
|
||||
<ON_CHECK message="unsupporteddbtablerowformat" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="libcurlwarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
</CUSTOM_CHECKS>
|
||||
</MOODLE>
|
||||
<MOODLE version="3.1" requires="2.7">
|
||||
@@ -1572,6 +1588,7 @@
|
||||
<VENDOR name="oracle" version="10.2" />
|
||||
</DATABASE>
|
||||
<PHP version="5.4.4" level="required">
|
||||
<RESTRICT function="restrict_php_version_71" message="unsupportedphpversion71" />
|
||||
</PHP>
|
||||
<PCREUNICODE level="optional">
|
||||
<FEEDBACK>
|
||||
@@ -1647,6 +1664,8 @@
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xml" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xmlreader" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="intl" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="intlrecommended" />
|
||||
@@ -1694,6 +1713,161 @@
|
||||
<ON_CHECK message="unsupporteddbtablerowformat" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="libcurlwarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
</CUSTOM_CHECKS>
|
||||
</MOODLE>
|
||||
<MOODLE version="3.2" requires="2.7">
|
||||
<UNICODE level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unicoderequired" />
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mariadb" version="5.5.31" />
|
||||
<VENDOR name="mysql" version="5.5.31" />
|
||||
<VENDOR name="postgres" version="9.1" />
|
||||
<VENDOR name="mssql" version="10.0" />
|
||||
<VENDOR name="oracle" version="10.2" />
|
||||
</DATABASE>
|
||||
<PHP version="5.6.5" 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="zlib" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="gd" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="gdrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="simplexml" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="simplexmlrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="spl" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="splrequired" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="pcre" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="dom" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xml" level="required">
|
||||
</PHP_EXTENSION>
|
||||
<PHP_EXTENSION name="xmlreader" 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="96M" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="settingmemorylimit" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="file_uploads" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="settingfileuploads" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
<PHP_SETTING name="opcache.enable" value="1" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="opcacherecommended" />
|
||||
</FEEDBACK>
|
||||
</PHP_SETTING>
|
||||
</PHP_SETTINGS>
|
||||
<CUSTOM_CHECKS>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="unsupporteddbstorageengine" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="quizattemptsupgradedmessage" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="slashargumentswarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="unsupporteddbtablerowformat" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="unoconvwarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="libcurlwarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
</CUSTOM_CHECKS>
|
||||
</MOODLE>
|
||||
</COMPATIBILITY_MATRIX>
|
||||
|
||||
@@ -27,9 +27,12 @@ if (isloggedin()) {
|
||||
$primaryadminemail = NULL;
|
||||
$primaryadminname = NULL;
|
||||
}
|
||||
$temp->add(new admin_setting_configtext('supportname', new lang_string('supportname', 'admin'), new lang_string('configsupportname', 'admin'), $primaryadminname, PARAM_NOTAGS));
|
||||
$temp->add(new admin_setting_configtext('supportemail', new lang_string('supportemail', 'admin'), new lang_string('configsupportemail', 'admin'), $primaryadminemail, PARAM_NOTAGS));
|
||||
$temp->add(new admin_setting_configtext('supportpage', new lang_string('supportpage', 'admin'), new lang_string('configsupportpage', 'admin'), '', PARAM_URL));
|
||||
$temp->add(new admin_setting_configtext('supportname', new lang_string('supportname', 'admin'),
|
||||
new lang_string('configsupportname', 'admin'), $primaryadminname, PARAM_NOTAGS));
|
||||
$temp->add(new admin_setting_configtext('supportemail', new lang_string('supportemail', 'admin'),
|
||||
new lang_string('configsupportemail', 'admin'), $primaryadminemail, PARAM_EMAIL));
|
||||
$temp->add(new admin_setting_configtext('supportpage', new lang_string('supportpage', 'admin'),
|
||||
new lang_string('configsupportpage', 'admin'), '', PARAM_URL));
|
||||
$ADMIN->add('server', $temp);
|
||||
|
||||
|
||||
|
||||
@@ -431,7 +431,7 @@ class auth_db_testcase extends advanced_testcase {
|
||||
$user3->username = 'john%#&~%*_doe';
|
||||
$user3->email = ' john@testing.com ';
|
||||
$user3->deleted = 'no';
|
||||
$user3->description = '<b>A description <script>alert(123)</script>about myself.</b>';
|
||||
$user3->description = '<b>A description about myself.</b>';
|
||||
$user3cleaned = $auth->clean_data($user3);
|
||||
|
||||
// Expected results.
|
||||
|
||||
@@ -1478,27 +1478,54 @@ class restore_course_structure_step extends restore_structure_step {
|
||||
*/
|
||||
public function process_course($data) {
|
||||
global $CFG, $DB;
|
||||
$context = context::instance_by_id($this->task->get_contextid());
|
||||
$userid = $this->task->get_userid();
|
||||
$target = $this->get_task()->get_target();
|
||||
$isnewcourse = $target != backup::TARGET_CURRENT_ADDING && $target != backup::TARGET_EXISTING_ADDING;
|
||||
|
||||
// When restoring to a new course we can set all the things except for the ID number.
|
||||
$canchangeidnumber = $isnewcourse || has_capability('moodle/course:changeidnumber', $context, $userid);
|
||||
$canchangeshortname = $isnewcourse || has_capability('moodle/course:changeshortname', $context, $userid);
|
||||
$canchangefullname = $isnewcourse || has_capability('moodle/course:changefullname', $context, $userid);
|
||||
$canchangesummary = $isnewcourse || has_capability('moodle/course:changesummary', $context, $userid);
|
||||
|
||||
$data = (object)$data;
|
||||
$data->id = $this->get_courseid();
|
||||
|
||||
$fullname = $this->get_setting_value('course_fullname');
|
||||
$shortname = $this->get_setting_value('course_shortname');
|
||||
$startdate = $this->get_setting_value('course_startdate');
|
||||
|
||||
// Calculate final course names, to avoid dupes
|
||||
// Calculate final course names, to avoid dupes.
|
||||
list($fullname, $shortname) = restore_dbops::calculate_course_names($this->get_courseid(), $fullname, $shortname);
|
||||
|
||||
// Need to change some fields before updating the course record
|
||||
$data->id = $this->get_courseid();
|
||||
$data->fullname = $fullname;
|
||||
$data->shortname= $shortname;
|
||||
if ($canchangefullname) {
|
||||
$data->fullname = $fullname;
|
||||
} else {
|
||||
unset($data->fullname);
|
||||
}
|
||||
|
||||
if ($canchangeshortname) {
|
||||
$data->shortname = $shortname;
|
||||
} else {
|
||||
unset($data->shortname);
|
||||
}
|
||||
|
||||
if (!$canchangesummary) {
|
||||
unset($data->summary);
|
||||
unset($data->summaryformat);
|
||||
}
|
||||
|
||||
// Only allow the idnumber to be set if the user has permission and the idnumber is not already in use by
|
||||
// another course on this site.
|
||||
$context = context::instance_by_id($this->task->get_contextid());
|
||||
if (!empty($data->idnumber) && has_capability('moodle/course:changeidnumber', $context, $this->task->get_userid()) &&
|
||||
$this->task->is_samesite() && !$DB->record_exists('course', array('idnumber' => $data->idnumber))) {
|
||||
if (!empty($data->idnumber) && $canchangeidnumber && $this->task->is_samesite()
|
||||
&& !$DB->record_exists('course', array('idnumber' => $data->idnumber))) {
|
||||
// Do not reset idnumber.
|
||||
|
||||
} else if (!$isnewcourse) {
|
||||
// Prevent override when restoring as merge.
|
||||
unset($data->idnumber);
|
||||
|
||||
} else {
|
||||
$data->idnumber = '';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,324 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* Course restore tests.
|
||||
*
|
||||
* @package core_course
|
||||
* @copyright 2016 Frédéric Massart - FMCorz.net
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
global $CFG;
|
||||
|
||||
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
|
||||
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
|
||||
|
||||
/**
|
||||
* Course restore testcase.
|
||||
*
|
||||
* @package core_course
|
||||
* @copyright 2016 Frédéric Massart - FMCorz.net
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class core_restore_backup_testcase extends advanced_testcase {
|
||||
|
||||
/**
|
||||
* Backup a course and return its backup ID.
|
||||
*
|
||||
* @param int $courseid The course ID.
|
||||
* @param int $userid The user doing the backup.
|
||||
* @return string
|
||||
*/
|
||||
protected function backup_course($courseid, $userid = 2) {
|
||||
globaL $CFG;
|
||||
$packer = get_file_packer('application/vnd.moodle.backup');
|
||||
|
||||
$bc = new backup_controller(backup::TYPE_1COURSE, $courseid, backup::FORMAT_MOODLE, backup::INTERACTIVE_NO,
|
||||
backup::MODE_GENERAL, $userid);
|
||||
$bc->execute_plan();
|
||||
|
||||
$results = $bc->get_results();
|
||||
$results['backup_destination']->extract_to_pathname($packer, "$CFG->tempdir/backup/core_course_testcase");
|
||||
|
||||
$bc->destroy();
|
||||
unset($bc);
|
||||
return 'core_course_testcase';
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a role with capabilities and permissions.
|
||||
*
|
||||
* @param string|array $caps Capability names.
|
||||
* @param int $perm Constant CAP_* to apply to the capabilities.
|
||||
* @return int The new role ID.
|
||||
*/
|
||||
protected function create_role_with_caps($caps, $perm) {
|
||||
$caps = (array) $caps;
|
||||
$dg = $this->getDataGenerator();
|
||||
$roleid = $dg->create_role();
|
||||
foreach ($caps as $cap) {
|
||||
assign_capability($cap, $perm, $roleid, context_system::instance()->id, true);
|
||||
}
|
||||
accesslib_clear_all_caches_for_unit_testing();
|
||||
return $roleid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore a course.
|
||||
*
|
||||
* @param int $backupid The backup ID.
|
||||
* @param int $courseid The course ID to restore in, or 0.
|
||||
* @param int $userid The ID of the user performing the restore.
|
||||
* @return stdClass The updated course object.
|
||||
*/
|
||||
protected function restore_course($backupid, $courseid, $userid) {
|
||||
global $DB;
|
||||
|
||||
$target = backup::TARGET_CURRENT_ADDING;
|
||||
if (!$courseid) {
|
||||
$target = backup::TARGET_NEW_COURSE;
|
||||
$categoryid = $DB->get_field_sql("SELECT MIN(id) FROM {course_categories}");
|
||||
$courseid = restore_dbops::create_new_course('Tmp', 'tmp', $categoryid);
|
||||
}
|
||||
|
||||
$rc = new restore_controller($backupid, $courseid, backup::INTERACTIVE_NO, backup::MODE_GENERAL, $userid, $target);
|
||||
$target == backup::TARGET_NEW_COURSE ?: $rc->get_plan()->get_setting('overwrite_conf')->set_value(true);
|
||||
$rc->execute_precheck();
|
||||
$rc->execute_plan();
|
||||
|
||||
$course = $DB->get_record('course', array('id' => $rc->get_courseid()));
|
||||
|
||||
$rc->destroy();
|
||||
unset($rc);
|
||||
return $course;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore a course to an existing course.
|
||||
*
|
||||
* @param int $backupid The backup ID.
|
||||
* @param int $courseid The course ID to restore in.
|
||||
* @param int $userid The ID of the user performing the restore.
|
||||
* @return stdClass The updated course object.
|
||||
*/
|
||||
protected function restore_to_existing_course($backupid, $courseid, $userid = 2) {
|
||||
return $this->restore_course($backupid, $courseid, $userid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore a course to a new course.
|
||||
*
|
||||
* @param int $backupid The backup ID.
|
||||
* @param int $userid The ID of the user performing the restore.
|
||||
* @return stdClass The new course object.
|
||||
*/
|
||||
protected function restore_to_new_course($backupid, $userid = 2) {
|
||||
return $this->restore_course($backupid, 0, $userid);
|
||||
}
|
||||
|
||||
public function test_restore_existing_idnumber_in_new_course() {
|
||||
$this->resetAfterTest();
|
||||
|
||||
$dg = $this->getDataGenerator();
|
||||
$c1 = $dg->create_course(['idnumber' => 'ABC']);
|
||||
$backupid = $this->backup_course($c1->id);
|
||||
$c2 = $this->restore_to_new_course($backupid);
|
||||
|
||||
// The ID number is set empty.
|
||||
$this->assertEquals('', $c2->idnumber);
|
||||
}
|
||||
|
||||
public function test_restore_non_existing_idnumber_in_new_course() {
|
||||
global $DB;
|
||||
$this->resetAfterTest();
|
||||
|
||||
$dg = $this->getDataGenerator();
|
||||
$c1 = $dg->create_course(['idnumber' => 'ABC']);
|
||||
$backupid = $this->backup_course($c1->id);
|
||||
|
||||
$c1->idnumber = 'BCD';
|
||||
$DB->update_record('course', $c1);
|
||||
|
||||
// The ID number changed.
|
||||
$c2 = $this->restore_to_new_course($backupid);
|
||||
$this->assertEquals('ABC', $c2->idnumber);
|
||||
}
|
||||
|
||||
public function test_restore_existing_idnumber_in_existing_course() {
|
||||
global $DB;
|
||||
$this->resetAfterTest();
|
||||
|
||||
$dg = $this->getDataGenerator();
|
||||
$c1 = $dg->create_course(['idnumber' => 'ABC']);
|
||||
$c2 = $dg->create_course(['idnumber' => 'DEF']);
|
||||
$backupid = $this->backup_course($c1->id);
|
||||
|
||||
// The ID number does not change.
|
||||
$c2 = $this->restore_to_existing_course($backupid, $c2->id);
|
||||
$this->assertEquals('DEF', $c2->idnumber);
|
||||
|
||||
$c1 = $DB->get_record('course', array('id' => $c1->id));
|
||||
$this->assertEquals('ABC', $c1->idnumber);
|
||||
}
|
||||
|
||||
public function test_restore_non_existing_idnumber_in_existing_course() {
|
||||
global $DB;
|
||||
$this->resetAfterTest();
|
||||
|
||||
$dg = $this->getDataGenerator();
|
||||
$c1 = $dg->create_course(['idnumber' => 'ABC']);
|
||||
$c2 = $dg->create_course(['idnumber' => 'DEF']);
|
||||
$backupid = $this->backup_course($c1->id);
|
||||
|
||||
$c1->idnumber = 'XXX';
|
||||
$DB->update_record('course', $c1);
|
||||
|
||||
// The ID number has changed.
|
||||
$c2 = $this->restore_to_existing_course($backupid, $c2->id);
|
||||
$this->assertEquals('ABC', $c2->idnumber);
|
||||
}
|
||||
|
||||
public function test_restore_idnumber_in_existing_course_without_permissions() {
|
||||
global $DB;
|
||||
$this->resetAfterTest();
|
||||
$dg = $this->getDataGenerator();
|
||||
$u1 = $dg->create_user();
|
||||
|
||||
$managers = get_archetype_roles('manager');
|
||||
$manager = array_shift($managers);
|
||||
$roleid = $this->create_role_with_caps('moodle/course:changeidnumber', CAP_PROHIBIT);
|
||||
$dg->role_assign($manager->id, $u1->id);
|
||||
$dg->role_assign($roleid, $u1->id);
|
||||
|
||||
$c1 = $dg->create_course(['idnumber' => 'ABC']);
|
||||
$c2 = $dg->create_course(['idnumber' => 'DEF']);
|
||||
$backupid = $this->backup_course($c1->id);
|
||||
|
||||
$c1->idnumber = 'XXX';
|
||||
$DB->update_record('course', $c1);
|
||||
|
||||
// The ID number does not change.
|
||||
$c2 = $this->restore_to_existing_course($backupid, $c2->id, $u1->id);
|
||||
$this->assertEquals('DEF', $c2->idnumber);
|
||||
}
|
||||
|
||||
public function test_restore_course_info_in_new_course() {
|
||||
global $DB;
|
||||
$this->resetAfterTest();
|
||||
$dg = $this->getDataGenerator();
|
||||
|
||||
$c1 = $dg->create_course(['shortname' => 'SN', 'fullname' => 'FN', 'summary' => 'DESC', 'summaryformat' => FORMAT_MOODLE]);
|
||||
$backupid = $this->backup_course($c1->id);
|
||||
|
||||
// The information is restored but adapted because names are already taken.
|
||||
$c2 = $this->restore_to_new_course($backupid);
|
||||
$this->assertEquals('SN_1', $c2->shortname);
|
||||
$this->assertEquals('FN copy 1', $c2->fullname);
|
||||
$this->assertEquals('DESC', $c2->summary);
|
||||
$this->assertEquals(FORMAT_MOODLE, $c2->summaryformat);
|
||||
}
|
||||
|
||||
public function test_restore_course_info_in_existing_course() {
|
||||
global $DB;
|
||||
$this->resetAfterTest();
|
||||
$dg = $this->getDataGenerator();
|
||||
|
||||
$c1 = $dg->create_course(['shortname' => 'SN', 'fullname' => 'FN', 'summary' => 'DESC', 'summaryformat' => FORMAT_MOODLE]);
|
||||
$c2 = $dg->create_course(['shortname' => 'A', 'fullname' => 'B', 'summary' => 'C', 'summaryformat' => FORMAT_PLAIN]);
|
||||
$backupid = $this->backup_course($c1->id);
|
||||
|
||||
// The information is restored but adapted because names are already taken.
|
||||
$c2 = $this->restore_to_existing_course($backupid, $c2->id);
|
||||
$this->assertEquals('SN_1', $c2->shortname);
|
||||
$this->assertEquals('FN copy 1', $c2->fullname);
|
||||
$this->assertEquals('DESC', $c2->summary);
|
||||
$this->assertEquals(FORMAT_MOODLE, $c2->summaryformat);
|
||||
}
|
||||
|
||||
public function test_restore_course_shortname_in_existing_course_without_permissions() {
|
||||
global $DB;
|
||||
$this->resetAfterTest();
|
||||
$dg = $this->getDataGenerator();
|
||||
$u1 = $dg->create_user();
|
||||
|
||||
$managers = get_archetype_roles('manager');
|
||||
$manager = array_shift($managers);
|
||||
$roleid = $this->create_role_with_caps('moodle/course:changeshortname', CAP_PROHIBIT);
|
||||
$dg->role_assign($manager->id, $u1->id);
|
||||
$dg->role_assign($roleid, $u1->id);
|
||||
|
||||
$c1 = $dg->create_course(['shortname' => 'SN', 'fullname' => 'FN', 'summary' => 'DESC', 'summaryformat' => FORMAT_MOODLE]);
|
||||
$c2 = $dg->create_course(['shortname' => 'A1', 'fullname' => 'B1', 'summary' => 'C1', 'summaryformat' => FORMAT_PLAIN]);
|
||||
|
||||
// The shortname does not change.
|
||||
$backupid = $this->backup_course($c1->id);
|
||||
$restored = $this->restore_to_existing_course($backupid, $c2->id, $u1->id);
|
||||
$this->assertEquals($c2->shortname, $restored->shortname);
|
||||
$this->assertEquals('FN copy 1', $restored->fullname);
|
||||
$this->assertEquals('DESC', $restored->summary);
|
||||
$this->assertEquals(FORMAT_MOODLE, $restored->summaryformat);
|
||||
}
|
||||
|
||||
public function test_restore_course_fullname_in_existing_course_without_permissions() {
|
||||
global $DB;
|
||||
$this->resetAfterTest();
|
||||
$dg = $this->getDataGenerator();
|
||||
$u1 = $dg->create_user();
|
||||
|
||||
$managers = get_archetype_roles('manager');
|
||||
$manager = array_shift($managers);
|
||||
$roleid = $this->create_role_with_caps('moodle/course:changefullname', CAP_PROHIBIT);
|
||||
$dg->role_assign($manager->id, $u1->id);
|
||||
$dg->role_assign($roleid, $u1->id);
|
||||
|
||||
$c1 = $dg->create_course(['shortname' => 'SN', 'fullname' => 'FN', 'summary' => 'DESC', 'summaryformat' => FORMAT_MOODLE]);
|
||||
$c2 = $dg->create_course(['shortname' => 'A1', 'fullname' => 'B1', 'summary' => 'C1', 'summaryformat' => FORMAT_PLAIN]);
|
||||
|
||||
// The fullname does not change.
|
||||
$backupid = $this->backup_course($c1->id);
|
||||
$restored = $this->restore_to_existing_course($backupid, $c2->id, $u1->id);
|
||||
$this->assertEquals('SN_1', $restored->shortname);
|
||||
$this->assertEquals($c2->fullname, $restored->fullname);
|
||||
$this->assertEquals('DESC', $restored->summary);
|
||||
$this->assertEquals(FORMAT_MOODLE, $restored->summaryformat);
|
||||
}
|
||||
|
||||
public function test_restore_course_summary_in_existing_course_without_permissions() {
|
||||
global $DB;
|
||||
$this->resetAfterTest();
|
||||
$dg = $this->getDataGenerator();
|
||||
$u1 = $dg->create_user();
|
||||
|
||||
$managers = get_archetype_roles('manager');
|
||||
$manager = array_shift($managers);
|
||||
$roleid = $this->create_role_with_caps('moodle/course:changesummary', CAP_PROHIBIT);
|
||||
$dg->role_assign($manager->id, $u1->id);
|
||||
$dg->role_assign($roleid, $u1->id);
|
||||
|
||||
$c1 = $dg->create_course(['shortname' => 'SN', 'fullname' => 'FN', 'summary' => 'DESC', 'summaryformat' => FORMAT_MOODLE]);
|
||||
$c2 = $dg->create_course(['shortname' => 'A1', 'fullname' => 'B1', 'summary' => 'C1', 'summaryformat' => FORMAT_PLAIN]);
|
||||
|
||||
// The summary and format do not change.
|
||||
$backupid = $this->backup_course($c1->id);
|
||||
$restored = $this->restore_to_existing_course($backupid, $c2->id, $u1->id);
|
||||
$this->assertEquals('SN_1', $restored->shortname);
|
||||
$this->assertEquals('FN copy 1', $restored->fullname);
|
||||
$this->assertEquals($c2->summary, $restored->summary);
|
||||
$this->assertEquals($c2->summaryformat, $restored->summaryformat);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thislanguage'] = 'Breizh';
|
||||
@@ -32,20 +32,21 @@ defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotcreatedboninstall'] = '<p>No és pot crear la base de dades.</p> <p>La base de dades especificada no existeix i l\'usuari que heu proporcionat no té permís per a crear-la.</p>
|
||||
<p>L\'administrador del lloc hauria de verificar la configuració de la base de dades.</p>';
|
||||
$string['cannotcreatelangdir'] = 'No s\'ha pogut crear el directori d\'idiomes.';
|
||||
$string['cannotcreatelangdir'] = 'No s\'ha pogut crear el directori d\'idiomes';
|
||||
$string['cannotcreatetempdir'] = 'No s\'ha pogut crear el directori temporal';
|
||||
$string['cannotdownloadcomponents'] = 'No s\'han pogut baixar components';
|
||||
$string['cannotdownloadzipfile'] = 'No s\'ha pogut baixar el fitxer zip';
|
||||
$string['cannotdownloadzipfile'] = 'No s\'ha pogut baixar el fitxer ZIP';
|
||||
$string['cannotfindcomponent'] = 'No s\'ha pogut trobar el component';
|
||||
$string['cannotsavemd5file'] = 'No s\'ha pogut desar el fitxer md5';
|
||||
$string['cannotsavezipfile'] = 'No s\'ha pogut desar el fitxer zip';
|
||||
$string['cannotsavezipfile'] = 'No s\'ha pogut desar el fitxer ZIP';
|
||||
$string['cannotunzipfile'] = 'No s\'ha pogut descomprimir el fitxer';
|
||||
$string['componentisuptodate'] = 'El component està al dia';
|
||||
$string['componentisuptodate'] = 'El component està actualitzat';
|
||||
$string['dmlexceptiononinstall'] = '<p>S\'ha produït un error de la base de dades [{$a->errorcode}].<br />{$a->debuginfo}</p>';
|
||||
$string['downloadedfilecheckfailed'] = 'Ha fallat la comprovació del fitxer baixat';
|
||||
$string['invalidmd5'] = 'L\'md5 no és vàlid. Torneu-ho a provar';
|
||||
$string['missingrequiredfield'] = 'Falta algun camp necessari';
|
||||
$string['remotedownloaderror'] = 'No s\'ha pogut baixar el component al vostre servidor. Verifiqueu els paràmetres de servidor intermediari. Es recomana l\'extensió cURL.<br /><br />Haureu de baixar manualment el fitxer <a href="{$a->url}">{$a->url}</a>, copiar-lo a la ubicació "{$a->dest}" del vostre servidor i descomprimir-lo allí.';
|
||||
$string['remotedownloaderror'] = '<p>No s\'ha pogut baixar el component al vostre servidor. Verifiqueu els paràmetres del servidor intermediari. Es recomana vivament l\'extensió cURL de PHP.</p>
|
||||
<p>Haureu de baixar manualment el fitxer <a href="{$a->url}">{$a->url}</a>, copiar-lo a la ubicació «{$a->dest}» del vostre servidor i descomprimir-lo allí.</p>';
|
||||
$string['wrongdestpath'] = 'El camí de destinació és erroni';
|
||||
$string['wrongsourcebase'] = 'L\'adreça (URL) base de la font és errònia';
|
||||
$string['wrongzipfilename'] = 'El nom del fitxer ZIP és erroni';
|
||||
|
||||
+10
-10
@@ -34,8 +34,8 @@ $string['admindirname'] = 'Directori d\'administració';
|
||||
$string['availablelangs'] = 'Llista d\'idiomes disponibles';
|
||||
$string['chooselanguagehead'] = 'Trieu un idioma';
|
||||
$string['chooselanguagesub'] = 'Trieu un idioma per a la instal·lació. S\'utilitzarà també com a idioma per defecte del lloc, tot i que després podeu canviar-lo.';
|
||||
$string['clialreadyconfigured'] = 'El fitxer config.php ja existeix, feu servir dmin/cli/install_database.php si voleu instal·lar aquest lloc web.';
|
||||
$string['clialreadyinstalled'] = 'El fitxer config.php ja existeix, feu servir admin/cli/upgrade.php si voleu actualitzar aquest lloc web.';
|
||||
$string['clialreadyconfigured'] = 'El fitxer config.php ja existeix, feu servir admin/cli/install_database.php si voleu instal·lar el Moodle en aquest lloc web.';
|
||||
$string['clialreadyinstalled'] = 'El fitxer de configuració config.php ja existeix. Feu servir admin/cli/upgrade.php si voleu actualitzar Moodle per a aquest lloc web.';
|
||||
$string['cliinstallheader'] = 'Programa d\'instal·lació de línia d\'ordres de Moodle {$a}';
|
||||
$string['databasehost'] = 'Servidor de base de dades:';
|
||||
$string['databasename'] = 'Nom de la base de dades:';
|
||||
@@ -67,14 +67,14 @@ $string['pathserrcreatedataroot'] = 'L\'instal·lador no pot crear el directori
|
||||
$string['pathshead'] = 'Confirmeu els camins';
|
||||
$string['pathsrodataroot'] = 'No es pot escriure en el directori dataroot.';
|
||||
$string['pathsroparentdataroot'] = 'No es pot escriure en el directori pare ({$a->parent}). L\'instal·lador no pot crear el directori ({$a->dataroot}).';
|
||||
$string['pathssubadmindir'] = 'Alguns serveis d\'allotjament web (pocs) utilitzen un URL especial /admin p. ex. per a accedir a un tauler de control o quelcom semblant. Malauradament això entra en conflicte amb la ubicació estàndard de les pàgines d\'administració de Moodle. Podeu arreglar aquest problema canviant el nom del directori d\'administració de Moodle en la vostra instal·lació i posant el nou nom aquí. Per exemple <em>moodleadmin</em>. Això modificarà els enllaços d\'administració de Moodle.';
|
||||
$string['pathssubdataroot'] = 'Necessiteu un espai on Moodle pugui desar els fitxers penjats. Aquest directori hauria de tenir permisos de lectura I ESCRIPTURA per a l\'usuari del servidor web (normalment \'nobody\' o \'apache\'), però no cal que sigui accessible directament via web. L\'instal·lador provarà de crear-lo si no existeix.';
|
||||
$string['pathssubadmindir'] = 'Alguns serveis d\'allotjament web (pocs) utilitzen /admin com a URL especial perquè accediu a un tauler de control o quelcom semblant. Malauradament, això entra en conflicte amb la ubicació estàndard de les pàgines d\'administració de Moodle. Podeu arreglar aquest problema canviant el nom del directori d\'administració de Moodle en la vostra instal·lació i posant el nou nom aquí. Per exemple: <em>moodleadmin</em>. Això arreglarà els enllaços d\'administració de Moodle.';
|
||||
$string['pathssubdataroot'] = '<p>Directori on el Moodle emmagatzemarà els materials pujats pels usuaris.</p>
|
||||
<p>Aquest directori hauria de tenir permisos de lectura i escriptura per a l\'usuari del servidor web (normalment \'www-data\', \'nobody\', or \'apache\').</p>
|
||||
<p>No ha de ser accessible directament via web.</p>
|
||||
<p>L\'instal·lador provarà de crear-lo si no existeix.</p>';
|
||||
$string['pathssubdirroot'] = 'Camí complet del directori d\'instal·lació de Moodle.';
|
||||
$string['pathssubwwwroot'] = 'L\'adreça web completa on s\'accedirà a Moodle.
|
||||
No és possible accedir a Moodle en diferents adreces.
|
||||
Si el vostre lloc té múltiples adreces públiques haureu de configurar redireccions permanents per a totes excepte aquesta.
|
||||
Si el vostre lloc és accessible tant des d\'Internet com des d\'una intranet, utilitzeu aquí l\'adreça pública i configureu el DNS de manera que els usuaris de la intranet puguin utilitzar també l\'adreça pública.
|
||||
Si l\'adreça no és correcta, canvieu l\'URL en el vostre navegador per reiniciar la instal·lació amb un altre valor.';
|
||||
$string['pathssubwwwroot'] = '<p>L\'adreça web completa on s\'accedirà a Moodle; per exemple, l\'adreça que els usuaris introduiran a la barra d\'adreces del navegador per accedir a Moodle.</p> <p> No és possible accedir a Moodle utilitzant diferents adreces. Si el vostre lloc és accessible a través de diferents adreces, trieu-ne la més fàcil i configureu una redirecció permanent per a cadascuna de les altres adreces.</p> <p>
|
||||
Si el vostre lloc és accessible tant des d\'Internet com des d\'una xarxa interna (anomenada de vegades intranet), utilitzeu l\'adreça pública aquí.</p> <p>Si l\'adreça actual no és correcta, canvieu l\'URL a la barra d\'adreces del navegador i reinicieu la instal·lació.';
|
||||
$string['pathsunsecuredataroot'] = 'La ubicació del dataroot no és segura.';
|
||||
$string['pathswrongadmindir'] = 'No existeix el directori d\'administració';
|
||||
$string['phpextension'] = 'Extensió PHP {$a}';
|
||||
@@ -84,7 +84,7 @@ $string['phpversionhelp'] = '<p>Moodle necessita una versió de PHP 4.3.0 o 5.1.
|
||||
<p>Us cal actualitzar el PHP o traslladar Moodle a un ordinador amb una versió de PHP més recent.<br />(Si esteu utilitzant la versió 5.0.x, alternativament també podríeu tornar enrere a la 4.4.x)</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Esteu veient aquesta pàgina perquè heu instal·lat amb èxit i heu executat el paquet <strong>{$a->packname} {$a->packversion}</strong>. Felicitacions.';
|
||||
$string['welcomep30'] = 'Aquesta versió de <strong>{$a->installername}</strong> inclou les aplicacions necessàries per crear un entorn en el qual funcioni <strong>Moodle</strong>:';
|
||||
$string['welcomep30'] = 'Aquesta versió de <strong>{$a->installername}</strong> inclou les aplicacions necessàries per crear un entorn en el qual funcioni <strong>Moodle</strong>, concretament:';
|
||||
$string['welcomep40'] = 'El paquet inclou també <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'L\'ús de totes les aplicacions d\'aquest paquet és governat per les seves llicències respectives. El paquet <strong>{$a->installername}</strong> complet és
|
||||
<a href="http://www.opensource.org/docs/definition_plain.html">codi font obert</a> i es distribueix
|
||||
|
||||
@@ -30,5 +30,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = '';
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thislanguage'] = 'Català';
|
||||
|
||||
@@ -69,9 +69,15 @@ $string['pathshead'] = 'Potvrdit cesty';
|
||||
$string['pathsrodataroot'] = 'Do datového adresáře nelze zapisovat.';
|
||||
$string['pathsroparentdataroot'] = 'Do nadřazeného adresáře ({$a->parent}) nelze zapisovat. Datový adresář ({$a->dataroot}) nemůže být tímto průvodcem instalací vytvořen.';
|
||||
$string['pathssubadmindir'] = 'Na některých serverech je URL adresa /admin vyhrazena pro speciální účely (např. pro ovládací panel). Na takových serverech může dojít ke kolizi se standardním umístěním stránek pro správu Moodle. Máte-li tento problém, přejmenujte adresář <eM>admin</em> ve vaší instalaci Moodle a sem zadejte jeho nový název - například <em>moodleadmin</em>. Všechny generované odkazy na stránky správy Moodle budou používat tento nový název.';
|
||||
$string['pathssubdataroot'] = 'Moodle potřebuje prostor, kam si bude ukládat nahrané soubory a další údaje. K tomuto adresáři musí mít proces webového serveru právo ke čtení i k zápisu (webový server bývá většinou spouštěn pod uživatelem "www-data" nebo "apache"). Tento adresář ale zároveň nesmí být dostupný přímo přes webové rozhraní. Instalační skript se pokusí tento adresář vytvořit, pokud nebude existovat.';
|
||||
$string['pathssubdataroot'] = '<p>Moodle potřebuje prostor, kam si bude ukládat nahrané soubory a další údaje. .</p>
|
||||
<p>K tomuto adresáři musí mít proces webového serveru právo ke čtení i k zápisu (webový server bývá většinou spouštěn pod uživatelem "www-data" nebo "apache"). .</p>
|
||||
<p>Tento adresář ale zároveň nesmí být dostupný přímo přes webové rozhraní. .</p>
|
||||
<p>Instalační skript se pokusí tento adresář vytvořit, pokud nebude existovat..</p>';
|
||||
$string['pathssubdirroot'] = 'Absolutní cesta k adresáři s instalací Moodle';
|
||||
$string['pathssubwwwroot'] = 'Zadejte úplnou webovou adresu, na níž bude Moodle dostupný. Moodle potřebuje jedinečnou adresu, není možné jej provozovat na několika URL současně. Používáte-li několik veřejných domén, musíte si sami nastavit permanentní přesměrování na jednu z nich a tu pak použít. Pokud je váš server dostupný z vnější a z vnitřní sítě pod různými IP adresami, použijte jeho veřejnou adresu a nastavte si váš DNS server tak, že ji mohou používat i uživatelé z vnitřní sítě.';
|
||||
$string['pathssubwwwroot'] = '<p>Zadejte úplnou webovou adresu, na níž bude Moodle dostupný, t.j. adresa, kterou zadají uživatelé do adresního řádku svého prohlížeče, aby spustili Moodle.</p>
|
||||
<p>Moodle potřebuje jedinečnou adresu, není možné jej provozovat na několika URL současně. Používáte-li několik veřejných domén, musíte si sami nastavit permanentní přesměrování na jednu z nich a tu pak použít.</p>
|
||||
<p> Pokud je váš server dostupný z vnější a z vnitřní sítě pod různými IP adresami, použijte jeho veřejnou adresu a nastavte si váš DNS server tak, že ji mohou používat i uživatelé z vnitřní sítě.</p>
|
||||
<p>Pokud aktuální adresa není správná, změňte URL adresu v adresním řádku prohlížeče a spusťte instalaci.</p>';
|
||||
$string['pathsunsecuredataroot'] = 'Umístění datového adresáře není bezpečné';
|
||||
$string['pathswrongadmindir'] = 'Adresář pro správu serveru (admin) neexistuje';
|
||||
$string['phpextension'] = '{$a} PHP rozšíření';
|
||||
@@ -82,7 +88,7 @@ $string['phpversionhelp'] = '<p>Moodle vyžaduje PHP alespoň verze 4.3.0 nebo 5
|
||||
(U PHP 5.0.x můžete také přejít na nižší verzi 4.4.x )</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Podařilo se vám úspěšně nainstalovat a spustit balíček <strong>{$a->packname} {$a->packversion}</strong>. Gratulujeme!';
|
||||
$string['welcomep30'] = '<strong>{$a->installername}</strong> obsahuje aplikace k vytvoření prostředí, ve kterém bude provozován váš <strong>Moodle</strong>. Jmenovitě se jedná o:';
|
||||
$string['welcomep30'] = 'Tato verze <strong>{$a->installername}</strong> obsahuje aplikace k vytvoření prostředí, ve kterém bude provozován váš <strong>Moodle</strong>. Jmenovitě se jedná o:';
|
||||
$string['welcomep40'] = 'Balíček rovněž obsahuje <strong>Moodle ve verzi {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'Použití všech aplikací v tomto balíčku je vázáno jejich příslušnými licencemi. Kompletní balíček <strong>{$a->installername}</strong> je software s <a href="http://www.opensource.org/docs/definition_plain.html"> otevřeným kódem (open source)</a> a je šířen pod licencí <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
|
||||
$string['welcomep60'] = 'Následující stránky vás v několik jednoduchých krocích nastavením <strong>Moodlu</strong> na vašem počítači. Můžete přijmout výchozí nastavení, nebo si je upravit podle svých potřeb.';
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotcreatedboninstall'] = '<p>Kan ikke oprette databasen.</p> <p>Den specificerede database eksisterer ikke og brugeren har ikke tilladelse til at oprette den.</p> <p>Administrator bør verificere databasekonfigurationen.</p>';
|
||||
$string['cannotcreatelangdir'] = 'Kan ikke oprette sprogmappe';
|
||||
$string['cannotcreatetempdir'] = 'Kan ikke oprette temp-mappe';
|
||||
$string['cannotdownloadcomponents'] = 'Kan ikke downloade komponenter';
|
||||
@@ -39,9 +40,11 @@ $string['cannotsavemd5file'] = 'Kan ikke gemme md5-fil';
|
||||
$string['cannotsavezipfile'] = 'Kan ikke gemme zip-fil';
|
||||
$string['cannotunzipfile'] = 'Kan ikke pakke filen ud';
|
||||
$string['componentisuptodate'] = 'Komponenten er ajour';
|
||||
$string['dmlexceptiononinstall'] = '<p>En databasefejl er opstået [{$a->errorcode}].<br />{$a->debuginfo}</p>';
|
||||
$string['downloadedfilecheckfailed'] = 'Downloadet fil-tjek fejlede';
|
||||
$string['invalidmd5'] = 'Tjekvariablen var forkert - prøv igen';
|
||||
$string['missingrequiredfield'] = 'Der mangler nogle obligatoriske felter';
|
||||
$string['remotedownloaderror'] = '<p>Download af komponent til din server fejlede. Verificer venligst proxy-indstillilngerne; udvidelsen PHP cURL anbefales kraftigt. </p> <p>Du må downloade filen <a href="{$a->url}">{$a->url}</a> manuelt, kopier den til "{$a->dest}" på din server og udpakke den der.</p>';
|
||||
$string['wrongdestpath'] = 'Forkert destinationssti';
|
||||
$string['wrongsourcebase'] = 'Forkert kilde-URL';
|
||||
$string['wrongzipfilename'] = 'Forkert zip-filnavn';
|
||||
|
||||
@@ -34,13 +34,15 @@ $string['admindirname'] = 'Admin-mappe';
|
||||
$string['availablelangs'] = 'Tilgængelige sprogpakker';
|
||||
$string['chooselanguagehead'] = 'Vælg et sprog';
|
||||
$string['chooselanguagesub'] = 'Vælg et sprog til brug under installationen. Dette sprog vil også blive brugt som standardsprog på webstedet, men det kan altid ændres til et andet sprog.';
|
||||
$string['clialreadyconfigured'] = 'Konfigurationsfilen config.php eksisterer allerede. Benyt venigst admin/cli/install_database.php til at installere Moodle for dette site.';
|
||||
$string['clialreadyinstalled'] = 'Filen config.php eksisterer allerede, brug venligst admin/cli/upgrade.php hvis du ønsker at opgradere dette websted.';
|
||||
$string['cliinstallheader'] = 'Moodle {$a} kommandolinje-installationsprogram';
|
||||
$string['databasehost'] = 'Databasevært';
|
||||
$string['databasename'] = 'Databasenavn';
|
||||
$string['databasetypehead'] = 'Vælg databasedriver';
|
||||
$string['dataroot'] = 'Datamappe';
|
||||
$string['dbprefix'] = 'Præfix for tabeller';
|
||||
$string['datarootpermission'] = 'Rettighed til datamapper';
|
||||
$string['dbprefix'] = 'Præfiks for tabeller';
|
||||
$string['dirroot'] = 'Moodle-mappe';
|
||||
$string['environmenthead'] = 'Kontrollerer din serveropsætning...';
|
||||
$string['environmentsub2'] = 'Hver version af Moodle har nogle minimumskrav til PHP-version og nogle obligatoriske PHP-extensions.
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = 'da';
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thislanguage'] = 'Dansk Rum';
|
||||
@@ -90,7 +90,7 @@ $string['phpversionhelp'] = '<p>Moodle requiere al menos una versión de PHP 4.3
|
||||
<p>¡Debe actualizar PHP o trasladarse a otro servidor con una versión más reciente de PHP!<br />
|
||||
(En caso de 5.0.x podría también revertir a la versión 4.4.x)</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Si está viendo esta página es porque ha podido ejecutar el paquete <strong>{$a->packname} {$a->packversion}</strong> en su computadora. !Enhorabuena!';
|
||||
$string['welcomep20'] = 'Si está viendo esta página es porque ha podido instalar y ejecutar exitosamente el paquete <strong>{$a->packname} {$a->packversion}</strong> en su computadora. !Enhorabuena!';
|
||||
$string['welcomep30'] = 'Esta versión de <strong>{$a->installername}</strong> incluye las aplicaciones necesarias para que <strong>Moodle</strong> funcione en su computadora, principalmente:';
|
||||
$string['welcomep40'] = 'El paquete también incluye <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'El uso de todas las aplicaciones del paquete está gobernado por sus respectivas
|
||||
|
||||
@@ -30,4 +30,5 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotfindcomponent'] = 'کامپوننت پیدا نشد';
|
||||
$string['missingrequiredfield'] = 'بعضی از فیلدهای ضروری خالی است';
|
||||
|
||||
@@ -34,6 +34,8 @@ $string['admindirname'] = 'دایرکتوری مدیر';
|
||||
$string['availablelangs'] = 'بستههای زبانی موجود';
|
||||
$string['chooselanguagehead'] = 'انتخاب زبان';
|
||||
$string['chooselanguagesub'] = 'لطفاً زبانی را به جهت استفاده در حین نصب انتخاب نمائید. زبان سایت و کاربر را در صفحهای دیگر میتوانید انتخاب کنید.';
|
||||
$string['databasehost'] = 'میزبان پایگاه داده';
|
||||
$string['databasename'] = 'نام پایگاه داده';
|
||||
$string['dataroot'] = 'دایرکتوری داده';
|
||||
$string['dbprefix'] = 'پیشوند جدولها';
|
||||
$string['dirroot'] = 'دایرکتوری مودل';
|
||||
|
||||
@@ -40,5 +40,5 @@ $string['cliunknowoption'] = 'Options non reconnues :
|
||||
{$a}.
|
||||
Utilisez l\'option --help.';
|
||||
$string['cliyesnoprompt'] = 'Tapez y (pour oui) ou n (pour non)';
|
||||
$string['environmentrequireinstall'] = 'doit être installé et activé';
|
||||
$string['environmentrequireversion'] = 'la version {$a->needed} est requise ; vous utilisez actuellement la version {$a->current}';
|
||||
$string['environmentrequireinstall'] = 'L\'extension doit être installée et activée';
|
||||
$string['environmentrequireversion'] = 'La version {$a->needed} est requise ; vous utilisez actuellement la version {$a->current}';
|
||||
|
||||
@@ -41,5 +41,5 @@ $string['cliunknowoption'] = 'אפשרויות לא מוכרות :
|
||||
{$a}
|
||||
אנא השתמש באפשרות העזרה.';
|
||||
$string['cliyesnoprompt'] = 'רשום y (שפרושו כן) או n (שפרושו לא)';
|
||||
$string['environmentrequireinstall'] = 'נדרש להתקין/לאפשר זאת';
|
||||
$string['environmentrequireversion'] = 'גירסת {$a->needed} נדרשת ואתה מריץ {$a->current}';
|
||||
$string['environmentrequireinstall'] = 'נדרש להתקין ולאפשר הרחבה זו';
|
||||
$string['environmentrequireversion'] = 'גירסה {$a->needed} נדרשת אך הגירסה הנוכחית היא {$a->current}';
|
||||
|
||||
@@ -86,10 +86,10 @@ $string['pathsunsecuredataroot'] = 'ספריית המידע (Data Directory) ל
|
||||
$string['pathswrongadmindir'] = 'ספריית ה-admin לא קיימת';
|
||||
$string['phpextension'] = 'הרחבת PHP {$a}';
|
||||
$string['phpversion'] = 'גירסת PHP';
|
||||
$string['phpversionhelp'] = '<p>גרסת PHP חייבת להיות לפחות 4.3.0 או 5.1.0 (בגרסאות 5.0.x קיימות מספר בעיות ידועות) </p>
|
||||
$string['phpversionhelp'] = '<p>גרסת PHP חייבת להיות לפחות 4.3.0 או 5.1.0 (בגרסאות 5.0 קיימות מספר בעיות ידועות) </p>
|
||||
<p> במערכת שלך פועלת כרגע גרסת {$a} </p>
|
||||
<p> אתה חייב לשדרג את גרסת ה-PHP שלך או לעבור למחשב מארח עם עם גירסת PHP חדשה! <br/>
|
||||
(במקרים של גרסת 5.0.x תוכל גם לרדת בגרסה ל- 4.4.x)
|
||||
(במקרים של גרסת 5.0 תוכל גם לרדת בגרסה ל- 4.4)
|
||||
</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'הינך רואה את עמוד זה מפני שהתקנת והפעלת בהלכה את <strong>{$a->packname} {$a->packversion}</strong>
|
||||
|
||||
@@ -33,4 +33,4 @@ defined('MOODLE_INTERNAL') || die();
|
||||
$string['language'] = 'שפת ממשק';
|
||||
$string['next'] = 'הבא';
|
||||
$string['previous'] = 'קודם';
|
||||
$string['reload'] = 'טען מחדש';
|
||||
$string['reload'] = 'טעינה מחדש';
|
||||
|
||||
@@ -32,5 +32,8 @@ defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['clianswerno'] = 'ոչ';
|
||||
$string['cliansweryes'] = 'այո';
|
||||
$string['cliincorrectvalueerror'] = 'Սխալ, "{$a->value}"-ը ոչ ճիշտ արժեք է "{$a->option}"-ի համար';
|
||||
$string['cliincorrectvalueretry'] = 'Ոչ ճիշտ արժեք, կրկին փորձեք';
|
||||
$string['cliyesnoprompt'] = 'Մեքենագրեք y (նշանակում է այո) կամ n (նշանակում է ոչ):';
|
||||
$string['environmentrequireinstall'] = 'անհրաժեշտ է, որպեսզի տեղակայված և թույլատրված լինի';
|
||||
$string['environmentrequireversion'] = 'պահանջվում է {$a->needed} տարբերակը, դուք գործարկում եք՝ {$a->current}';
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['thislanguage'] = 'Taqbaylit';
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['thislanguage'] = 'Malagasy';
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = '';
|
||||
$string['thislanguage'] = 'Crnogorski';
|
||||
@@ -33,3 +33,4 @@ defined('MOODLE_INTERNAL') || die();
|
||||
$string['language'] = 'Јазик';
|
||||
$string['next'] = 'Следно';
|
||||
$string['previous'] = 'Претходно';
|
||||
$string['reload'] = 'Вчитај повторно';
|
||||
|
||||
@@ -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['paths'] = 'ठेगानाहरु';
|
||||
@@ -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'] = 'अर्को';
|
||||
@@ -88,6 +88,6 @@ $string['welcomep30'] = 'Deze uitgave van <strong>{$a->installername}</strong> b
|
||||
$string['welcomep40'] = 'Dit pakket bevat ook <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'Het gebruik van alle programma\'s in dit pakket wordt geregeld door hun respectievelijke licenties. Het complete <strong>{$a->installername}</strong> pakket is
|
||||
<a href="http://www.opensource.org/docs/definition_plain.html">open source</a> en wordt verdeeld onder de <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> licentie.';
|
||||
$string['welcomep60'] = 'De volgende pagina\'s leiden je door een aantal makkelijk te volgen stappen om <strong>Moodle</strong> te installeren op je computer. Je kunt de standaardinstellingen overnemen of, optionneel, ze aanpassen aan je noden.';
|
||||
$string['welcomep60'] = 'De volgende pagina\'s leiden je door een aantal makkelijk te volgen stappen om <strong>Moodle</strong> te installeren op je computer. Je kunt de standaardinstellingen overnemen of, optioneel, ze aanpassen aan je noden.';
|
||||
$string['welcomep70'] = 'Klik op de "volgende"-knop om verder te gaan met de installatie van <strong>Moodle</strong>';
|
||||
$string['wwwroot'] = 'Web adres';
|
||||
|
||||
@@ -66,7 +66,9 @@ $string['pathshead'] = 'Bekreft stier';
|
||||
$string['pathsrodataroot'] = 'Dataroot katalog er ikke skrivbar.';
|
||||
$string['pathsroparentdataroot'] = 'Overordnet katalog ({$a->parent}) er ikke skrivbar. Datakatalogen ({$a->dataroot}) kan ikke opprettes av installasjonsprogrammet.';
|
||||
$string['pathssubadmindir'] = 'Noen ganske få webhoteller bruker /admin som en egen url for å få tilgang til et kontrollpanel. Dessverre kommer det i konflikt med standard lokalisering av Moodle sine admin-sider. Du kan fikse dette ved å endre navn på admin-mappen og deretter oppgi dette navnet her. F.eks. <em>moodleadmin</em>. Dette vil fikse adminlenkene i Moodle.';
|
||||
$string['pathssubdataroot'] = 'Du trenger et sted hvor Moodle kan lagre opplastede filer. Denne mappen må være med lese og skriverettigheter for webserver-brukeren (veldig ofte \'nobody\' eller \'apache\'), men denne mappen må IKKE være direkte tilgjengelig via web. Installasjonsprogrammet vil forsøke å opprette den om den ikke finnes fra før.';
|
||||
$string['pathssubdataroot'] = '<p>En mappe der Moodle vil lagre alle filer lastet opp av brukerne.</p>
|
||||
<p>Denne mappen må være med lese og skriverettigheter for webserver-brukeren (vanligvis \'www-data\', \'nobody\' eller \'apache\').</p>
|
||||
<p>Denne mappen må IKKE være direkte tilgjengelig via web.</p> <p>Installasjonsprogrammet vil forsøke å opprette den om den ikke finnes fra før.</p>';
|
||||
$string['pathssubdirroot'] = '<p>Full sti til mappen som inneholder Moodlekoden.</p>';
|
||||
$string['pathssubwwwroot'] = 'Full webadresse til der hvor Moodle skal vises. Det er ikke mulig å bruke Moodle med mer enn en adresse. Dersom portalen din har flere webadresser må du bruke videresending for til den webadressen du oppgir her. Dersom portalen din er tilgjengelig både fra intranett og internett, skal du oppgi den offentlige internettadressen her og sette opp DNS slik at intranettbrukerne også benytter denne offisielle adressen.
|
||||
Dersom adressen ikke er korrekt, vennligst endre URL i nettleseren slik at at installasjonen restartes med andre verdier.';
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotcreatedboninstall'] = '<p>Impossible de crear la banca de donadas.</p>
|
||||
<p>La banca de donadas indicada existís pas e l\'utilizaire especificat a pas las autorizacions que permeton de crear una banca de donadas.</p>.
|
||||
<p>L\'administrator del site deu repassar la configuracion de la banca de donadas.</p>';
|
||||
$string['cannotcreatedboninstall'] = '<p>Impossible de crear la basa de donadas.</p>
|
||||
<p>La banca de donadas indicada existís pas e l\'utilizaire especificat a pas las autorizacions que permeton de crear una basa de donadas.</p>.
|
||||
<p>L\'administrator del site deu repassar la configuracion de la basa de donadas.</p>';
|
||||
$string['cannotcreatelangdir'] = 'Creacion del dorsièr lang impossible';
|
||||
$string['cannotcreatetempdir'] = 'Creacion del dorsièr temp impossibla';
|
||||
$string['cannotdownloadcomponents'] = 'Telecargament dels components impossible';
|
||||
@@ -42,12 +42,12 @@ $string['cannotsavemd5file'] = 'Enregistrament del fichièr md5 impossible';
|
||||
$string['cannotsavezipfile'] = 'Enregistrament del fichièr ZIP impossible';
|
||||
$string['cannotunzipfile'] = 'Descompression del fichièr ZIP impossibla';
|
||||
$string['componentisuptodate'] = 'Lo component es a jorn';
|
||||
$string['dmlexceptiononinstall'] = '<p>Una error de banca de donadas s\'es producha [{$a->errorcode}].<br />{$a->debuginfo}</p>';
|
||||
$string['dmlexceptiononinstall'] = '<p>Una error de basa de donadas s\'es produita [{$a->errorcode}].<br />{$a->debuginfo}</p>';
|
||||
$string['downloadedfilecheckfailed'] = 'La verificacion del fichièr telecargat a fracassat';
|
||||
$string['invalidmd5'] = 'Lo còde de contraròtle md5 es pas valid';
|
||||
$string['invalidmd5'] = 'Lo còdi de contraròtle md5 es pas valid';
|
||||
$string['missingrequiredfield'] = 'Un camp obligatòri es pas completat';
|
||||
$string['remotedownloaderror'] = '<p>Lo telecargament del component sus vòstre servidor a fracassat. Verificatz los reglatges de proxy. L\'extension cURL de PHP es bravament recomandada.</p>
|
||||
<p>Vos cal telecargar manualament lo fichièr <a href="{$a->url}">{$a->url}</a>, lo copiar sus vòstre servidor a l\'emplaçament « {$a->dest} » e lo descompressar a aqueste endrech.</p>';
|
||||
<p>Vos cal telecargar manualament lo fichièr <a href="{$a->url}">{$a->url}</a>, lo copiar sus vòstre servidor a l\'emplaçament « {$a->dest} » e lo descompressar a aqueste endreit.</p>';
|
||||
$string['wrongdestpath'] = 'Camin de destinacion incorrècte';
|
||||
$string['wrongsourcebase'] = 'Adreça URL de basa de la font incorrècta';
|
||||
$string['wrongzipfilename'] = 'Nom de fichièr ZIP incorrècte';
|
||||
|
||||
@@ -34,8 +34,8 @@ $string['admindirname'] = 'Katalog admin';
|
||||
$string['availablelangs'] = 'Dostępne paczki językowe';
|
||||
$string['chooselanguagehead'] = 'Wybierz język';
|
||||
$string['chooselanguagesub'] = 'Proszę wybrać język do instalacji. Ten język będzie 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['clialreadyconfigured'] = 'Plik config.php już istnieje. Użyj admin/cli/install_database.php jeśli chcesz zainstalować Moodle dla tej strony.';
|
||||
$string['clialreadyinstalled'] = 'Plik config.php już istnieje. Użyj admin/cli/install_database.php jeśli chcesz zaktualizować Moodle dla tej strony.';
|
||||
$string['cliinstallheader'] = 'Program instalacyjny Moodle {$a} z linii poleceń';
|
||||
$string['databasehost'] = 'Host bazy danych';
|
||||
$string['databasename'] = 'Nazwa bazy danych';
|
||||
|
||||
@@ -44,7 +44,7 @@ $string['dmlexceptiononinstall'] = '<p>Ocorreu um erro de base de dados [{$a->er
|
||||
$string['downloadedfilecheckfailed'] = 'A verificação do ficheiro descarregado falhou.';
|
||||
$string['invalidmd5'] = 'A variável de verificação está errada - tente novamente.';
|
||||
$string['missingrequiredfield'] = 'Um dos campos obrigatórios está em falta';
|
||||
$string['remotedownloaderror'] = 'O download do componente para o servidor falhou. Verifique as configurações do proxy. A instalação da extensão cURL do PHP é muito recomendada.<br /><br />Terá de fazer manualmente o download do ficheiro <a href="{$a->url}">{$a->url}</a>, copiá-lo para a pasta "{$a->dest}" no seu servidor e descompactá-lo';
|
||||
$string['remotedownloaderror'] = 'Não foi possível descarregar o componente para o servidor. Verifique as configurações do proxy. A instalação da extensão cURL do PHP é muito recomendada.<br /><br />Terá de descarregar manualmente o ficheiro <a href="{$a->url}">{$a->url}</a>, copiá-lo para a pasta "{$a->dest}" no seu servidor e descompactá-lo';
|
||||
$string['wrongdestpath'] = 'Caminho de destino errado';
|
||||
$string['wrongsourcebase'] = 'Base do URL de origem errada';
|
||||
$string['wrongzipfilename'] = 'Nome de ficheiro ZIP errado';
|
||||
|
||||
@@ -48,13 +48,13 @@ $string['environmenthead'] = 'A verificar sistema...';
|
||||
$string['environmentsub2'] = 'Cada nova versão do Moodle tem pré-requisitos mínimos relativamente à versão do PHP e extensões necessárias para o seu correto funcionamento. Estes pré-requisitos são verificados sempre que o Moodle é instalado ou atualizado. Contacte o administrador do servidor caso seja necessário atualizar a versão do PHP ou instalar novas extensões.';
|
||||
$string['errorsinenvironment'] = 'A verificação do sistema falhou!';
|
||||
$string['installation'] = 'Instalação';
|
||||
$string['langdownloaderror'] = 'Não foi possível instalar o idioma <b>{$a}</b> por falha no download. O processo de instalação continuará em Inglês.';
|
||||
$string['langdownloaderror'] = 'Não foi possível descarregar o idioma <b>{$a}</b> . O processo de instalação continuará em Inglês.';
|
||||
$string['memorylimithelp'] = '<p>O limite de memória para o PHP definido atualmente no servidor é <b>{$a}</b>.</p><p>Um número elevado de módulos em utilização ou de utilizadores registados pode fazer com que o Moodle apresente problemas de falta de memória.</p><p>É recomendado que o PHP seja configurado com um limite de memória de pelo menos 40MB. Esta configuração pode ser definida de diversas formas:</p><ol><li>Compilação do PHP com o parâmetro <b>--enable-memory-limit</b>. Esta definição permitirá ao próprio Moodle definir o valor a utilizar.</li><li>Alteração do parâmetro <b>memory_limit</b> no ficheiro de configuração do PHP para um valor igual ou superior a 40MB.</li><li>Criação de um ficheiro <b>.htaccess</b> na raiz da pasta do Moodle com a linha <b>php_value memory_limit 40M</b><p>ATENÇÃO: Em alguns servidores esta configuração impedirá o funcionamento de <b>todas</b> as páginas PHP. Nestes casos, não poderá ser utilizado o ficheiro <b>.htaccess</b>.</p></li></ol>';
|
||||
$string['paths'] = 'Caminhos';
|
||||
$string['pathserrcreatedataroot'] = 'O programa de instalação não conseguiu criar a pasta de dados <b>{$a->dataroot}</b>.';
|
||||
$string['pathshead'] = 'Confirmar caminhos';
|
||||
$string['pathsrodataroot'] = 'A pasta de dados não tem permissões de escrita.';
|
||||
$string['pathsroparentdataroot'] = 'A pasta pai <b>{$a->parent}</b> não tem permissões de escrita. O programa de instalação não conseguiu criar a pasta <b>{$a->dataroot}</b>.';
|
||||
$string['pathsroparentdataroot'] = 'A pasta ascendente <b>{$a->parent}</b> não tem permissões de escrita. O programa de instalação não conseguiu criar a pasta <b>{$a->dataroot}</b>.';
|
||||
$string['pathssubadmindir'] = 'Alguns servidores Web utilizam a pasta <strong>admin</strong> em URLs especiais de acesso a funcionalidades especiais, como é o caso de painéis de controlo. Algumas situações podem criar conflitos com a localização normal das páginas de administração do Moodle. Estes problemas podem ser resolvidos renomeando a pasta <strong>admin</strong> na instalação do Moodle e indicando aqui o novo nome a utilizar. Por exemplo:<br /><br /><b>moodleadmin</b><br /><br />Esta ação resolverá os problemas de acesso das hiperligações para as funcionalidades de administração do Moodle.';
|
||||
$string['pathssubdataroot'] = '<p>Uma diretoria em que o Moodle irá armazenar todo o conteúdo de ficheiros enviados pelos utilizadores.</p>
|
||||
<p>Esta diretoria deve ser legível e gravável pelo utilizador do servidor web (geralmente \'www-data\', \'nobody\', ou \'apache\').</p>
|
||||
|
||||
@@ -34,7 +34,7 @@ $string['clianswerno'] = 'n';
|
||||
$string['cliansweryes'] = 's';
|
||||
$string['cliincorrectvalueerror'] = 'Erro, valor incorreto "{$a->value}" para "{$a->option}"';
|
||||
$string['cliincorrectvalueretry'] = 'Valor incorreto, por favor tente novamente';
|
||||
$string['clitypevalue'] = 'Digite o valor';
|
||||
$string['clitypevalue'] = 'digite o valor';
|
||||
$string['clitypevaluedefault'] = 'digite o valor, pressione Enter para utilizar o valor padrão ({$a})';
|
||||
$string['cliunknowoption'] = 'Opções não reconhecidas:
|
||||
{$a}
|
||||
|
||||
@@ -42,6 +42,7 @@ $string['cannotsavemd5file'] = 'Fişierul md5 nu poate fi salvat';
|
||||
$string['cannotsavezipfile'] = 'Arhiva ZIP nu poate fi salvată';
|
||||
$string['cannotunzipfile'] = 'Arhiva nu poate fi deschisă';
|
||||
$string['componentisuptodate'] = 'Componenta este actualizată';
|
||||
$string['dmlexceptiononinstall'] = '<p>A apărut o problemă la baza de date [{$a->errorcode}].<br />{$a->debuginfo}</p>';
|
||||
$string['downloadedfilecheckfailed'] = 'Verificarea fişierului descărcat a eşuat';
|
||||
$string['invalidmd5'] = 'md5 incorect';
|
||||
$string['missingrequiredfield'] = 'Lipseşte un câmp obligatoriu';
|
||||
|
||||
@@ -36,6 +36,7 @@ $string['chooselanguagehead'] = 'Selectare limbă';
|
||||
$string['chooselanguagesub'] = 'Vă rugăm selectaţi limba pentru interfaţa de instalare, limba selectată va fi folosită EXCLUSIV în cadrul procedurii de instalare. Ulterior veţi putea selecta limba în care doriţi să fie afişată interfaţa.';
|
||||
$string['clialreadyconfigured'] = 'Fișierul de configurare';
|
||||
$string['clialreadyinstalled'] = 'Fișierul de configurare config.php există deja. Vă rugăm să folosiți dmin/cli/install_database.php to pentru a upgrada Moodle pentru acest site.';
|
||||
$string['cliinstallheader'] = 'Program command line installation Moodle {$a}';
|
||||
$string['databasehost'] = 'Gazdă baza de date';
|
||||
$string['databasename'] = 'Nume baza de date';
|
||||
$string['databasetypehead'] = 'Alegere driver baza de date';
|
||||
@@ -44,15 +45,32 @@ $string['datarootpermission'] = 'Permisiuni directoare date';
|
||||
$string['dbprefix'] = 'Prefix tabele';
|
||||
$string['dirroot'] = 'Director Moodle';
|
||||
$string['environmenthead'] = 'Se verifică mediul...';
|
||||
$string['environmentsub2'] = 'Fiecare versiune Moodle are o anumită cerință minimă PHP și un număr de extensii PHP obligatorii.
|
||||
Verificarea completă a mediului se face înainte de fiecare instalare și upgrade. Vă rugăm să contactați administratorul serverului, dacă nu știți cum se instalează noua versiune sau dacă activați extensiile PHP.';
|
||||
$string['errorsinenvironment'] = 'Verificarea mediului eșuată!';
|
||||
$string['installation'] = 'Instalare';
|
||||
$string['langdownloaderror'] = 'Din păcate, limba "{$a}" nu a putut fi descărcată. Procesul de instalare va continua în limba engleză.';
|
||||
$string['paths'] = 'Căi';
|
||||
$string['pathserrcreatedataroot'] = 'Data directory ({$a->dataroot}) nu poate fi creat de către installer.';
|
||||
$string['pathshead'] = 'Confirmare căi';
|
||||
$string['pathsrodataroot'] = 'Directorul dataroot nu poate fi scris.';
|
||||
$string['pathssubdataroot'] = '<p>Un director unde Moodle va stoca tot conținutul unui fișier încărcat de către utilizatori.</p>
|
||||
<p>Acest director trebuie să poată fi citit și scris de către utilizatrii serverului web (de obicei \'www-data\', \'nobody\', or \'apache\').</p>
|
||||
<p>Nu trebuie să fie direct accesibil de pe web.</p>
|
||||
<p>Dacă directorul nu există în prezent, procesul de instalare va încerca să îl creeze.</p>';
|
||||
$string['pathssubdirroot'] = '<p>Calea completă către directorul care conține codul Moodle .</p>';
|
||||
$string['pathsunsecuredataroot'] = 'Locația dataroot nu este sigură';
|
||||
$string['pathswrongadmindir'] = 'Directorul admin nu există';
|
||||
$string['phpextension'] = 'extensie PHP {$a}';
|
||||
$string['phpversion'] = 'Versiune PHP';
|
||||
$string['phpversionhelp'] = '<p>Moodle necesită o versiune PHP de cel puțin 4.3.0 or 5.1.0 (5.0.x are un număr de probleme cunscute).</p>
|
||||
<p>Momentan rulați versiunea {$a}</p>
|
||||
<p>Trebuie să upgradați PHP sau să îl mutați pe o gazdă cu o nouă versiune de PHP!<br />
|
||||
(În cazul 5.0.x puteți, de asemenea, să downgradați la versiunea 4.4.x)</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Vedeți această pagină deoarece ați instalat și lansat cu succes pachetul <strong>{$a->packname} {$a->packversion}</strong> în computerul dumneavoastră. Felicitări!';
|
||||
$string['welcomep30'] = 'Lansarea <strong>{$a->installername}</strong> include aplicațiile
|
||||
pentru a crea un mediu în care <strong>Moodle</strong> va funcționa, și anume:';
|
||||
$string['welcomep40'] = 'Pachetul include și <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep70'] = 'Click pe butonul "Next" de mai jos pentru a continua setarea <strong>Moodle</strong>.';
|
||||
$string['wwwroot'] = 'Adresă Web';
|
||||
|
||||
@@ -33,12 +33,12 @@ defined('MOODLE_INTERNAL') || die();
|
||||
$string['clianswerno'] = 'n';
|
||||
$string['cliansweryes'] = 'd';
|
||||
$string['cliincorrectvalueerror'] = 'Napaka, nepravilna vrednost "{$a->value}" za "{$a->option}"';
|
||||
$string['cliincorrectvalueretry'] = 'Nepravilna vrednost, prosimo poskusite znova.';
|
||||
$string['clitypevalue'] = 'tip vrednosti';
|
||||
$string['clitypevaluedefault'] = 'tip vrednosti, kliknite Enter za uporabo privzete vrednosti ({$a})';
|
||||
$string['cliincorrectvalueretry'] = 'Nepravilna vrednost. Poskusite znova.';
|
||||
$string['clitypevalue'] = 'vtipkajte vrednost';
|
||||
$string['clitypevaluedefault'] = 'vtipkajte vrednost, kliknite Enter za uporabo privzete vrednosti ({$a})';
|
||||
$string['cliunknowoption'] = 'Neprepoznane možnosti:
|
||||
{$a}
|
||||
Uporabite --help opcijo.';
|
||||
$string['cliyesnoprompt'] = 'pritisnite d (pomeni da) ali n (pomeni ne)';
|
||||
$string['environmentrequireinstall'] = 'namestitev oz. omogočanje je zahtevano.';
|
||||
Uporabite --možnost help.';
|
||||
$string['cliyesnoprompt'] = 'vtipkajte d (pomeni da) ali n (pomeni ne)';
|
||||
$string['environmentrequireinstall'] = 'namestitev oz. omogočanje je zahtevano';
|
||||
$string['environmentrequireversion'] = 'različica {$a->needed} je zahtevana, vi uporabljate {$a->current}';
|
||||
|
||||
@@ -42,7 +42,8 @@ $string['componentisuptodate'] = 'Komponenta je posodobljena.';
|
||||
$string['downloadedfilecheckfailed'] = 'Preverjanje prenesene datoteke je spodletelo.';
|
||||
$string['invalidmd5'] = 'Neveljaven MD5';
|
||||
$string['missingrequiredfield'] = 'Eno izmed zahtevanih polj manjka';
|
||||
$string['remotedownloaderror'] = 'Prenos komponent na vaš strežnik ni uspel. Prosimo, da preverite nastavitve prehodnega strežnika. Priporočamo uporabo razširitve cURL za PHP.<br /><br />Datoteko <a href="{$a->url}">{$a->url}</a> morate prenesti ročno - skopirajte jo v imenik "{$a->dest}" in razširite.';
|
||||
$string['remotedownloaderror'] = '<p>Prenos komponent na vaš strežnik ni uspel. Prosimo, da preverite nastavitve posredniškega strežnika. Priporočamo uporabo razširitve cURL za PHP.</p>
|
||||
<p>Datoteko <a href="{$a->url}">{$a->url}</a> morate prenesti ročno - skopirajte jo v imenik "{$a->dest}" in jo tam razširite.</p>';
|
||||
$string['wrongdestpath'] = 'Napačna ciljna pot.';
|
||||
$string['wrongsourcebase'] = 'Napačna osnova URL vira.';
|
||||
$string['wrongzipfilename'] = 'Napačno ime datoteke ZIP.';
|
||||
|
||||
@@ -34,16 +34,18 @@ $string['admindirname'] = 'Skrbniški imenik';
|
||||
$string['availablelangs'] = 'Jezikovni paketi na voljo';
|
||||
$string['chooselanguagehead'] = 'Izberite jezik';
|
||||
$string['chooselanguagesub'] = 'Izberite jezika SAMO za namestitev. Pozneje boste lahko izbrali tudi jezike strani in uporabniške jezike.';
|
||||
$string['clialreadyinstalled'] = 'Datoteka config.php že obstaja, prosimo uporabite admin/cli/upgrade.php, če želite posodobiti vašo stran.';
|
||||
$string['clialreadyinstalled'] = 'Datoteka config.php že obstaja, prosimo uporabite admin/cli/install_database.php, če želite posodobiti vašo stran.';
|
||||
$string['cliinstallheader'] = 'Moodle {$a} namestitveni program z ukazno vrstico';
|
||||
$string['databasehost'] = 'Gostitelj podatkovne baze';
|
||||
$string['databasename'] = 'Ime podatkovne baze';
|
||||
$string['databasetypehead'] = 'Izberite gonilnik podatkovne baze';
|
||||
$string['dataroot'] = 'Imenik za podatke';
|
||||
$string['datarootpermission'] = 'Pravice za podatkovno mapo';
|
||||
$string['dbprefix'] = 'Predpona tabel';
|
||||
$string['dirroot'] = 'Imenik Moodle';
|
||||
$string['environmenthead'] = 'Preverjanje vašega okolja ...';
|
||||
$string['environmentsub2'] = 'Vsaka moodle izdaja ima nekatere minimalne PHP zahteve in številne mandatorne PHP razširitve. Pred vsako namestitvijo ali posodobitvijo se izvede popolna preverba okolja. Prosimo kontaktirajte strežniškega administratorja, če ne veste kako namestiti novo verzijo ali omogočiti PHP razširitev.';
|
||||
$string['environmentsub2'] = 'Vsaka Moodle različica ima nekatere minimalne PHP zahteve in številne obvezne PHP razširitve.
|
||||
Pred vsako namestitvijo ali posodobitvijo se izvede popolna preverba okolja. Obrnite se na strežniškega administratorja, če ne veste kako namestiti novo verzijo ali omogočiti PHP razširitev.';
|
||||
$string['errorsinenvironment'] = 'Preverjanje okolja ni uspelo!';
|
||||
$string['installation'] = 'Namestitev';
|
||||
$string['langdownloaderror'] = 'Žal jezik "{$a}" ni bil nameščen. Postopek namestitve se bo nadaljeval v angleščini.';
|
||||
@@ -62,8 +64,8 @@ $string['memorylimithelp'] = '<p>Omejitev pomnilnika PHP je trenutno na vašem s
|
||||
lahko prosili vašega skrbnika, da to naredi za vas.</li>
|
||||
<li>Na nekaterih strežnikih PHP lahko ustvarite datoteko .htaccess v imeniku Moodle,
|
||||
ki naj vsebuje to vrstico:
|
||||
<p><blockquote>php_value memory_limit 40M</blockquote></p>
|
||||
<p>Vendar lahko to prepreči delovanje <b>vseh</b> PHP strani
|
||||
<blockquote><div>php_value memory_limit 40M</div></blockquote>
|
||||
<p>Vendar lahko to na nekaterih strežnikih prepreči delovanje <b>vseh</b> PHP strani
|
||||
(ob prikazu strani boste videli napake) in boste morali odstraniti datoteko .htaccess.</p></li>
|
||||
</ol>';
|
||||
$string['paths'] = 'Poti';
|
||||
@@ -71,11 +73,19 @@ $string['pathserrcreatedataroot'] = 'Podatkovna mapa ({$a->dataroot}) ne more bi
|
||||
$string['pathshead'] = 'Potrdite poti';
|
||||
$string['pathsrodataroot'] = 'Korenska mapa ni za pisanje.';
|
||||
$string['pathsroparentdataroot'] = 'Starševska mapa ({$a->parent}) ni za pisanje. Podatkovna mapa ({$a->dataroot}) ne more biti ustvarjena preko namestitvenega programa.';
|
||||
$string['pathssubadmindir'] = 'Zelo malo Spletnih gostiteljev uporablja /admin kot posebni URL preko katerega dostopate do nadzorn plošče. Na žalost je to v konfliktu s standardno lokacijo za Moodlove skrbniške strani. To lahko popravite s preimenovanjemskrbniške mape v vaši namestitvi in vnesete tukaj to novo ime. Na primer: <em>moodleadmin</em>. To bo popravilo skrbniške povezave v Moodlu.';
|
||||
$string['pathssubdataroot'] = 'Potrebujete prostor, kamor bo Moodle shranjeval naložene datoteke. Ta mapa naj ima omogočeno branje IN PISANJE s strani uporabnika spletnega strežnika (po navadi \'brez\' ali \'apache\'), ampak ne sme biti dostopno neposredno preko spleta. Namestitveni program jo bo poskušal ustvariti, če že ne obstaja.';
|
||||
$string['pathssubdirroot'] = 'Polna pot do Moodle nameščene mape.';
|
||||
$string['pathssubwwwroot'] = 'Polni spletni naslov kjer bo Moodle dostopan. Dostop do Moodla z uporabo več naslovov ni mogoč. Če ima vaša stran več javnih naslovov, morate nastaviti trajne preusmeritve na vse naslove razen tega. Če je vaša stran dosropana preko interneta in omrežja, uporabite tukaj javne naslove in nastaviet DNS tako, da lahko uporabniki znotraj omrežja uporabljajo tudi javne naslove. Če naslovi niso pravilni prosimo spremenite URL v vašem brskalniku in ponovno poženite namestitev z drugo vrednostjo.';
|
||||
$string['pathsunsecuredataroot'] = '({$a->dataroot})';
|
||||
$string['pathssubadmindir'] = 'Zelo malo Spletnih gostiteljev uporablja /admin kot posebni URL preko katerega dostopate
|
||||
do nadzorne plošče. Na žalost je to v konfliktu s standardno lokacijo za Moodlovih administracijskih strani. To lahko popravite s
|
||||
preimenovanjem skrbniške mape v vaši namestitvi in tukaj vnesete to novo ime. Na primer: <em>moodleadmin</em>. To bo popravilo skrbniške povezave v Moodlu.';
|
||||
$string['pathssubdataroot'] = '<p>Mapa kamor bo Moodle shranjeval vse datoteke vsebine, ki jo nalagajo uporabniki.</p>
|
||||
<p>Ta mapa naj ima omogočeno tako branje kot pisanje za uporabnika spletnega strežnika (po navadi \'www-data\', \'nobody\' ali \'apache\')</p>
|
||||
<p>Mapa ne sme biti dostopna neposredno preko spleta.</p>
|
||||
<p>Če mapa trenutno še ne obstaja jo bo namestitveni proces poskušal ustvariti.</p>';
|
||||
$string['pathssubdirroot'] = '<p>Polna pot do mape, ki vsebuje Moodle kodo.</p>';
|
||||
$string['pathssubwwwroot'] = '<p>Polni spletni naslov na katerem bo Moodle dostopen. To je naslov, ki ga bodo uporabniki, za dostop do Moodla, vnesli v naslovno vrstico brskalnika.</p>
|
||||
<p>Dostop do Moodla z uporabo več naslovov ni mogoč. Če je vaša stran dostopna iz javnih naslovov, izberite najlažjega in za ostale nastavite trajne preusmeritve.</p>
|
||||
<p>Če je vaša stran dostopna tako iz spleta kot iz lokalnega omrežja (včasih imenovano Intranet), tukaj uporabite javni naslov.</p>
|
||||
<p>Če trenutni naslov ni pravilen, spremenite URL v naslovni vrstici vašega brskalnika in ponovno začnite z namestitvijo.</p>';
|
||||
$string['pathsunsecuredataroot'] = 'Lokacija korenske podatkovne mape ni varna';
|
||||
$string['pathswrongadmindir'] = 'Skrbniška mapa ne obstaja';
|
||||
$string['phpextension'] = '{$a} PHP razširitev';
|
||||
$string['phpversion'] = 'Različica PHP';
|
||||
|
||||
@@ -31,4 +31,4 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thislanguage'] = 'Slovenščina';
|
||||
$string['thislanguage'] = 'Slovenščina';
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotcreatedboninstall'] = '<p>无法建立数据库</p>
|
||||
<p>指定数据库不存在。使用者没有权限建立数据库</p>
|
||||
<p>网站管理员需查明数据库状态.</p>';
|
||||
$string['cannotcreatelangdir'] = '无法创建 lang 目录。';
|
||||
$string['cannotcreatetempdir'] = '无法创建 temp 目录。';
|
||||
$string['cannotdownloadcomponents'] = '无法下载组件';
|
||||
|
||||
@@ -610,6 +610,7 @@ $string['legacyfilesaddallowed'] = 'Allow adding to legacy course files';
|
||||
$string['legacyfilesaddallowed_help'] = 'If a course has legacy course files, allow new files and folders to be added to it.';
|
||||
$string['legacyfilesinnewcourses'] = 'Legacy course files in new courses';
|
||||
$string['legacyfilesinnewcourses_help'] = 'By default, legacy course files areas are available in upgraded courses only. Please note that some features such as activity backup and restore are not compatible with this setting.';
|
||||
$string['libcurlwarning'] = 'Libcurl with CURLOPT_PROTOCOL support has not been detected. It is recommended to have an up to date libcurl installation for security reasons.';
|
||||
$string['licensesettings'] = 'Licence settings';
|
||||
$string['linkadmincategories'] = 'Link admin categories';
|
||||
$string['linkadmincategories_help'] = 'If enabled admin setting categories will be displayed as links in the navigation and will lead to the admin category pages.';
|
||||
@@ -1056,6 +1057,7 @@ $string['unsupported'] = 'Unsupported';
|
||||
$string['unsupporteddbstorageengine'] = 'The database storage engine being used is no longer supported.';
|
||||
$string['unsupporteddbtablerowformat'] = 'Your database has tables using Antelope as the file format. You are recommended to convert the tables to the Barracuda file format. See the documentation <a href="https://docs.moodle.org/en/cli">Administration via command line</a> for details of a tool for converting InnoDB tables to Barracuda.';
|
||||
$string['unsupportedphpversion7'] = 'PHP version 7 is not supported.';
|
||||
$string['unsupportedphpversion71'] = 'PHP version 7.1 is not supported.';
|
||||
$string['unsuspenduser'] = 'Activate user account';
|
||||
$string['updateaccounts'] = 'Update existing accounts';
|
||||
$string['updatecomponent'] = 'Update component';
|
||||
|
||||
+1
-5
@@ -1142,11 +1142,7 @@ function profile_display_badges($userid, $courseid = 0) {
|
||||
require_once($CFG->dirroot . '/badges/renderer.php');
|
||||
|
||||
// Determine context.
|
||||
if (isloggedin()) {
|
||||
$context = context_user::instance($USER->id);
|
||||
} else {
|
||||
$context = context_system::instance();
|
||||
}
|
||||
$context = context_user::instance($userid);
|
||||
|
||||
if ($USER->id == $userid || has_capability('moodle/badges:viewotherbadges', $context)) {
|
||||
$records = badges_get_user_badges($userid, $courseid, null, null, null, true);
|
||||
|
||||
@@ -111,6 +111,9 @@ class behat_util extends testing_util {
|
||||
// Disable some settings that are not wanted on test sites.
|
||||
set_config('noemailever', 1);
|
||||
|
||||
// Set noreplyaddress to an example domain, as it should be valid email address and test site can be a localhost.
|
||||
set_config('noreplyaddress', 'noreply@example.com');
|
||||
|
||||
// Keeps the current version of database and dataroot.
|
||||
self::store_versions_hash();
|
||||
|
||||
|
||||
+10
-10
@@ -257,15 +257,15 @@ class core_user {
|
||||
// Every new field on the user table should be added here otherwise it won't be validated.
|
||||
$fields = array();
|
||||
$fields['id'] = array('type' => PARAM_INT);
|
||||
$fields['auth'] = array('type' => PARAM_NOTAGS);
|
||||
$fields['auth'] = array('type' => PARAM_AUTH);
|
||||
$fields['confirmed'] = array('type' => PARAM_BOOL);
|
||||
$fields['policyagreed'] = array('type' => PARAM_BOOL);
|
||||
$fields['deleted'] = array('type' => PARAM_BOOL);
|
||||
$fields['suspended'] = array('type' => PARAM_BOOL);
|
||||
$fields['mnethostid'] = array('type' => PARAM_BOOL);
|
||||
$fields['mnethostid'] = array('type' => PARAM_INT);
|
||||
$fields['username'] = array('type' => PARAM_USERNAME);
|
||||
$fields['password'] = array('type' => PARAM_NOTAGS);
|
||||
$fields['idnumber'] = array('type' => PARAM_NOTAGS);
|
||||
$fields['password'] = array('type' => PARAM_RAW);
|
||||
$fields['idnumber'] = array('type' => PARAM_RAW);
|
||||
$fields['firstname'] = array('type' => PARAM_NOTAGS);
|
||||
$fields['lastname'] = array('type' => PARAM_NOTAGS);
|
||||
$fields['surname'] = array('type' => PARAM_NOTAGS);
|
||||
@@ -282,20 +282,20 @@ class core_user {
|
||||
$fields['department'] = array('type' => PARAM_TEXT);
|
||||
$fields['address'] = array('type' => PARAM_TEXT);
|
||||
$fields['city'] = array('type' => PARAM_TEXT);
|
||||
$fields['country'] = array('type' => PARAM_TEXT);
|
||||
$fields['lang'] = array('type' => PARAM_TEXT);
|
||||
$fields['country'] = array('type' => PARAM_ALPHA);
|
||||
$fields['lang'] = array('type' => PARAM_LANG);
|
||||
$fields['calendartype'] = array('type' => PARAM_NOTAGS);
|
||||
$fields['theme'] = array('type' => PARAM_NOTAGS);
|
||||
$fields['timezones'] = array('type' => PARAM_TEXT);
|
||||
$fields['theme'] = array('type' => PARAM_THEME);
|
||||
$fields['timezone'] = array('type' => PARAM_TIMEZONE);
|
||||
$fields['firstaccess'] = array('type' => PARAM_INT);
|
||||
$fields['lastaccess'] = array('type' => PARAM_INT);
|
||||
$fields['lastlogin'] = array('type' => PARAM_INT);
|
||||
$fields['currentlogin'] = array('type' => PARAM_INT);
|
||||
$fields['lastip'] = array('type' => PARAM_NOTAGS);
|
||||
$fields['secret'] = array('type' => PARAM_TEXT);
|
||||
$fields['secret'] = array('type' => PARAM_RAW);
|
||||
$fields['picture'] = array('type' => PARAM_INT);
|
||||
$fields['url'] = array('type' => PARAM_URL);
|
||||
$fields['description'] = array('type' => PARAM_CLEANHTML);
|
||||
$fields['description'] = array('type' => PARAM_RAW);
|
||||
$fields['descriptionformat'] = array('type' => PARAM_INT);
|
||||
$fields['mailformat'] = array('type' => PARAM_INT);
|
||||
$fields['maildigest'] = array('type' => PARAM_INT);
|
||||
|
||||
@@ -1547,3 +1547,14 @@ function restrict_php_version(&$result, $version) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current PHP version is greater than or equal to
|
||||
* PHP version 7.1.
|
||||
*
|
||||
* @param object $result an environment_results instance
|
||||
* @return bool result of version check
|
||||
*/
|
||||
function restrict_php_version_71(&$result) {
|
||||
return restrict_php_version($result, '7.1');
|
||||
}
|
||||
|
||||
+31
-3
@@ -4745,6 +4745,7 @@ function hash_internal_user_password($password, $fasthash = false) {
|
||||
*
|
||||
* Updating the password will modify the $user object and the database
|
||||
* record to use the current hashing algorithm.
|
||||
* It will remove Web Services user tokens too.
|
||||
*
|
||||
* @param stdClass $user User object (password property may be updated).
|
||||
* @param string $password Plain text password.
|
||||
@@ -4792,6 +4793,10 @@ function update_internal_user_password($user, $password, $fasthash = false) {
|
||||
// Trigger event.
|
||||
$user = $DB->get_record('user', array('id' => $user->id));
|
||||
\core\event\user_password_updated::create_from_user($user)->trigger();
|
||||
|
||||
// Remove WS user tokens.
|
||||
require_once($CFG->dirroot.'/webservice/lib.php');
|
||||
webservice::delete_user_ws_tokens($user->id);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -5833,6 +5838,18 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml = '',
|
||||
$tempreplyto = array();
|
||||
|
||||
$supportuser = core_user::get_support_user();
|
||||
$noreplyaddressdefault = 'noreply@' . get_host_from_url($CFG->wwwroot);
|
||||
$noreplyaddress = empty($CFG->noreplyaddress) ? $noreplyaddressdefault : $CFG->noreplyaddress;
|
||||
|
||||
if (!validate_email($noreplyaddress)) {
|
||||
debugging('email_to_user: Invalid noreply-email '.s($noreplyaddress));
|
||||
$noreplyaddress = $noreplyaddressdefault;
|
||||
}
|
||||
|
||||
if (!validate_email($supportuser->email)) {
|
||||
debugging('email_to_user: Invalid support-email '.s($supportuser->email));
|
||||
$supportuser->email = $noreplyaddress;
|
||||
}
|
||||
|
||||
// Make up an email address for handling bounces.
|
||||
if (!empty($CFG->handlebounces)) {
|
||||
@@ -5850,17 +5867,28 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml = '',
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure that the explicit replyto is valid, fall back to the implicit one.
|
||||
if (!empty($replyto) && !validate_email($replyto)) {
|
||||
debugging('email_to_user: Invalid replyto-email '.s($replyto));
|
||||
$replyto = $noreplyaddress;
|
||||
}
|
||||
|
||||
if (is_string($from)) { // So we can pass whatever we want if there is need.
|
||||
$mail->From = $CFG->noreplyaddress;
|
||||
$mail->From = $noreplyaddress;
|
||||
$mail->FromName = $from;
|
||||
} else if ($usetrueaddress and $from->maildisplay) {
|
||||
if (!validate_email($from->email)) {
|
||||
debugging('email_to_user: Invalid from-email '.s($from->email).' - not sending');
|
||||
// Better not to use $noreplyaddress in this case.
|
||||
return false;
|
||||
}
|
||||
$mail->From = $from->email;
|
||||
$mail->FromName = fullname($from);
|
||||
} else {
|
||||
$mail->From = $CFG->noreplyaddress;
|
||||
$mail->From = $noreplyaddress;
|
||||
$mail->FromName = fullname($from);
|
||||
if (empty($replyto)) {
|
||||
$tempreplyto[] = array($CFG->noreplyaddress, get_string('noreplyname'));
|
||||
$tempreplyto[] = array($noreplyaddress, get_string('noreplyname'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,11 +85,15 @@ class moodle_phpmailer extends PHPMailer {
|
||||
public function encodeHeader($str, $position = 'text') {
|
||||
$encoded = core_text::encode_mimeheader($str, $this->CharSet);
|
||||
if ($encoded !== false) {
|
||||
$encoded = str_replace("\n", $this->LE, $encoded);
|
||||
if ($position === 'phrase') {
|
||||
return ("\"$encoded\"");
|
||||
// Escape special symbols in each line in the encoded string, join back together and enclose in quotes.
|
||||
$chunks = preg_split("/\\n/", $encoded);
|
||||
$chunks = array_map(function($chunk) {
|
||||
return addcslashes($chunk, "\0..\37\177\\\"");
|
||||
}, $chunks);
|
||||
return '"' . join($this->LE, $chunks) . '"';
|
||||
}
|
||||
return $encoded;
|
||||
return str_replace("\n", $this->LE, $encoded);
|
||||
}
|
||||
|
||||
return parent::encodeHeader($str, $position);
|
||||
|
||||
@@ -2949,4 +2949,27 @@ class core_moodlelib_testcase extends advanced_testcase {
|
||||
$this->assertSame('', $result);
|
||||
$this->assertDebuggingCalled();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that generate_email_processing_address() returns valid email address.
|
||||
*/
|
||||
public function test_generate_email_processing_address() {
|
||||
global $CFG;
|
||||
$this->resetAfterTest();
|
||||
|
||||
$data = (object)[
|
||||
'id' => 42,
|
||||
'email' => 'my.email+from_moodle@example.com',
|
||||
];
|
||||
|
||||
$modargs = 'B'.base64_encode(pack('V', $data->id)).substr(md5($data->email), 0, 16);
|
||||
|
||||
$CFG->maildomain = 'example.com';
|
||||
$CFG->mailprefix = 'mdl+';
|
||||
$this->assertEquals(1, validate_email(generate_email_processing_address(0, $modargs)));
|
||||
|
||||
$CFG->maildomain = 'mail.example.com';
|
||||
$CFG->mailprefix = 'mdl-';
|
||||
$this->assertEquals(1, validate_email(generate_email_processing_address(23, $modargs)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,8 +132,8 @@ class core_scheduled_task_testcase extends advanced_testcase {
|
||||
// We are testing a difference between $CFG->timezone and the php.ini timezone.
|
||||
// GMT+8.
|
||||
date_default_timezone_set('Australia/Perth');
|
||||
// GMT-04:30.
|
||||
$CFG->timezone = 'America/Caracas';
|
||||
// GMT+04:30.
|
||||
$CFG->timezone = 'Asia/Kabul';
|
||||
|
||||
$testclass = new \core\task\scheduled_test_task();
|
||||
|
||||
@@ -149,9 +149,9 @@ class core_scheduled_task_testcase extends advanced_testcase {
|
||||
$userdate = userdate($nexttime);
|
||||
|
||||
// Should be displayed in user timezone.
|
||||
// I used http://www.timeanddate.com/worldclock/fixedtime.html?msg=Moodle+Test&iso=20140314T01&p1=58
|
||||
// to verify this time.
|
||||
$this->assertContains('11:15 AM', core_text::strtoupper($userdate));
|
||||
// I used http://www.timeanddate.com/worldclock/fixedtime.html?msg=Moodle+Test&iso=20160502T01&p1=113
|
||||
// setting my location to Kathmandu to verify this time.
|
||||
$this->assertContains('2:15 AM', core_text::strtoupper($userdate));
|
||||
|
||||
$CFG->timezone = $currenttimezonecfg;
|
||||
date_default_timezone_set($currenttimezonephp);
|
||||
|
||||
+32
-1
@@ -295,10 +295,41 @@ class core_text_testcase extends advanced_testcase {
|
||||
|
||||
/**
|
||||
* Tests the static encode_mimeheader method.
|
||||
* This also tests method moodle_phpmailer::encodeHeader that calls core_text::encode_mimeheader
|
||||
*/
|
||||
public function test_encode_mimeheader() {
|
||||
global $CFG;
|
||||
require_once($CFG->libdir.'/phpmailer/moodle_phpmailer.php');
|
||||
$mailer = new moodle_phpmailer();
|
||||
|
||||
// Encode short string with non-latin characters.
|
||||
$str = "Žluťoučký koníček";
|
||||
$this->assertSame('=?utf-8?B?xb1sdcWlb3XEjWvDvSBrb27DrcSNZWs=?=', core_text::encode_mimeheader($str));
|
||||
$encodedstr = '=?utf-8?B?xb1sdcWlb3XEjWvDvSBrb27DrcSNZWs=?=';
|
||||
$this->assertSame($encodedstr, core_text::encode_mimeheader($str));
|
||||
$this->assertSame($encodedstr, $mailer->encodeHeader($str));
|
||||
$this->assertSame('"' . $encodedstr . '"', $mailer->encodeHeader($str, 'phrase'));
|
||||
|
||||
// Encode short string without non-latin characters. Make sure the quotes are escaped in quoted email headers.
|
||||
$latinstr = 'text"with quotes';
|
||||
$this->assertSame($latinstr, core_text::encode_mimeheader($latinstr));
|
||||
$this->assertSame($latinstr, $mailer->encodeHeader($latinstr));
|
||||
$this->assertSame('"text\\"with quotes"', $mailer->encodeHeader($latinstr, 'phrase'));
|
||||
|
||||
// Encode long string without non-latin characters.
|
||||
$longlatinstr = 'This is a very long text that still should not be split into several lines in the email headers because '.
|
||||
'it does not have any non-latin characters. The "quotes" and \\backslashes should be escaped only if it\'s a part of email address';
|
||||
$this->assertSame($longlatinstr, core_text::encode_mimeheader($longlatinstr));
|
||||
$this->assertSame($longlatinstr, $mailer->encodeHeader($longlatinstr));
|
||||
$longlatinstrwithslash = preg_replace(['/\\\\/', "/\"/"], ['\\\\\\', '\\"'], $longlatinstr);
|
||||
$this->assertSame('"' . $longlatinstrwithslash . '"', $mailer->encodeHeader($longlatinstr, 'phrase'));
|
||||
|
||||
// Encode long string with non-latin characters.
|
||||
$longstr = "Неопознанная ошибка в файле C:\\tmp\\: \"Не пользуйтесь виндоуз\"";
|
||||
$encodedlongstr = "=?utf-8?B?0J3QtdC+0L/QvtC30L3QsNC90L3QsNGPINC+0YjQuNCx0LrQsCDQsiDRhNCw?=
|
||||
=?utf-8?B?0LnQu9C1IEM6XHRtcFw6ICLQndC1INC/0L7Qu9GM0LfRg9C50YLQtdGB?=
|
||||
=?utf-8?B?0Ywg0LLQuNC90LTQvtGD0Lci?=";
|
||||
$this->assertSame($encodedlongstr, $mailer->encodeHeader($longstr));
|
||||
$this->assertSame('"' . $encodedlongstr . '"', $mailer->encodeHeader($longstr, 'phrase'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -351,4 +351,20 @@ class core_upgradelib_testcase extends advanced_testcase {
|
||||
(object)array('userfield' => 'email', 'shortname' => null, 'operator' => 'isempty'),
|
||||
)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test libcurl custom check api.
|
||||
*/
|
||||
public function test_check_libcurl_version() {
|
||||
$supportedversion = 0x071304;
|
||||
$curlinfo = curl_version();
|
||||
$currentversion = $curlinfo['version_number'];
|
||||
|
||||
$result = new environment_results("custom_checks");
|
||||
if ($currentversion < $supportedversion) {
|
||||
$this->assertFalse(check_libcurl_version($result)->getStatus());
|
||||
} else {
|
||||
$this->assertNull(check_libcurl_version($result));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -567,4 +567,19 @@ EXPECTED;
|
||||
$this->assertSame($expected, strip_pluginfile_content($source));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests for validate_email() function.
|
||||
*/
|
||||
public function test_validate_email() {
|
||||
|
||||
$this->assertEquals(1, validate_email('moodle@example.com'));
|
||||
$this->assertEquals(1, validate_email('moodle@localhost.local'));
|
||||
$this->assertEquals(1, validate_email('verp_email+is=mighty@moodle.org'));
|
||||
$this->assertEquals(1, validate_email("but_potentially'dangerous'too@example.org"));
|
||||
$this->assertEquals(1, validate_email('posts+AAAAAAAAAAIAAAAAAAAGQQAAAAABFSXz1eM/P/lR2bYyljM+@posts.moodle.org'));
|
||||
|
||||
$this->assertEquals(0, validate_email('moodle@localhost'));
|
||||
$this->assertEquals(0, validate_email('"attacker\\" -oQ/tmp/ -X/var/www/vhost/moodle/backdoor.php some"@email.com'));
|
||||
$this->assertEquals(0, validate_email("moodle@example.com>\r\nRCPT TO:<victim@example.com"));
|
||||
}
|
||||
}
|
||||
|
||||
+2276
-2242
File diff suppressed because it is too large
Load Diff
@@ -2266,3 +2266,38 @@ function check_database_tables_row_format(environment_results $result) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if recommended version of libcurl is installed or not.
|
||||
*
|
||||
* @param environment_results $result object to update, if relevant.
|
||||
* @return environment_results|null updated results or null.
|
||||
*/
|
||||
function check_libcurl_version(environment_results $result) {
|
||||
|
||||
if (!function_exists('curl_version')) {
|
||||
$result->setInfo('cURL PHP extension is not installed');
|
||||
$result->setStatus(false);
|
||||
return $result;
|
||||
}
|
||||
|
||||
// Supported version and version number.
|
||||
$supportedversion = 0x071304;
|
||||
$supportedversionstring = "7.19.4";
|
||||
|
||||
// Installed version.
|
||||
$curlinfo = curl_version();
|
||||
$currentversion = $curlinfo['version_number'];
|
||||
|
||||
if ($currentversion < $supportedversion) {
|
||||
// Test fail.
|
||||
// Set info, we want to let user know how to resolve the problem.
|
||||
$result->setInfo('Libcurl version check');
|
||||
$result->setNeededVersion($supportedversionstring);
|
||||
$result->setCurrentVersion($curlinfo['version']);
|
||||
$result->setStatus(false);
|
||||
return $result;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,14 @@
|
||||
*
|
||||
* Finds the user and calls the appropriate routine for their authentication type.
|
||||
*
|
||||
* There are several pathways to/through this page, summarised below:
|
||||
* 1. User clicks the 'forgotten your username or password?' link on the login page.
|
||||
* - No token is received, render the username/email search form.
|
||||
* 2. User clicks the link in the forgot password email
|
||||
* - Token received as GET param, store the token in session, redirect to self
|
||||
* 3. Redirected from (2)
|
||||
* - Fetch token from session, and continue to run the reset routine defined in 'core_login_process_password_set()'.
|
||||
*
|
||||
* @package core
|
||||
* @subpackage auth
|
||||
* @copyright 1999 onwards Martin Dougiamas http://dougiamas.com
|
||||
@@ -59,12 +67,27 @@ if (isloggedin() and !isguestuser()) {
|
||||
redirect($CFG->wwwroot.'/index.php', get_string('loginalready'), 5);
|
||||
}
|
||||
|
||||
// Fetch the token from the session, if present, and unset the session var immediately.
|
||||
$tokeninsession = false;
|
||||
if (!empty($SESSION->password_reset_token)) {
|
||||
$token = $SESSION->password_reset_token;
|
||||
unset($SESSION->password_reset_token);
|
||||
$tokeninsession = true;
|
||||
}
|
||||
|
||||
if (empty($token)) {
|
||||
// This is a new password reset request.
|
||||
// Process the request; identify the user & send confirmation email.
|
||||
core_login_process_password_reset_request();
|
||||
} else {
|
||||
// User clicked on confirmation link in email message
|
||||
// validate the token & set new password
|
||||
core_login_process_password_set($token);
|
||||
// A token has been found, but not in the session, and not from a form post.
|
||||
// This must be the user following the original rest link, so store the reset token in the session and redirect to self.
|
||||
// The session var is intentionally used only during the lifespan of one request (the redirect) and is unset above.
|
||||
if (!$tokeninsession && $_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$SESSION->password_reset_token = $token;
|
||||
redirect($CFG->httpswwwroot . '/login/forgot_password.php');
|
||||
} else {
|
||||
// Continue with the password reset process.
|
||||
core_login_process_password_set($token);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,8 @@ if ($ADMIN->fulltree) {
|
||||
$settings->add(new admin_setting_configtext('smtpuser', get_string('smtpuser', 'message_email'), get_string('configsmtpuser', 'message_email'), '', PARAM_NOTAGS));
|
||||
$settings->add(new admin_setting_configpasswordunmask('smtppass', get_string('smtppass', 'message_email'), get_string('configsmtpuser', 'message_email'), ''));
|
||||
$settings->add(new admin_setting_configtext('smtpmaxbulk', get_string('smtpmaxbulk', 'message_email'), get_string('configsmtpmaxbulk', 'message_email'), 1, PARAM_INT));
|
||||
$settings->add(new admin_setting_configtext('noreplyaddress', get_string('noreplyaddress', 'message_email'), get_string('confignoreplyaddress', 'message_email'), 'noreply@' . get_host_from_url($CFG->wwwroot), PARAM_NOTAGS));
|
||||
$settings->add(new admin_setting_configtext('noreplyaddress', get_string('noreplyaddress', 'message_email'),
|
||||
get_string('confignoreplyaddress', 'message_email'), 'noreply@' . get_host_from_url($CFG->wwwroot), PARAM_EMAIL));
|
||||
$settings->add(new admin_setting_configcheckbox('emailonlyfromnoreplyaddress',
|
||||
get_string('emailonlyfromnoreplyaddress', 'message_email'),
|
||||
get_string('configemailonlyfromnoreplyaddress', 'message_email'), 0));
|
||||
|
||||
@@ -780,7 +780,7 @@ class mod_assign_external extends external_api {
|
||||
'locked' => new external_value(PARAM_INT, 'locked', VALUE_OPTIONAL),
|
||||
'mailed' => new external_value(PARAM_INT, 'mailed', VALUE_OPTIONAL),
|
||||
'extensionduedate' => new external_value(PARAM_INT, 'extension due date', VALUE_OPTIONAL),
|
||||
'workflowstate' => new external_value(PARAM_TEXT, 'marking workflow state', VALUE_OPTIONAL),
|
||||
'workflowstate' => new external_value(PARAM_ALPHA, 'marking workflow state', VALUE_OPTIONAL),
|
||||
'allocatedmarker' => new external_value(PARAM_INT, 'allocated marker', VALUE_OPTIONAL)
|
||||
)
|
||||
)
|
||||
@@ -1036,7 +1036,7 @@ class mod_assign_external extends external_api {
|
||||
'locked' => new external_value(PARAM_INT, 'locked'),
|
||||
'mailed' => new external_value(PARAM_INT, 'mailed'),
|
||||
'extensionduedate' => new external_value(PARAM_INT, 'extension due date'),
|
||||
'workflowstate' => new external_value(PARAM_TEXT, 'marking workflow state', VALUE_OPTIONAL),
|
||||
'workflowstate' => new external_value(PARAM_ALPHA, 'marking workflow state', VALUE_OPTIONAL),
|
||||
'allocatedmarker' => new external_value(PARAM_INT, 'allocated marker')
|
||||
)
|
||||
)
|
||||
|
||||
@@ -2212,7 +2212,7 @@ class assign {
|
||||
$o = '';
|
||||
|
||||
$pluginsubtype = required_param('pluginsubtype', PARAM_ALPHA);
|
||||
$plugintype = required_param('plugin', PARAM_TEXT);
|
||||
$plugintype = required_param('plugin', PARAM_PLUGIN);
|
||||
$pluginaction = required_param('pluginaction', PARAM_ALPHA);
|
||||
|
||||
$plugin = $this->get_plugin_by_type($pluginsubtype, $plugintype);
|
||||
@@ -2268,7 +2268,7 @@ class assign {
|
||||
|
||||
$submissionid = optional_param('sid', 0, PARAM_INT);
|
||||
$gradeid = optional_param('gid', 0, PARAM_INT);
|
||||
$plugintype = required_param('plugin', PARAM_TEXT);
|
||||
$plugintype = required_param('plugin', PARAM_PLUGIN);
|
||||
$item = null;
|
||||
if ($pluginsubtype == 'assignsubmission') {
|
||||
$plugin = $this->get_submission_plugin_by_type($plugintype);
|
||||
@@ -5119,7 +5119,7 @@ class assign {
|
||||
$record->userid = $userid;
|
||||
if ($modified >= 0) {
|
||||
$record->grade = unformat_float(optional_param('quickgrade_' . $record->userid, -1, PARAM_TEXT));
|
||||
$record->workflowstate = optional_param('quickgrade_' . $record->userid.'_workflowstate', false, PARAM_TEXT);
|
||||
$record->workflowstate = optional_param('quickgrade_' . $record->userid.'_workflowstate', false, PARAM_ALPHA);
|
||||
$record->allocatedmarker = optional_param('quickgrade_' . $record->userid.'_allocatedmarker', false, PARAM_INT);
|
||||
} else {
|
||||
// This user was not in the grading table.
|
||||
@@ -6213,7 +6213,7 @@ class assign {
|
||||
$mform->setType('userid', PARAM_INT);
|
||||
|
||||
$mform->addElement('hidden', 'action', 'savesubmission');
|
||||
$mform->setType('action', PARAM_TEXT);
|
||||
$mform->setType('action', PARAM_ALPHA);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/mod/assign/locallib.php');
|
||||
$id = required_param('id', PARAM_INT);
|
||||
|
||||
$urlparams = array('id' => $id,
|
||||
'action' => optional_param('action', '', PARAM_TEXT),
|
||||
'action' => optional_param('action', '', PARAM_ALPHA),
|
||||
'rownum' => optional_param('rownum', 0, PARAM_INT),
|
||||
'useridlistid' => optional_param('action', 0, PARAM_INT));
|
||||
|
||||
@@ -50,4 +50,4 @@ $completion->set_module_viewed($cm);
|
||||
|
||||
// Get the assign class to
|
||||
// render the page.
|
||||
echo $assign->view(optional_param('action', '', PARAM_TEXT));
|
||||
echo $assign->view(optional_param('action', '', PARAM_ALPHA));
|
||||
|
||||
@@ -218,9 +218,6 @@ class mod_forum_post_form extends moodleform {
|
||||
$mform->addElement('hidden', 'parent');
|
||||
$mform->setType('parent', PARAM_INT);
|
||||
|
||||
$mform->addElement('hidden', 'userid');
|
||||
$mform->setType('userid', PARAM_INT);
|
||||
|
||||
$mform->addElement('hidden', 'groupid');
|
||||
$mform->setType('groupid', PARAM_INT);
|
||||
|
||||
|
||||
+2
-2
@@ -228,7 +228,7 @@ if ($generalforums) {
|
||||
} else if ($unread = forum_tp_count_forum_unread_posts($cm, $course)) {
|
||||
$unreadlink = '<span class="unread"><a href="view.php?f='.$forum->id.'">'.$unread.'</a>';
|
||||
$unreadlink .= '<a title="'.$strmarkallread.'" href="markposts.php?f='.
|
||||
$forum->id.'&mark=read"><img src="'.$OUTPUT->pix_url('t/markasread') . '" alt="'.$strmarkallread.'" class="iconsmall" /></a></span>';
|
||||
$forum->id.'&mark=read&sesskey=' . sesskey() . '"><img src="'.$OUTPUT->pix_url('t/markasread') . '" alt="'.$strmarkallread.'" class="iconsmall" /></a></span>';
|
||||
} else {
|
||||
$unreadlink = '<span class="read">0</span>';
|
||||
}
|
||||
@@ -366,7 +366,7 @@ if ($course->id != SITEID) { // Only real courses have learning forums
|
||||
} else if ($unread = forum_tp_count_forum_unread_posts($cm, $course)) {
|
||||
$unreadlink = '<span class="unread"><a href="view.php?f='.$forum->id.'">'.$unread.'</a>';
|
||||
$unreadlink .= '<a title="'.$strmarkallread.'" href="markposts.php?f='.
|
||||
$forum->id.'&mark=read"><img src="'.$OUTPUT->pix_url('t/markasread') . '" alt="'.$strmarkallread.'" class="iconsmall" /></a></span>';
|
||||
$forum->id.'&mark=read&sesskey=' . sesskey() . '"><img src="'.$OUTPUT->pix_url('t/markasread') . '" alt="'.$strmarkallread.'" class="iconsmall" /></a></span>';
|
||||
} else {
|
||||
$unreadlink = '<span class="read">0</span>';
|
||||
}
|
||||
|
||||
+26
-12
@@ -3913,7 +3913,7 @@ function forum_print_discussion_header(&$post, $forum, $group=-1, $datestring=""
|
||||
echo $post->unread;
|
||||
echo '</a>';
|
||||
echo '<a title="'.$strmarkalldread.'" href="'.$CFG->wwwroot.'/mod/forum/markposts.php?f='.
|
||||
$forum->id.'&d='.$post->discussion.'&mark=read&returnpage=view.php">' .
|
||||
$forum->id.'&d='.$post->discussion.'&mark=read&returnpage=view.php&sesskey=' . sesskey() . '">' .
|
||||
'<img src="'.$OUTPUT->pix_url('t/markasread') . '" class="iconsmall" alt="'.$strmarkalldread.'" /></a>';
|
||||
echo '</span>';
|
||||
} else {
|
||||
@@ -4483,41 +4483,55 @@ function forum_add_new_post($post, $mform, &$message) {
|
||||
* @global object
|
||||
* @global object
|
||||
* @global object
|
||||
* @param object $post
|
||||
* @param object $newpost
|
||||
* @param mixed $mform
|
||||
* @param string $message
|
||||
* @return bool
|
||||
*/
|
||||
function forum_update_post($post, $mform, &$message) {
|
||||
function forum_update_post($newpost, $mform, &$message) {
|
||||
global $USER, $CFG, $DB;
|
||||
|
||||
$post = $DB->get_record('forum_posts', array('id' => $newpost->id));
|
||||
$discussion = $DB->get_record('forum_discussions', array('id' => $post->discussion));
|
||||
$forum = $DB->get_record('forum', array('id' => $discussion->forum));
|
||||
$cm = get_coursemodule_from_instance('forum', $forum->id);
|
||||
$context = context_module::instance($cm->id);
|
||||
|
||||
// Allowed modifiable fields.
|
||||
$modifiablefields = [
|
||||
'subject',
|
||||
'message',
|
||||
'messageformat',
|
||||
'messagetrust',
|
||||
'timestart',
|
||||
'timeend',
|
||||
'attachments',
|
||||
];
|
||||
foreach ($modifiablefields as $field) {
|
||||
if (isset($newpost->{$field})) {
|
||||
$post->{$field} = $newpost->{$field};
|
||||
}
|
||||
}
|
||||
$post->modified = time();
|
||||
|
||||
$DB->update_record('forum_posts', $post);
|
||||
|
||||
$discussion->timemodified = $post->modified; // last modified tracking
|
||||
$discussion->usermodified = $post->userid; // last modified tracking
|
||||
// Last post modified tracking.
|
||||
$discussion->timemodified = $post->modified;
|
||||
$discussion->usermodified = $USER->id;
|
||||
|
||||
if (!$post->parent) { // Post is a discussion starter - update discussion title and times too
|
||||
$discussion->name = $post->subject;
|
||||
$discussion->timestart = $post->timestart;
|
||||
$discussion->timeend = $post->timeend;
|
||||
}
|
||||
$post->message = file_save_draft_area_files($post->itemid, $context->id, 'mod_forum', 'post', $post->id,
|
||||
$post->message = file_save_draft_area_files($newpost->itemid, $context->id, 'mod_forum', 'post', $post->id,
|
||||
mod_forum_post_form::editor_options($context, $post->id), $post->message);
|
||||
$DB->set_field('forum_posts', 'message', $post->message, array('id'=>$post->id));
|
||||
|
||||
$DB->update_record('forum_posts', $post);
|
||||
$DB->update_record('forum_discussions', $discussion);
|
||||
|
||||
forum_add_attachment($post, $forum, $cm, $mform, $message);
|
||||
|
||||
if (forum_tp_can_track_forums($forum) && forum_tp_is_tracked($forum)) {
|
||||
forum_tp_mark_post_read($post->userid, $post, $post->forum);
|
||||
forum_tp_mark_post_read($USER->id, $post, $post->forum);
|
||||
}
|
||||
|
||||
// Let Moodle know that assessable content is uploaded (eg for plagiarism detection)
|
||||
@@ -5824,7 +5838,7 @@ function forum_print_latest_discussions($course, $forum, $maxdiscussions=-1, $di
|
||||
if ($forumtracked) {
|
||||
echo '<a title="'.get_string('markallread', 'forum').
|
||||
'" href="'.$CFG->wwwroot.'/mod/forum/markposts.php?f='.
|
||||
$forum->id.'&mark=read&returnpage=view.php">'.
|
||||
$forum->id.'&mark=read&returnpage=view.php&sesskey=' . sesskey() . '">'.
|
||||
'<img src="'.$OUTPUT->pix_url('t/markasread') . '" class="iconsmall" alt="'.get_string('markallread', 'forum').'" /></a>';
|
||||
}
|
||||
echo '</th>';
|
||||
|
||||
@@ -55,6 +55,7 @@ if (!$cm = get_coursemodule_from_instance("forum", $forum->id, $course->id)) {
|
||||
$user = $USER;
|
||||
|
||||
require_login($course, false, $cm);
|
||||
require_sesskey();
|
||||
|
||||
if ($returnpage == 'index.php') {
|
||||
$returnto = forum_go_back_to($returnpage.'?id='.$course->id);
|
||||
|
||||
@@ -23,6 +23,7 @@ function scorm_openpopup(url,name,options,width,height) {
|
||||
options += ",width="+width+",height="+height;
|
||||
|
||||
windowobj = window.open(url,name,options);
|
||||
windowobj.opener = null;
|
||||
if (!windowobj) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ M.mod_scormform.init = function(Y) {
|
||||
winobj = window.open(launch_url,'Popup', poptions);
|
||||
this.target='Popup';
|
||||
scormredirect(winobj);
|
||||
winobj.opener = null;
|
||||
}
|
||||
// Listen for view form submit and generate popup on user interaction.
|
||||
if (scormform) {
|
||||
@@ -91,6 +92,7 @@ M.mod_scormform.init = function(Y) {
|
||||
winobj = window.open(launch_url, 'Popup', poptions);
|
||||
this.target='Popup';
|
||||
scormredirect(winobj);
|
||||
winobj.opener = null;
|
||||
e.preventDefault();
|
||||
}, scormform);
|
||||
}
|
||||
|
||||
+3
-2
@@ -132,12 +132,13 @@ if ($courseid != SITEID) {
|
||||
$ccontext = context_course::instance($c->id);
|
||||
$cfullname = format_string($c->fullname, true, array('context' => $ccontext));
|
||||
$header = '<a href="' . $CFG->wwwroot . '/course/view.php?id=' . $c->id . '">' . $cfullname . '</a>';
|
||||
if (has_capability('moodle/notes:manage', context_course::instance($c->id))) {
|
||||
$viewcoursenotes = has_capability('moodle/notes:view', $ccontext);
|
||||
if (has_capability('moodle/notes:manage', $ccontext)) {
|
||||
$addid = $c->id;
|
||||
} else {
|
||||
$addid = 0;
|
||||
}
|
||||
note_print_notes($header, $addid, $view, $c->id, $userid, NOTES_STATE_PUBLIC, 0);
|
||||
note_print_notes($header, $addid, $viewcoursenotes, $c->id, $userid, NOTES_STATE_PUBLIC, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ class qtype_essay_question extends question_with_responses {
|
||||
return $this->responseformat === 'editorfilepicker';
|
||||
|
||||
} else if ($component == 'qtype_essay' && $filearea == 'graderinfo') {
|
||||
return $options->manualcomment;
|
||||
return $options->manualcomment && $args[0] == $this->id;
|
||||
|
||||
} else {
|
||||
return parent::check_file_access($qa, $options, $component,
|
||||
|
||||
@@ -413,11 +413,11 @@ abstract class question_definition {
|
||||
*/
|
||||
public function check_file_access($qa, $options, $component, $filearea, $args, $forcedownload) {
|
||||
if ($component == 'question' && $filearea == 'questiontext') {
|
||||
// Question text always visible.
|
||||
return true;
|
||||
// Question text always visible, but check it is the right question id.
|
||||
return $args[0] == $this->id;
|
||||
|
||||
} else if ($component == 'question' && $filearea == 'generalfeedback') {
|
||||
return $options->generalfeedback;
|
||||
return $options->generalfeedback && $args[0] == $this->id;
|
||||
|
||||
} else {
|
||||
// Unrecognised component or filearea.
|
||||
@@ -681,7 +681,8 @@ abstract class question_graded_automatically extends question_with_responses
|
||||
list($notused, $state) = $this->grade_response($response);
|
||||
}
|
||||
|
||||
return $options->feedback && $state->get_feedback_class() . 'feedback' == $filearea;
|
||||
return $options->feedback && $state->get_feedback_class() . 'feedback' == $filearea &&
|
||||
$args[0] == $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+15
-3
@@ -132,6 +132,9 @@ class user_edit_form extends moodleform {
|
||||
// Disable fields that are locked by auth plugins.
|
||||
$fields = get_user_fieldnames();
|
||||
$authplugin = get_auth_plugin($user->auth);
|
||||
$customfields = $authplugin->get_custom_user_profile_fields();
|
||||
$customfieldsdata = profile_user_record($userid, false);
|
||||
$fields = array_merge($fields, $customfields);
|
||||
foreach ($fields as $field) {
|
||||
if ($field === 'description') {
|
||||
// Hard coded hack for description field. See MDL-37704 for details.
|
||||
@@ -142,14 +145,23 @@ class user_edit_form extends moodleform {
|
||||
if (!$mform->elementExists($formfield)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Get the original value for the field.
|
||||
if (in_array($field, $customfields)) {
|
||||
$key = str_replace('profile_field_', '', $field);
|
||||
$value = isset($customfieldsdata->{$key}) ? $customfieldsdata->{$key} : '';
|
||||
} else {
|
||||
$value = $user->{$field};
|
||||
}
|
||||
|
||||
$configvariable = 'field_lock_' . $field;
|
||||
if (isset($authplugin->config->{$configvariable})) {
|
||||
if ($authplugin->config->{$configvariable} === 'locked') {
|
||||
$mform->hardFreeze($formfield);
|
||||
$mform->setConstant($formfield, $user->$field);
|
||||
} else if ($authplugin->config->{$configvariable} === 'unlockedifempty' and $user->$field != '') {
|
||||
$mform->setConstant($formfield, $value);
|
||||
} else if ($authplugin->config->{$configvariable} === 'unlockedifempty' and $value != '') {
|
||||
$mform->hardFreeze($formfield);
|
||||
$mform->setConstant($formfield, $user->$field);
|
||||
$mform->setConstant($formfield, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+13
-1
@@ -389,7 +389,7 @@ class core_user_external extends external_api {
|
||||
* @since Moodle 2.2
|
||||
*/
|
||||
public static function update_users($users) {
|
||||
global $CFG, $DB;
|
||||
global $CFG, $DB, $USER;
|
||||
require_once($CFG->dirroot."/user/lib.php");
|
||||
require_once($CFG->dirroot."/user/profile/lib.php"); // Required for customfields related function.
|
||||
|
||||
@@ -403,6 +403,18 @@ class core_user_external extends external_api {
|
||||
$transaction = $DB->start_delegated_transaction();
|
||||
|
||||
foreach ($params['users'] as $user) {
|
||||
// First check the user exists.
|
||||
if (!$existinguser = core_user::get_user($user['id'])) {
|
||||
continue;
|
||||
}
|
||||
// Check if we are trying to update an admin.
|
||||
if ($existinguser->id != $USER->id and is_siteadmin($existinguser) and !is_siteadmin($USER)) {
|
||||
continue;
|
||||
}
|
||||
// Other checks (deleted, remote or guest users).
|
||||
if ($existinguser->deleted or is_mnet_remote_user($existinguser) or isguestuser($existinguser->id)) {
|
||||
continue;
|
||||
}
|
||||
user_update_user($user, true, false);
|
||||
// Update user custom fields.
|
||||
if (!empty($user['customfields'])) {
|
||||
|
||||
@@ -551,9 +551,10 @@ function profile_signup_fields($mform) {
|
||||
/**
|
||||
* Returns an object with the custom profile fields set for the given user
|
||||
* @param integer $userid
|
||||
* @param bool $onlyinuserobject True if you only want the ones in $USER.
|
||||
* @return stdClass
|
||||
*/
|
||||
function profile_user_record($userid) {
|
||||
function profile_user_record($userid, $onlyinuserobject = true) {
|
||||
global $CFG, $DB;
|
||||
|
||||
$usercustomfields = new stdClass();
|
||||
@@ -563,7 +564,7 @@ function profile_user_record($userid) {
|
||||
require_once($CFG->dirroot.'/user/profile/field/'.$field->datatype.'/field.class.php');
|
||||
$newfield = 'profile_field_'.$field->datatype;
|
||||
$formfield = new $newfield($field->id, $userid);
|
||||
if ($formfield->is_user_object_data()) {
|
||||
if (!$onlyinuserobject || $formfield->is_user_object_data()) {
|
||||
$usercustomfields->{$field->shortname} = $formfield->data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -663,8 +663,26 @@ class core_user_externallib_testcase extends externallib_advanced_testcase {
|
||||
$context = context_system::instance();
|
||||
$roleid = $this->assignUserCapability('moodle/user:update', $context->id);
|
||||
|
||||
// Check we can't update deleted users, guest users, site admin.
|
||||
$user2 = $user3 = $user4 = $user1;
|
||||
$user2['id'] = $CFG->siteguest;
|
||||
|
||||
$siteadmins = explode(',', $CFG->siteadmins);
|
||||
$user3['id'] = array_shift($siteadmins);
|
||||
|
||||
$userdeleted = self::getDataGenerator()->create_user();
|
||||
$user4['id'] = $userdeleted->id;
|
||||
user_delete_user($userdeleted);
|
||||
|
||||
// Call the external function.
|
||||
core_user_external::update_users(array($user1));
|
||||
core_user_external::update_users(array($user1, $user2, $user3, $user4));
|
||||
|
||||
$dbuser2 = $DB->get_record('user', array('id' => $user2['id']));
|
||||
$this->assertNotEquals($dbuser2->username, $user2['username']);
|
||||
$dbuser3 = $DB->get_record('user', array('id' => $user3['id']));
|
||||
$this->assertNotEquals($dbuser3->username, $user3['username']);
|
||||
$dbuser4 = $DB->get_record('user', array('id' => $user4['id']));
|
||||
$this->assertNotEquals($dbuser4->username, $user4['username']);
|
||||
|
||||
$dbuser = $DB->get_record('user', array('id' => $user1['id']));
|
||||
$this->assertEquals($dbuser->username, $user1['username']);
|
||||
|
||||
@@ -62,6 +62,9 @@ class core_user_profilelib_testcase extends advanced_testcase {
|
||||
// Check that profile_user_record returns same (no) fields.
|
||||
$this->assertObjectNotHasAttribute('frogdesc', profile_user_record($user->id));
|
||||
|
||||
// Check that profile_user_record returns all the fields when requested.
|
||||
$this->assertObjectHasAttribute('frogdesc', profile_user_record($user->id, false));
|
||||
|
||||
// Add another custom field, this time of normal text type.
|
||||
$id2 = $DB->insert_record('user_info_field', array(
|
||||
'shortname' => 'frogname', 'name' => 'Name of frog', 'categoryid' => 1,
|
||||
@@ -77,6 +80,9 @@ class core_user_profilelib_testcase extends advanced_testcase {
|
||||
|
||||
// Check profile_user_record returns same field.
|
||||
$this->assertObjectHasAttribute('frogname', profile_user_record($user->id));
|
||||
|
||||
// Check that profile_user_record returns all the fields when requested.
|
||||
$this->assertObjectHasAttribute('frogname', profile_user_record($user->id, false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -29,11 +29,11 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$version = 2014051213.00; // 20140512 = branching date YYYYMMDD - do not modify!
|
||||
$version = 2014051218.00; // 20140512 = branching date YYYYMMDD - do not modify!
|
||||
// RR = release increments - 00 in DEV branches.
|
||||
// .XX = incremental changes.
|
||||
|
||||
$release = '2.7.13 (Build: 20160314)'; // Human-friendly version name
|
||||
$release = '2.7.18 (Build: 20170109)'; // Human-friendly version name
|
||||
|
||||
$branch = '27'; // This version's branch.
|
||||
$maturity = MATURITY_STABLE; // This version's maturity level.
|
||||
|
||||
@@ -421,6 +421,16 @@ class webservice {
|
||||
$DB->delete_records('external_tokens', array('id'=>$tokenid));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all the tokens belonging to a user.
|
||||
*
|
||||
* @param int $userid the user id whose tokens must be deleted
|
||||
*/
|
||||
public static function delete_user_ws_tokens($userid) {
|
||||
global $DB;
|
||||
$DB->delete_records('external_tokens', array('userid' => $userid));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a service
|
||||
* Also delete function references and authorised user references.
|
||||
|
||||
Reference in New Issue
Block a user