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