Compare commits
327 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2b3dbc7ee9 | |||
| 23a6a67140 | |||
| 30b9d52d78 | |||
| 08f68a7d2f | |||
| 53cd3c286e | |||
| ab8c8a8f92 | |||
| d1bed0abc3 | |||
| 1b82a6fb65 | |||
| 235ec73c0f | |||
| c978929e36 | |||
| bf99ef166f | |||
| 992d263ac5 | |||
| 03d17744ea | |||
| d86ad06b6e | |||
| 62c2b3d818 | |||
| 341ad08669 | |||
| 1be0790e01 | |||
| c4669ce618 | |||
| e3071745bb | |||
| 78602c3fab | |||
| 025ca6f7d3 | |||
| 5b8bfd14a8 | |||
| b3ddb0951f | |||
| 47ae6d3fc9 | |||
| d46929e4e3 | |||
| 70a5dda65a | |||
| cbfb767fb5 | |||
| d16d4761d4 | |||
| 3e8532dadc | |||
| 9cbc51937a | |||
| 5a83ba350d | |||
| 3339623dc0 | |||
| bfea3bf351 | |||
| fdd57e090e | |||
| e262ca4250 | |||
| 853d6d008f | |||
| 3fd59e3674 | |||
| 1367a13c88 | |||
| a9e4129829 | |||
| f47b2e4a24 | |||
| e8a8691a10 | |||
| f9442b3eba | |||
| 02017cb9f3 | |||
| 306b782436 | |||
| 4f7ec41692 | |||
| 4274f4d003 | |||
| 18da8c03e0 | |||
| 9787d3a9b5 | |||
| a70978a2bd | |||
| 61f0581a02 | |||
| 4f6f0026e0 | |||
| 279fe97bd2 | |||
| e16c434140 | |||
| 4c8582b8c0 | |||
| b277186a4e | |||
| d258956c4a | |||
| a6e0e0bf9a | |||
| a04cf7d76e | |||
| 0be66059a2 | |||
| 6dc38156a2 | |||
| 15b3f43326 | |||
| 5559703a23 | |||
| 51e28ed8d7 | |||
| f767e4b066 | |||
| 864a95aab3 | |||
| 2407b73f18 | |||
| c8be58152e | |||
| 17a826bf54 | |||
| 67ba0081ba | |||
| a9c7672efa | |||
| f415f6f84b | |||
| 91b1c5c22e | |||
| b53ec9de13 | |||
| 8c89ce5f65 | |||
| d0d121acb7 | |||
| 10c3c372b9 | |||
| b06c8fdd9c | |||
| 62e1fab324 | |||
| 8c26d6db93 | |||
| 4a1cf2aa17 | |||
| 91a307c918 | |||
| 656216af37 | |||
| 9151d6994a | |||
| d3eb32a44e | |||
| 00f581ca28 | |||
| a407d10f1e | |||
| d44a43190a | |||
| 01fc1376f5 | |||
| c36c0ccc1e | |||
| d270f6c22d | |||
| cecd632a8a | |||
| 991eb4f6d0 | |||
| 83c45d6304 | |||
| 4e2c620700 | |||
| 7df065ce28 | |||
| e4ce1be4b5 | |||
| e2398ac290 | |||
| e0b2c13e04 | |||
| 55c4569bda | |||
| cdd2e30a37 | |||
| bd404c8e90 | |||
| 02fa7996c8 | |||
| f4b03cf8e2 | |||
| f5916ab5af | |||
| 8362d3b35f | |||
| f06b2de39e | |||
| 45ef5c8e73 | |||
| e09d4fcb8c | |||
| a884d3a618 | |||
| 78a00990b6 | |||
| 61560ab45a | |||
| cc6b32b227 | |||
| ffc1f310af | |||
| f910245bfd | |||
| 407a7bd6a9 | |||
| 2f0b51b9f4 | |||
| 9ed6d76f12 | |||
| c5833d278c | |||
| fb6f1a4d79 | |||
| 43e26415eb | |||
| aff7cb703a | |||
| 827dd36f48 | |||
| 4496dcc631 | |||
| 1bffd70569 | |||
| 8f8933231c | |||
| 550f7760a8 | |||
| d60c0e9650 | |||
| 6d4386a6db | |||
| b562dfba48 | |||
| 71daa4a6d6 | |||
| 0766ae0049 | |||
| c11496e22d | |||
| ac78fb7625 | |||
| 4f012c5e58 | |||
| 5467e70128 | |||
| d2cdddff77 | |||
| 2645ca05d8 | |||
| 1ef6a07c09 | |||
| a8ce9071c2 | |||
| 7f13fc063c | |||
| 2ecbeeda93 | |||
| 371e7264d1 | |||
| 04c1d5a342 | |||
| faaa97b415 | |||
| 32d5bad1e1 | |||
| a3a630251b | |||
| 8b3818d97b | |||
| d06a987343 | |||
| 49e4881bff | |||
| 1c61cadaaf | |||
| 5d07f6e84f | |||
| bd465e3917 | |||
| 6d4d29137c | |||
| 221309802a | |||
| bc7088d881 | |||
| 2bfd174b06 | |||
| 6b8e97b017 | |||
| a284ccfdba | |||
| b5f0654fd2 | |||
| f187922695 | |||
| 0f8f88e7f0 | |||
| 73e4647509 | |||
| a028dd0ff1 | |||
| 9956462ee4 | |||
| 34ab1dd7b1 | |||
| e412ca95b4 | |||
| f3493f8a78 | |||
| 395354cfe0 | |||
| 9b112d78bc | |||
| 086a156564 | |||
| d5cb1a4096 | |||
| 4fd7c545cc | |||
| 60bbf98971 | |||
| 7697512a90 | |||
| 1950fefc99 | |||
| ab6a0f497b | |||
| de165bab23 | |||
| 10a75e713b | |||
| 6bff753746 | |||
| 74329146af | |||
| 237897b968 | |||
| 8c39dfb9ba | |||
| 54e95b2d33 | |||
| e1f24eb46e | |||
| 6d84d37b91 | |||
| eead9917a5 | |||
| daa3fe0ab6 | |||
| 7b18f18a1e | |||
| 7dc9febe19 | |||
| 5a930d13fd | |||
| 735280b159 | |||
| 0295ae4ee7 | |||
| db46eddf41 | |||
| db6d764fe2 | |||
| f3872e7b42 | |||
| e65f54f289 | |||
| c5575c63b8 | |||
| d935a6fd68 | |||
| dde080fb66 | |||
| 1e1d19d477 | |||
| 2acaf9cfee | |||
| 55cab152a4 | |||
| 57264882c7 | |||
| b244e7da9e | |||
| 414568e144 | |||
| d122b47456 | |||
| 1b00f61d87 | |||
| 7062b887db | |||
| 71919db800 | |||
| 5f0341a76b | |||
| 1d439b59e4 | |||
| 22d38f8b2e | |||
| b37dc152c2 | |||
| 370cb335b1 | |||
| c5a5eed7f9 | |||
| 74d4c9e631 | |||
| e3d0ad1683 | |||
| 3b9ed3037f | |||
| c5bc14690f | |||
| 782a1b4633 | |||
| 7fa1f180d6 | |||
| 3900516886 | |||
| d2621a28f5 | |||
| 92238a4408 | |||
| dd7946d997 | |||
| d1d4c85edc | |||
| 89001dfb54 | |||
| 039399e66f | |||
| 28f6aa743f | |||
| f3d73474fe | |||
| 98f282f680 | |||
| 970f23ad5c | |||
| 909c277796 | |||
| f9a85712d5 | |||
| 8dd5f4f086 | |||
| 601071fb10 | |||
| b4e47dbb93 | |||
| bae9b4c866 | |||
| 64fed39c7c | |||
| c43fe7f71e | |||
| 8ed9c72991 | |||
| 9559ed75c3 | |||
| 8f93c4084f | |||
| b8bf75156f | |||
| 07b3331b59 | |||
| 8e5440c9fc | |||
| 32bdbf913b | |||
| d875f8605e | |||
| a6e1cc12c8 | |||
| 3b4f791ba0 | |||
| 35cc173d46 | |||
| 53b1a1ecb2 | |||
| 9facd25c14 | |||
| 3a9cbdc72a | |||
| 10964239be | |||
| cfaf6a18b9 | |||
| f0cbaa1c19 | |||
| 64346429fe | |||
| 2f861c915b | |||
| 30bdc936fd | |||
| 3b79304ba5 | |||
| afc54475a8 | |||
| 14e497c06e | |||
| 4818668672 | |||
| 4db36990ee | |||
| 62a22d5b9a | |||
| ba15c14fee | |||
| ee7a9058a0 | |||
| 0089ebaaa9 | |||
| 04ec524d74 | |||
| b7367b9638 | |||
| 0686d3dc4c | |||
| b252a84543 | |||
| 7f2d81c7b6 | |||
| ab6c91d42a | |||
| b95d2cc35e | |||
| 63c4c85eff | |||
| 8b662ca83f | |||
| ccbf68066b | |||
| 4340e2faac | |||
| 1db9d1e7ec | |||
| 22f55d840c | |||
| 2b9782fdd0 | |||
| 0f43c24385 | |||
| b818dfc2d7 | |||
| 686723f4fa | |||
| 5f48905520 | |||
| 86e2c59128 | |||
| 94ff6cf6fb | |||
| f50e16d07e | |||
| 1c3d93d3ca | |||
| a8a779115c | |||
| 4eca916b5f | |||
| 694c861e81 | |||
| fa7298ed7f | |||
| 03cc152087 | |||
| 6c27894dd2 | |||
| 057d68fc2e | |||
| 1aac11d74d | |||
| 2532c36ea3 | |||
| 6bf9b6a996 | |||
| 9405709c55 | |||
| 94e2c182fa | |||
| b216fc392f | |||
| cb69b471bd | |||
| d184770c60 | |||
| 8eb614d4bb | |||
| 47ad6d600d | |||
| b9b2d11960 | |||
| 5da3e35ed3 | |||
| e08b39e0b4 | |||
| 3e0f93136f | |||
| a29aca57ee | |||
| 2fcb88838f | |||
| 879c7655f2 | |||
| 1d9a7b68f7 | |||
| 4df3274355 | |||
| 88c5506d1b | |||
| e8cfd996f0 | |||
| 395f285f91 | |||
| b8b00afaf3 | |||
| 79d375eeba | |||
| b04ba37864 | |||
| a30912967c | |||
| 1ca2bdc0c8 | |||
| 7f649757b5 | |||
| 6a5e3c1d9d |
+1
-1
@@ -374,7 +374,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
$copyrighttext = '<a href="http://moodle.org/">Moodle</a> '.
|
||||
'<a href="http://docs.moodle.org/dev/Releases" title="'.$CFG->version.'">'.$CFG->release.'</a><br />'.
|
||||
'Copyright © 1999 onwards, Martin Dougiamas<br />'.
|
||||
'and <a href="http://docs.moodle.org/dev/Credits">many other contributors</a>.<br />'.
|
||||
'and <a href="http://moodle.org/dev">many other contributors</a>.<br />'.
|
||||
'<a href="http://docs.moodle.org/dev/License">GNU Public License</a>';
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -35,10 +35,11 @@ if ($hassiteconfig
|
||||
$temp->add(new admin_setting_configselect('moodlecourse/showgrades', get_string('showgrades'), get_string('coursehelpshowgrades'), 1,array(0 => get_string('no'), 1 => get_string('yes'))));
|
||||
$temp->add(new admin_setting_configselect('moodlecourse/showreports', get_string('showreports'), '', 0,array(0 => get_string('no'), 1 => get_string('yes'))));
|
||||
|
||||
$currentmaxbytes = get_config('moodlecourse', 'maxbytes');
|
||||
if (isset($CFG->maxbytes)) {
|
||||
$choices = get_max_upload_sizes($CFG->maxbytes);
|
||||
$choices = get_max_upload_sizes($CFG->maxbytes, 0, 0, $currentmaxbytes);
|
||||
} else {
|
||||
$choices = get_max_upload_sizes();
|
||||
$choices = get_max_upload_sizes(0, 0, 0, $currentmaxbytes);
|
||||
}
|
||||
$temp->add(new admin_setting_configselect('moodlecourse/maxbytes', get_string('maximumupload'), get_string('coursehelpmaximumupload'), key($choices), $choices));
|
||||
|
||||
|
||||
@@ -150,6 +150,7 @@ if ($hassiteconfig
|
||||
'institution' => get_string('institution'),
|
||||
)));
|
||||
$temp->add(new admin_setting_configcheckbox('enablegravatar', get_string('enablegravatar', 'admin'), get_string('enablegravatar_help', 'admin'), 0));
|
||||
$temp->add(new admin_setting_configtext('gravatardefaulturl', get_string('gravatardefaulturl', 'admin'), get_string('gravatardefaulturl_help', 'admin'), 'mm'));
|
||||
}
|
||||
|
||||
$ADMIN->add('roles', $temp);
|
||||
|
||||
@@ -488,7 +488,7 @@ class tool_customlang_translator implements renderable {
|
||||
list($insql, $inparams) = $DB->get_in_or_equal($filter->component, SQL_PARAMS_NAMED);
|
||||
|
||||
$csql = "SELECT COUNT(*)";
|
||||
$fsql = "SELECT s.id, s.*, c.name AS component";
|
||||
$fsql = "SELECT s.*, c.name AS component";
|
||||
$sql = " FROM {tool_customlang_components} c
|
||||
JOIN {tool_customlang} s ON s.componentid = c.id
|
||||
WHERE s.lang = :lang
|
||||
|
||||
@@ -67,3 +67,7 @@
|
||||
#page-admin-tool-customlang-index .continuebutton {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.path-admin-tool-customlang #translator .standard.master.cell.c2 {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
@@ -112,10 +112,13 @@ $string['checkindexes'] = 'Check indexes';
|
||||
$string['check_indexes'] = 'Look for missing DB indexes';
|
||||
$string['checkoraclesemantics'] = 'Check semantics';
|
||||
$string['check_oracle_semantics'] = 'Look for incorrect length semantics';
|
||||
$string['duplicateindexname'] = 'Duplicate index name';
|
||||
$string['incorrectfieldname'] = 'Incorrect name';
|
||||
$string['index'] = 'Index';
|
||||
$string['indexes'] = 'Indexes';
|
||||
$string['indexnameempty'] = 'Index name is empty';
|
||||
$string['integerincorrectlength'] = 'Incorrect length for integer field';
|
||||
$string['incorrectindexname'] = 'Incorrect index name';
|
||||
$string['incorrectkeyname'] = 'Incorrect key name';
|
||||
$string['incorrecttablename'] = 'Incorrect table name';
|
||||
$string['key'] = 'Key';
|
||||
|
||||
@@ -97,7 +97,7 @@ $usersmissingcaps = $webservicemanager->get_missing_capabilities_by_users($allow
|
||||
|
||||
//add the missing capabilities to the allowed users object to be displayed by renderer
|
||||
foreach ($allowedusers as &$alloweduser) {
|
||||
if (!is_siteadmin($alloweduser->id) and key_exists($alloweduser->id, $usersmissingcaps)) {
|
||||
if (!is_siteadmin($alloweduser->id) and array_key_exists($alloweduser->id, $usersmissingcaps)) {
|
||||
$alloweduser->missingcapabilities = implode(', ', $usersmissingcaps[$alloweduser->id]);
|
||||
}
|
||||
}
|
||||
|
||||
+21
-7
@@ -65,7 +65,7 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
$authdb->Close();
|
||||
// user exists externally
|
||||
// check username/password internally
|
||||
if ($user = $DB->get_record('user', array('username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id))) {
|
||||
if ($user = $DB->get_record('user', array('username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id, 'auth'=>$this->authtype))) {
|
||||
return validate_internal_user_password($user, $password);
|
||||
}
|
||||
} else {
|
||||
@@ -191,8 +191,16 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
* @return bool True on success
|
||||
*/
|
||||
function user_update_password($user, $newpassword) {
|
||||
global $DB;
|
||||
|
||||
if ($this->is_internal()) {
|
||||
return update_internal_user_password($user, $newpassword);
|
||||
$puser = $DB->get_record('user', array('id'=>$user->id), '*', MUST_EXIST);
|
||||
if (update_internal_user_password($puser, $newpassword)) {
|
||||
$user->password = $puser->password;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// we should have never been called!
|
||||
return false;
|
||||
@@ -346,7 +354,7 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
if ($verbose) {
|
||||
mtrace(get_string('auth_dbuserstoadd','auth_db',count($add_users)));
|
||||
}
|
||||
$transaction = $DB->start_delegated_transaction();
|
||||
// Do not use transactions around this foreach, we want to skip problematic users, not revert everything.
|
||||
foreach($add_users as $user) {
|
||||
$username = $user;
|
||||
$user = $this->get_userinfo_asobj($user);
|
||||
@@ -372,9 +380,16 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
} else {
|
||||
$user->timecreated = time();
|
||||
$user->timemodified = $user->timecreated;
|
||||
$id = $DB->insert_record ('user', $user); // it is truly a new user
|
||||
if ($verbose) {
|
||||
mtrace("\t".get_string('auth_dbinsertuser', 'auth_db', array('name'=>$user->username, 'id'=>$id)));
|
||||
try {
|
||||
$id = $DB->insert_record('user', $user); // it is truly a new user
|
||||
if ($verbose) {
|
||||
mtrace("\t".get_string('auth_dbinsertuser', 'auth_db', array('name'=>$user->username, 'id'=>$id)));
|
||||
}
|
||||
} catch (moodle_exception $e) {
|
||||
if ($verbose) {
|
||||
mtrace("\t".get_string('auth_dbinsertusererror', 'auth_db', $user->username));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// if relevant, tag for password generation
|
||||
if ($this->is_internal()) {
|
||||
@@ -383,7 +398,6 @@ class auth_plugin_db extends auth_plugin_base {
|
||||
}
|
||||
}
|
||||
}
|
||||
$transaction->allow_commit();
|
||||
unset($add_users); // free mem
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
// Check whether Shibboleth is configured properly
|
||||
if (empty($pluginconfig->user_attribute)) {
|
||||
print_error('shib_not_set_up_error', 'auth');
|
||||
print_error('shib_not_set_up_error', 'auth_shibboleth');
|
||||
}
|
||||
|
||||
/// If we can find the Shibboleth attribute, save it in session and return to main login page
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
/// Check if the user has actually submitted login data to us
|
||||
|
||||
if ($shibbolethauth->user_login($frm->username, $frm->password)) {
|
||||
if ($shibbolethauth->user_login($frm->username, $frm->password)
|
||||
&& $user = authenticate_user_login($frm->username, $frm->password)) {
|
||||
|
||||
$user = authenticate_user_login($frm->username, $frm->password);
|
||||
enrol_check_plugins($user);
|
||||
session_set_user($user);
|
||||
|
||||
@@ -83,16 +83,17 @@
|
||||
}
|
||||
|
||||
else {
|
||||
// For some weird reason the Shibboleth user couldn't be authenticated
|
||||
// The Shibboleth user couldn't be mapped to a valid Moodle user
|
||||
print_error('shib_invalid_account_error', 'auth_shibboleth');
|
||||
}
|
||||
}
|
||||
|
||||
// If we can find any (user independent) Shibboleth attributes but no user
|
||||
// attributes we probably didn't receive any user attributes
|
||||
elseif (!empty($_SERVER['HTTP_SHIB_APPLICATION_ID']) || !empty($_SERVER['Shib-Application-ID'])) {
|
||||
print_error('shib_no_attributes_error', 'auth' , '', '\''.$pluginconfig->user_attribute.'\', \''.$pluginconfig->field_map_firstname.'\', \''.$pluginconfig->field_map_lastname.'\' and \''.$pluginconfig->field_map_email.'\'');
|
||||
print_error('shib_no_attributes_error', 'auth_shibboleth' , '', '\''.$pluginconfig->user_attribute.'\', \''.$pluginconfig->field_map_firstname.'\', \''.$pluginconfig->field_map_lastname.'\' and \''.$pluginconfig->field_map_email.'\'');
|
||||
} else {
|
||||
print_error('shib_not_set_up_error', 'auth');
|
||||
print_error('shib_not_set_up_error', 'auth_shibboleth');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ $string['auth_shib_no_organizations_warning'] = 'If you want to use the integrat
|
||||
$string['auth_shib_only'] = 'Shibboleth only';
|
||||
$string['auth_shib_only_description'] = 'Check this option if a Shibboleth authentication shall be enforced';
|
||||
$string['auth_shib_username_description'] = 'Name of the webserver Shibboleth environment variable that shall be used as Moodle username';
|
||||
$string['shib_invalid_account_error'] = 'You seem to be Shibboleth authenticated but Moodle has no valid account for your username. Your account may not exist or it may have been suspended.';
|
||||
$string['shib_no_attributes_error'] = 'You seem to be Shibboleth authenticated but Moodle didn\'t receive any user attributes. Please check that your Identity Provider releases the necessary attributes ({$a}) to the Service Provider Moodle is running on or inform the webmaster of this server.';
|
||||
$string['shib_not_all_attributes_error'] = 'Moodle needs certain Shibboleth attributes which are not present in your case. The attributes are: {$a}<br />Please contact the webmaster of this server or your Identity Provider.';
|
||||
$string['shib_not_set_up_error'] = 'Shibboleth authentication doesn\'t seem to be set up correctly because no Shibboleth environment variables are present for this page. Please consult the <a href="README.txt">README</a> for further instructions on how to set up Shibboleth authentication or contact the webmaster of this Moodle installation.';
|
||||
|
||||
@@ -149,6 +149,22 @@ abstract class restore_qtype_plugin extends restore_plugin {
|
||||
AND ' . $DB->sql_compare_text('answer', 255) . ' = ' . $DB->sql_compare_text('?', 255);
|
||||
$params = array($newquestionid, $data->answertext);
|
||||
$newitemid = $DB->get_field_sql($sql, $params);
|
||||
|
||||
// Not able to find the answer, let's try cleaning the answertext
|
||||
// of all the question answers in DB as slower fallback. MDL-30018.
|
||||
if (!$newitemid) {
|
||||
$params = array('question' => $newquestionid);
|
||||
$answers = $DB->get_records('question_answers', $params, '', 'id, answer');
|
||||
foreach ($answers as $answer) {
|
||||
// Clean in the same way than {@link xml_writer::xml_safe_utf8()}.
|
||||
$clean = preg_replace('/[\x-\x8\xb-\xc\xe-\x1f\x7f]/is','', $answer->answer); // Clean CTRL chars.
|
||||
$clean = preg_replace("/\r\n|\r/", "\n", $clean); // Normalize line ending.
|
||||
if ($clean === $data->answertext) {
|
||||
$newitemid = $data->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we haven't found the newitemid, something has gone really wrong, question in DB
|
||||
// is missing answers, exception
|
||||
if (!$newitemid) {
|
||||
|
||||
@@ -1302,7 +1302,8 @@ abstract class restore_dbops {
|
||||
}
|
||||
$currentfullname = $fullname.$suffixfull;
|
||||
$currentshortname = substr($shortname, 0, 100 - strlen($suffixshort)).$suffixshort; // < 100cc
|
||||
$coursefull = $DB->get_record_select('course', 'fullname = ? AND id != ?', array($currentfullname, $courseid));
|
||||
$coursefull = $DB->get_record_select('course', 'fullname = ? AND id != ?',
|
||||
array($currentfullname, $courseid), '*', IGNORE_MULTIPLE);
|
||||
$courseshort = $DB->get_record_select('course', 'shortname = ? AND id != ?', array($currentshortname, $courseid));
|
||||
$counter++;
|
||||
} while ($coursefull || $courseshort);
|
||||
|
||||
@@ -140,7 +140,7 @@ class community_hub_search_form extends moodleform {
|
||||
$options = array();
|
||||
$firsthub = false;
|
||||
foreach ($hubs as $hub) {
|
||||
if (key_exists('id', $hub)) {
|
||||
if (array_key_exists('id', $hub)) {
|
||||
$params = array('hubid' => $hub['id'],
|
||||
'filetype' => HUB_HUBSCREENSHOT_FILE_TYPE);
|
||||
$imgurl = new moodle_url(HUB_HUBDIRECTORYURL .
|
||||
|
||||
+2
-3
@@ -23,8 +23,7 @@ YUI.add('moodle-block_community-comments', function(Y) {
|
||||
bodyContent:Y.one('#commentoverlay-'+commentid).get('innerHTML'),
|
||||
visible: false, //by default it is not displayed
|
||||
lightbox : false,
|
||||
zIndex:100,
|
||||
height: '350px'
|
||||
zIndex:100
|
||||
});
|
||||
|
||||
this.overlays[commentid].get('contentBox').one('.commenttitle').remove();
|
||||
@@ -86,4 +85,4 @@ YUI.add('moodle-block_community-comments', function(Y) {
|
||||
|
||||
}, '@VERSION@', {
|
||||
requires:['base','overlay', 'moodle-enrol-notification']
|
||||
});
|
||||
});
|
||||
|
||||
@@ -51,8 +51,10 @@ class block_completionstatus extends block_base {
|
||||
// Create empty content
|
||||
$this->content = new stdClass();
|
||||
|
||||
$context = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||
|
||||
// Can edit settings?
|
||||
$can_edit = has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id));
|
||||
$can_edit = has_capability('moodle/course:update', $context);
|
||||
|
||||
// Get course completion data
|
||||
$info = new completion_info($course);
|
||||
@@ -83,148 +85,145 @@ class block_completionstatus extends block_base {
|
||||
}
|
||||
|
||||
// Check this user is enroled
|
||||
if (!$info->is_tracked_user($USER->id)) {
|
||||
// If not enrolled, but are can view the report:
|
||||
if (has_capability('report/completion:view', get_context_instance(CONTEXT_COURSE, $course->id))) {
|
||||
$report = new moodle_url('/report/completion/index.php', array('course' => $course->id));
|
||||
$this->content->text = '<a href="'.$report->out().'">'.get_string('viewcoursereport', 'completion').'</a>';
|
||||
return $this->content;
|
||||
if ($info->is_tracked_user($USER->id)) {
|
||||
|
||||
// Generate markup for criteria statuses
|
||||
$shtml = '';
|
||||
|
||||
// For aggregating activity completion
|
||||
$activities = array();
|
||||
$activities_complete = 0;
|
||||
|
||||
// For aggregating course prerequisites
|
||||
$prerequisites = array();
|
||||
$prerequisites_complete = 0;
|
||||
|
||||
// Flag to set if current completion data is inconsistent with
|
||||
// what is stored in the database
|
||||
$pending_update = false;
|
||||
|
||||
// Loop through course criteria
|
||||
foreach ($completions as $completion) {
|
||||
|
||||
$criteria = $completion->get_criteria();
|
||||
$complete = $completion->is_complete();
|
||||
|
||||
if (!$pending_update && $criteria->is_pending($completion)) {
|
||||
$pending_update = true;
|
||||
}
|
||||
|
||||
// Activities are a special case, so cache them and leave them till last
|
||||
if ($criteria->criteriatype == COMPLETION_CRITERIA_TYPE_ACTIVITY) {
|
||||
$activities[$criteria->moduleinstance] = $complete;
|
||||
|
||||
if ($complete) {
|
||||
$activities_complete++;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Prerequisites are also a special case, so cache them and leave them till last
|
||||
if ($criteria->criteriatype == COMPLETION_CRITERIA_TYPE_COURSE) {
|
||||
$prerequisites[$criteria->courseinstance] = $complete;
|
||||
|
||||
if ($complete) {
|
||||
$prerequisites_complete++;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$shtml .= '<tr><td>';
|
||||
$shtml .= $criteria->get_title();
|
||||
$shtml .= '</td><td style="text-align: right">';
|
||||
$shtml .= $completion->get_status();
|
||||
$shtml .= '</td></tr>';
|
||||
}
|
||||
|
||||
// Otherwise, show error
|
||||
// Aggregate activities
|
||||
if (!empty($activities)) {
|
||||
|
||||
$shtml .= '<tr><td>';
|
||||
$shtml .= get_string('activitiescompleted', 'completion');
|
||||
$shtml .= '</td><td style="text-align: right">';
|
||||
$a = new stdClass();
|
||||
$a->first = $activities_complete;
|
||||
$a->second = count($activities);
|
||||
$shtml .= get_string('firstofsecond', 'block_completionstatus', $a);
|
||||
$shtml .= '</td></tr>';
|
||||
}
|
||||
|
||||
// Aggregate prerequisites
|
||||
if (!empty($prerequisites)) {
|
||||
|
||||
$phtml = '<tr><td>';
|
||||
$phtml .= get_string('prerequisitescompleted', 'completion');
|
||||
$phtml .= '</td><td style="text-align: right">';
|
||||
$a = new stdClass();
|
||||
$a->first = $prerequisites_complete;
|
||||
$a->second = count($prerequisites);
|
||||
$phtml .= get_string('firstofsecond', 'block_completionstatus', $a);
|
||||
$phtml .= '</td></tr>';
|
||||
|
||||
$shtml = $phtml . $shtml;
|
||||
}
|
||||
|
||||
// Display completion status
|
||||
$this->content->text = '<table width="100%" style="font-size: 90%;"><tbody>';
|
||||
$this->content->text .= '<tr><td colspan="2"><b>'.get_string('status').':</b> ';
|
||||
|
||||
// Is course complete?
|
||||
$coursecomplete = $info->is_course_complete($USER->id);
|
||||
|
||||
// Load course completion
|
||||
$params = array(
|
||||
'userid' => $USER->id,
|
||||
'course' => $course->id
|
||||
);
|
||||
$ccompletion = new completion_completion($params);
|
||||
|
||||
// Has this user completed any criteria?
|
||||
$criteriacomplete = $info->count_course_user_data($USER->id);
|
||||
|
||||
if ($pending_update) {
|
||||
$this->content->text .= '<i>'.get_string('pending', 'completion').'</i>';
|
||||
} else if ($coursecomplete) {
|
||||
$this->content->text .= get_string('complete');
|
||||
} else if (!$criteriacomplete && !$ccompletion->timestarted) {
|
||||
$this->content->text .= '<i>'.get_string('notyetstarted', 'completion').'</i>';
|
||||
} else {
|
||||
$this->content->text .= '<i>'.get_string('inprogress','completion').'</i>';
|
||||
}
|
||||
|
||||
$this->content->text .= '</td></tr>';
|
||||
$this->content->text .= '<tr><td colspan="2">';
|
||||
|
||||
// Get overall aggregation method
|
||||
$overall = $info->get_aggregation_method();
|
||||
|
||||
if ($overall == COMPLETION_AGGREGATION_ALL) {
|
||||
$this->content->text .= get_string('criteriarequiredall', 'completion');
|
||||
} else {
|
||||
$this->content->text .= get_string('criteriarequiredany', 'completion');
|
||||
}
|
||||
|
||||
$this->content->text .= ':</td></tr>';
|
||||
$this->content->text .= '<tr><td><b>'.get_string('requiredcriteria', 'completion').'</b></td><td style="text-align: right"><b>'.get_string('status').'</b></td></tr>';
|
||||
$this->content->text .= $shtml.'</tbody></table>';
|
||||
|
||||
// Display link to detailed view
|
||||
$details = new moodle_url('/blocks/completionstatus/details.php', array('course' => $course->id));
|
||||
$this->content->footer = '<br><a href="'.$details->out().'">'.get_string('moredetails', 'completion').'</a>';
|
||||
} else {
|
||||
// If user is not enrolled, show error
|
||||
$this->content->text = get_string('notenroled', 'completion');
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
// Generate markup for criteria statuses
|
||||
$shtml = '';
|
||||
|
||||
// For aggregating activity completion
|
||||
$activities = array();
|
||||
$activities_complete = 0;
|
||||
|
||||
// For aggregating course prerequisites
|
||||
$prerequisites = array();
|
||||
$prerequisites_complete = 0;
|
||||
|
||||
// Flag to set if current completion data is inconsistent with
|
||||
// what is stored in the database
|
||||
$pending_update = false;
|
||||
|
||||
// Loop through course criteria
|
||||
foreach ($completions as $completion) {
|
||||
|
||||
$criteria = $completion->get_criteria();
|
||||
$complete = $completion->is_complete();
|
||||
|
||||
if (!$pending_update && $criteria->is_pending($completion)) {
|
||||
$pending_update = true;
|
||||
}
|
||||
|
||||
// Activities are a special case, so cache them and leave them till last
|
||||
if ($criteria->criteriatype == COMPLETION_CRITERIA_TYPE_ACTIVITY) {
|
||||
$activities[$criteria->moduleinstance] = $complete;
|
||||
|
||||
if ($complete) {
|
||||
$activities_complete++;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Prerequisites are also a special case, so cache them and leave them till last
|
||||
if ($criteria->criteriatype == COMPLETION_CRITERIA_TYPE_COURSE) {
|
||||
$prerequisites[$criteria->courseinstance] = $complete;
|
||||
|
||||
if ($complete) {
|
||||
$prerequisites_complete++;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$shtml .= '<tr><td>';
|
||||
$shtml .= $criteria->get_title();
|
||||
$shtml .= '</td><td style="text-align: right">';
|
||||
$shtml .= $completion->get_status();
|
||||
$shtml .= '</td></tr>';
|
||||
if (has_capability('report/completion:view', $context)) {
|
||||
$report = new moodle_url('/report/completion/index.php', array('course' => $course->id));
|
||||
$this->content->footer .= '<br /><a href="'.$report->out().'">'.get_string('viewcoursereport', 'completion').'</a>';
|
||||
}
|
||||
|
||||
// Aggregate activities
|
||||
if (!empty($activities)) {
|
||||
|
||||
$shtml .= '<tr><td>';
|
||||
$shtml .= get_string('activitiescompleted', 'completion');
|
||||
$shtml .= '</td><td style="text-align: right">';
|
||||
$a = new stdClass();
|
||||
$a->first = $activities_complete;
|
||||
$a->second = count($activities);
|
||||
$shtml .= get_string('firstofsecond', 'block_completionstatus', $a);
|
||||
$shtml .= '</td></tr>';
|
||||
}
|
||||
|
||||
// Aggregate prerequisites
|
||||
if (!empty($prerequisites)) {
|
||||
|
||||
$phtml = '<tr><td>';
|
||||
$phtml .= get_string('prerequisitescompleted', 'completion');
|
||||
$phtml .= '</td><td style="text-align: right">';
|
||||
$a = new stdClass();
|
||||
$a->first = $prerequisites_complete;
|
||||
$a->second = count($prerequisites);
|
||||
$phtml .= get_string('firstofsecond', 'block_completionstatus', $a);
|
||||
$phtml .= '</td></tr>';
|
||||
|
||||
$shtml = $phtml . $shtml;
|
||||
}
|
||||
|
||||
// Display completion status
|
||||
$this->content->text = '<table width="100%" style="font-size: 90%;"><tbody>';
|
||||
$this->content->text .= '<tr><td colspan="2"><b>'.get_string('status').':</b> ';
|
||||
|
||||
// Is course complete?
|
||||
$coursecomplete = $info->is_course_complete($USER->id);
|
||||
|
||||
// Load course completion
|
||||
$params = array(
|
||||
'userid' => $USER->id,
|
||||
'course' => $course->id
|
||||
);
|
||||
$ccompletion = new completion_completion($params);
|
||||
|
||||
// Has this user completed any criteria?
|
||||
$criteriacomplete = $info->count_course_user_data($USER->id);
|
||||
|
||||
if ($pending_update) {
|
||||
$this->content->text .= '<i>'.get_string('pending', 'completion').'</i>';
|
||||
} else if ($coursecomplete) {
|
||||
$this->content->text .= get_string('complete');
|
||||
} else if (!$criteriacomplete && !$ccompletion->timestarted) {
|
||||
$this->content->text .= '<i>'.get_string('notyetstarted', 'completion').'</i>';
|
||||
} else {
|
||||
$this->content->text .= '<i>'.get_string('inprogress','completion').'</i>';
|
||||
}
|
||||
|
||||
$this->content->text .= '</td></tr>';
|
||||
$this->content->text .= '<tr><td colspan="2">';
|
||||
|
||||
// Get overall aggregation method
|
||||
$overall = $info->get_aggregation_method();
|
||||
|
||||
if ($overall == COMPLETION_AGGREGATION_ALL) {
|
||||
$this->content->text .= get_string('criteriarequiredall', 'completion');
|
||||
} else {
|
||||
$this->content->text .= get_string('criteriarequiredany', 'completion');
|
||||
}
|
||||
|
||||
$this->content->text .= ':</td></tr>';
|
||||
$this->content->text .= '<tr><td><b>'.get_string('requiredcriteria', 'completion').'</b></td><td style="text-align: right"><b>'.get_string('status').'</b></td></tr>';
|
||||
$this->content->text .= $shtml.'</tbody></table>';
|
||||
|
||||
// Display link to detailed view
|
||||
$details = new moodle_url('/blocks/completionstatus/details.php', array('course' => $course->id));
|
||||
$this->content->footer = '<br><a href="'.$details->out().'">'.get_string('moredetails', 'completion').'</a>';
|
||||
|
||||
return $this->content;
|
||||
}
|
||||
}
|
||||
|
||||
+20
-4
@@ -164,7 +164,7 @@ M.core_dock.init = function(Y) {
|
||||
var dock = Y.one('#dock');
|
||||
if (!dock) {
|
||||
// Start the construction of the dock
|
||||
dock = Y.Node.create('<div id="dock" class="'+css.dock+' '+css.dock+'_'+this.cfg.position+'_'+this.cfg.orientation+'"></div>')
|
||||
dock = Y.Node.create('<div id="dock" role="menubar" class="'+css.dock+' '+css.dock+'_'+this.cfg.position+'_'+this.cfg.orientation+'"></div>')
|
||||
.append(Y.Node.create('<div class="'+css.buttonscontainer+'"></div>')
|
||||
.append(Y.Node.create('<div class="'+css.dockeditemcontainer+'"></div>')));
|
||||
this.nodes.body.append(dock);
|
||||
@@ -505,7 +505,7 @@ M.core_dock.fixTitleOrientation = function(item, title, text) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (Y.UA.ie > 7) {
|
||||
if (Y.UA.ie == 8) {
|
||||
// IE8 can flip the text via CSS but not handle SVG
|
||||
title.setContent(text);
|
||||
title.setAttribute('style', 'writing-mode: tb-rl; filter: flipV flipH;display:inline;');
|
||||
@@ -863,6 +863,12 @@ M.core_dock.genericblock.prototype = {
|
||||
return;
|
||||
}
|
||||
|
||||
// Disable the skip anchor when docking
|
||||
var skipanchor = node.previous();
|
||||
if (skipanchor.hasClass('skip-block')) {
|
||||
skipanchor.hide();
|
||||
}
|
||||
|
||||
var blockclass = (function(classes){
|
||||
var r = /(^|\s)(block_[a-zA-Z0-9_]+)(\s|$)/;
|
||||
var m = r.exec(classes);
|
||||
@@ -937,6 +943,12 @@ M.core_dock.genericblock.prototype = {
|
||||
return_to_block : function(dockitem) {
|
||||
var placeholder = this.Y.one('#content_placeholder_'+this.id);
|
||||
|
||||
// Enable the skip anchor when going back to block mode
|
||||
var skipanchor = placeholder.previous();
|
||||
if (skipanchor.hasClass('skip-block')) {
|
||||
skipanchor.show();
|
||||
}
|
||||
|
||||
if (this.cachedcontentnode.one('.header')) {
|
||||
this.cachedcontentnode.one('.header').insert(dockitem.contents, 'after');
|
||||
} else {
|
||||
@@ -946,7 +958,7 @@ M.core_dock.genericblock.prototype = {
|
||||
placeholder.replace(this.Y.Node.getDOMNode(this.cachedcontentnode));
|
||||
this.cachedcontentnode = this.Y.one('#'+this.cachedcontentnode.get('id'));
|
||||
|
||||
var commands = this.cachedcontentnode.one('.title .commands');
|
||||
var commands = dockitem.commands;
|
||||
if (commands) {
|
||||
commands.all('.hidepanelicon').remove();
|
||||
commands.all('.moveto').remove();
|
||||
@@ -1024,7 +1036,7 @@ M.core_dock.item.prototype = {
|
||||
var Y = this.Y;
|
||||
var css = M.core_dock.css;
|
||||
|
||||
this.nodes.docktitle = Y.Node.create('<div id="dock_item_'+this.id+'_title" class="'+css.dockedtitle+'"></div>');
|
||||
this.nodes.docktitle = Y.Node.create('<div id="dock_item_'+this.id+'_title" role="menu" aria-haspopup="true" class="'+css.dockedtitle+'"></div>');
|
||||
this.nodes.docktitle.append(this.title);
|
||||
this.nodes.dockitem = Y.Node.create('<div id="dock_item_'+this.id+'" class="'+css.dockeditem+'" tabindex="0"></div>');
|
||||
this.nodes.dockitem.on('dock:actionkey', this.toggle, this);
|
||||
@@ -1053,6 +1065,8 @@ M.core_dock.item.prototype = {
|
||||
this.active = true;
|
||||
// Add active item class first up
|
||||
this.nodes.docktitle.addClass(css.activeitem);
|
||||
// Set aria-exapanded property to true.
|
||||
this.nodes.docktitle.set('aria-expanded', "true");
|
||||
this.fire('dockeditem:showcomplete');
|
||||
M.core_dock.resize();
|
||||
return true;
|
||||
@@ -1069,6 +1083,8 @@ M.core_dock.item.prototype = {
|
||||
this.nodes.docktitle.removeClass(css.activeitem);
|
||||
// Hide the panel
|
||||
M.core_dock.getPanel().hide();
|
||||
// Set aria-exapanded property to false
|
||||
this.nodes.docktitle.set('aria-expanded', "false");
|
||||
this.fire('dockeditem:hidecomplete');
|
||||
},
|
||||
/**
|
||||
|
||||
+19
-3
@@ -24,13 +24,29 @@
|
||||
*/
|
||||
|
||||
function block_html_pluginfile($course, $birecord_or_cm, $context, $filearea, $args, $forcedownload) {
|
||||
global $SCRIPT;
|
||||
global $DB, $CFG;
|
||||
|
||||
if ($context->contextlevel != CONTEXT_BLOCK) {
|
||||
send_file_not_found();
|
||||
}
|
||||
|
||||
require_course_login($course);
|
||||
// If block is in course context, then check if user has capability to access course.
|
||||
if ($context->get_course_context(false)) {
|
||||
require_course_login($course);
|
||||
} else if ($CFG->forcelogin) {
|
||||
require_login();
|
||||
} else {
|
||||
// Get parent context and see if user have proper permission.
|
||||
$parentcontext = $context->get_parent_context();
|
||||
if ($parentcontext->contextlevel === CONTEXT_COURSECAT) {
|
||||
// Check if category is visible and user can view this category.
|
||||
$category = $DB->get_record('course_categories', array('id' => $parentcontext->instanceid), '*', MUST_EXIST);
|
||||
if (!$category->visible) {
|
||||
require_capability('moodle/category:viewhiddencategories', $parentcontext);
|
||||
}
|
||||
}
|
||||
// At this point there is no way to check SYSTEM or USER context, so ignoring it.
|
||||
}
|
||||
|
||||
if ($filearea !== 'content') {
|
||||
send_file_not_found();
|
||||
@@ -79,4 +95,4 @@ function block_html_global_db_replace($search, $replace) {
|
||||
}
|
||||
}
|
||||
$instances->close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,18 +74,20 @@ class block_navigation_renderer extends plugin_renderer_base {
|
||||
|
||||
// this applies to the li item which contains all child lists too
|
||||
$liclasses = array($item->get_css_type(), 'depth_'.$depth);
|
||||
$liexpandable = array();
|
||||
if ($item->has_children() && (!$item->forceopen || $item->collapse)) {
|
||||
$liclasses[] = 'collapsed';
|
||||
}
|
||||
if ($isbranch) {
|
||||
$liclasses[] = 'contains_branch';
|
||||
$liexpandable = array('aria-expanded' => in_array('collapsed', $liclasses) ? "false" : "true");
|
||||
} else if ($hasicon) {
|
||||
$liclasses[] = 'item_with_icon';
|
||||
}
|
||||
if ($item->isactive === true) {
|
||||
$liclasses[] = 'current_branch';
|
||||
}
|
||||
$liattr = array('class'=>join(' ',$liclasses));
|
||||
$liattr = array('class' => join(' ',$liclasses)) + $liexpandable;
|
||||
// class attribute on the div item which only contains the item content
|
||||
$divclasses = array('tree_item');
|
||||
if ($isbranch) {
|
||||
|
||||
@@ -162,16 +162,20 @@ TREE.prototype = {
|
||||
switch (e.action) {
|
||||
case 'expand' :
|
||||
target.removeClass('collapsed');
|
||||
target.set('aria-expanded', true);
|
||||
break;
|
||||
case 'collapse' :
|
||||
target.addClass('collapsed');
|
||||
target.set('aria-expanded', false);
|
||||
break;
|
||||
default :
|
||||
target.toggleClass('collapsed');
|
||||
target.set('aria-expanded', !target.hasClass('collapsed'));
|
||||
}
|
||||
e.halt();
|
||||
} else {
|
||||
target.toggleClass('collapsed');
|
||||
target.set('aria-expanded', !target.hasClass('collapsed'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,6 +184,7 @@ TREE.prototype = {
|
||||
target.siblings('li').each(function(){
|
||||
if (this.get('id') !== target.get('id') && !this.hasClass('collapsed')) {
|
||||
this.addClass('collapsed');
|
||||
this.set('aria-expanded', false);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -287,6 +292,7 @@ BRANCH.prototype = {
|
||||
}
|
||||
if (isbranch) {
|
||||
branchli.addClass('collapsed').addClass('contains_branch');
|
||||
branchli.set('aria-expanded', false);
|
||||
branchp.addClass('branch');
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,8 @@ class block_online_users extends block_base {
|
||||
if (isset($CFG->block_online_users_timetosee)) {
|
||||
$timetoshowusers = $CFG->block_online_users_timetosee * 60;
|
||||
}
|
||||
$timefrom = 100 * floor((time()-$timetoshowusers) / 100); // Round to nearest 100 seconds for better query cache
|
||||
$now = time();
|
||||
$timefrom = 100 * floor(($now - $timetoshowusers) / 100); // Round to nearest 100 seconds for better query cache
|
||||
|
||||
//Calculate if we are in separate groups
|
||||
$isseparategroups = ($this->page->course->groupmode == SEPARATEGROUPS
|
||||
@@ -53,18 +54,23 @@ class block_online_users extends block_base {
|
||||
}
|
||||
|
||||
$userfields = user_picture::fields('u', array('username'));
|
||||
|
||||
$params['now'] = $now;
|
||||
$params['timefrom'] = $timefrom;
|
||||
if ($this->page->course->id == SITEID or $this->page->context->contextlevel < CONTEXT_COURSE) { // Site-level
|
||||
$sql = "SELECT $userfields, MAX(u.lastaccess) AS lastaccess
|
||||
FROM {user} u $groupmembers
|
||||
WHERE u.lastaccess > $timefrom
|
||||
WHERE u.lastaccess > :timefrom
|
||||
AND u.lastaccess <= :now
|
||||
AND u.deleted = 0
|
||||
$groupselect
|
||||
GROUP BY $userfields
|
||||
ORDER BY lastaccess DESC ";
|
||||
|
||||
$csql = "SELECT COUNT(u.id)
|
||||
FROM {user} u $groupmembers
|
||||
WHERE u.lastaccess > $timefrom
|
||||
WHERE u.lastaccess > :timefrom
|
||||
AND u.lastaccess <= :now
|
||||
AND u.deleted = 0
|
||||
$groupselect";
|
||||
|
||||
} else {
|
||||
@@ -77,9 +83,11 @@ class block_online_users extends block_base {
|
||||
$sql = "SELECT $userfields, MAX(ul.timeaccess) AS lastaccess
|
||||
FROM {user_lastaccess} ul $groupmembers, {user} u
|
||||
JOIN ($esqljoin) euj ON euj.id = u.id
|
||||
WHERE ul.timeaccess > $timefrom
|
||||
WHERE ul.timeaccess > :timefrom
|
||||
AND u.id = ul.userid
|
||||
AND ul.courseid = :courseid
|
||||
AND ul.timeaccess <= :now
|
||||
AND u.deleted = 0
|
||||
$groupselect
|
||||
GROUP BY $userfields
|
||||
ORDER BY lastaccess DESC";
|
||||
@@ -87,9 +95,11 @@ class block_online_users extends block_base {
|
||||
$csql = "SELECT COUNT(u.id)
|
||||
FROM {user_lastaccess} ul $groupmembers, {user} u
|
||||
JOIN ($esqljoin) euj ON euj.id = u.id
|
||||
WHERE ul.timeaccess > $timefrom
|
||||
WHERE ul.timeaccess > :timefrom
|
||||
AND u.id = ul.userid
|
||||
AND ul.courseid = :courseid
|
||||
AND ul.timeaccess <= :now
|
||||
AND u.deleted = 0
|
||||
$groupselect";
|
||||
|
||||
$params['courseid'] = $this->page->course->id;
|
||||
@@ -138,7 +148,7 @@ class block_online_users extends block_base {
|
||||
}
|
||||
foreach ($users as $user) {
|
||||
$this->content->text .= '<li class="listentry">';
|
||||
$timeago = format_time(time() - $user->lastaccess); //bruno to calculate correctly on frontpage
|
||||
$timeago = format_time($now - $user->lastaccess); //bruno to calculate correctly on frontpage
|
||||
|
||||
if (isguestuser($user)) {
|
||||
$this->content->text .= '<div class="user">'.$OUTPUT->user_picture($user, array('size'=>16));
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
|
||||
$r = html_writer::start_tag('li');
|
||||
$r.= html_writer::start_tag('div',array('class'=>'link'));
|
||||
$r.= html_writer::link(clean_param($link,PARAM_URL), s($title), array('onclick'=>'this.target="_blank"'));
|
||||
$r.= html_writer::link($link, s($title), array('onclick'=>'this.target="_blank"'));
|
||||
$r.= html_writer::end_tag('div');
|
||||
|
||||
if($this->config->display_description && !empty($description)){
|
||||
|
||||
@@ -27,6 +27,7 @@ class block_search_forums extends block_base {
|
||||
|
||||
$this->content->text = '<div class="searchform">';
|
||||
$this->content->text .= '<form action="'.$CFG->wwwroot.'/mod/forum/search.php" style="display:inline"><fieldset class="invisiblefieldset">';
|
||||
$this->content->text .= '<legend class="accesshide">'.$strsearch.'</legend>';
|
||||
$this->content->text .= '<input name="id" type="hidden" value="'.$this->page->course->id.'" />'; // course
|
||||
$this->content->text .= '<label class="accesshide" for="searchform_search">'.$strsearch.'</label>'.
|
||||
'<input id="searchform_search" name="search" type="text" size="16" />';
|
||||
|
||||
@@ -40,18 +40,20 @@ class block_settings_renderer extends plugin_renderer_base {
|
||||
|
||||
// this applies to the li item which contains all child lists too
|
||||
$liclasses = array($item->get_css_type());
|
||||
$liexpandable = array();
|
||||
if (!$item->forceopen || (!$item->forceopen && $item->collapse) || ($item->children->count()==0 && $item->nodetype==navigation_node::NODETYPE_BRANCH)) {
|
||||
$liclasses[] = 'collapsed';
|
||||
}
|
||||
if ($isbranch) {
|
||||
$liclasses[] = 'contains_branch';
|
||||
$liexpandable = array('aria-expanded' => in_array('collapsed', $liclasses) ? "false" : "true");
|
||||
} else if ($hasicon) {
|
||||
$liclasses[] = 'item_with_icon';
|
||||
}
|
||||
if ($item->isactive === true) {
|
||||
$liclasses[] = 'current_branch';
|
||||
}
|
||||
$liattr = array('class'=>join(' ',$liclasses));
|
||||
$liattr = array('class' => join(' ',$liclasses)) + $liexpandable;
|
||||
// class attribute on the div item which only contains the item content
|
||||
$divclasses = array('tree_item');
|
||||
if ($isbranch) {
|
||||
|
||||
@@ -82,6 +82,7 @@ $string['pluginname'] = 'Tags';
|
||||
$string['select'] = 'Select...';
|
||||
$string['showcoursetags'] = 'Show course tags';
|
||||
$string['showcoursetagsdef'] = 'Display the course tagging features in the tags block, allowing students to tag courses.';
|
||||
$string['suggestedtagthisunit'] = 'Suggested tag to this course:';
|
||||
$string['tags'] = 'tags';
|
||||
$string['tagthisunit'] = 'Tag this course:';
|
||||
$string['tagunits'] = 'to tag your favourite courses';
|
||||
|
||||
+2
@@ -24,6 +24,8 @@ YUI.add('moodle-calendar-eventmanager', function(Y) {
|
||||
this.publish('hideevent');
|
||||
td.on('mouseenter', this.startShow, this);
|
||||
td.on('mouseleave', this.startHide, this);
|
||||
td.on('focus', this.startShow, this);
|
||||
td.on('blur', this.startHide, this);
|
||||
return true;
|
||||
},
|
||||
initPanel : function() {
|
||||
|
||||
+2
-2
@@ -126,7 +126,7 @@ function cohort_delete_category($category) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove cohort member
|
||||
* Add cohort member
|
||||
* @param int $cohortid
|
||||
* @param int $userid
|
||||
* @return void
|
||||
@@ -143,7 +143,7 @@ function cohort_add_member($cohortid, $userid) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add cohort member
|
||||
* Remove cohort member
|
||||
* @param int $cohortid
|
||||
* @param int $userid
|
||||
* @return void
|
||||
|
||||
@@ -89,7 +89,7 @@ class comment_manager {
|
||||
*/
|
||||
private function setup_course($courseid) {
|
||||
global $PAGE, $DB;
|
||||
if (!empty($this->course)) {
|
||||
if (!empty($this->course) && $this->course->id == $courseid) {
|
||||
// already set, stop
|
||||
return;
|
||||
}
|
||||
|
||||
+13
-2
@@ -27,10 +27,10 @@
|
||||
|
||||
require_once("../config.php");
|
||||
require_once($CFG->dirroot.'/course/lib.php');
|
||||
require_once($CFG->libdir.'/textlib.class.php');
|
||||
|
||||
$id = required_param('id', PARAM_INT); // Category id
|
||||
$page = optional_param('page', 0, PARAM_INT); // which page to show
|
||||
$perpage = optional_param('perpage', $CFG->coursesperpage, PARAM_INT); // how many per page
|
||||
$categoryedit = optional_param('categoryedit', -1, PARAM_BOOL);
|
||||
$hide = optional_param('hide', 0, PARAM_INT);
|
||||
$show = optional_param('show', 0, PARAM_INT);
|
||||
@@ -40,6 +40,16 @@ $moveto = optional_param('moveto', 0, PARAM_INT);
|
||||
$resort = optional_param('resort', 0, PARAM_BOOL);
|
||||
$sesskey = optional_param('sesskey', '', PARAM_RAW);
|
||||
|
||||
// MDL-27824 - This is a temporary fix until we have the proper
|
||||
// way to check/initialize $CFG value.
|
||||
// @todo MDL-35138 remove this temporary solution
|
||||
if (!empty($CFG->coursesperpage)) {
|
||||
$defaultperpage = $CFG->coursesperpage;
|
||||
} else {
|
||||
$defaultperpage = 20;
|
||||
}
|
||||
$perpage = optional_param('perpage', $defaultperpage, PARAM_INT); // how many per page
|
||||
|
||||
if (empty($id)) {
|
||||
print_error("unknowcategory");
|
||||
}
|
||||
@@ -75,7 +85,8 @@ $sesskeyprovided = !empty($sesskey) && confirm_sesskey($sesskey);
|
||||
// Process any category actions.
|
||||
if ($canmanage && $resort && $sesskeyprovided) {
|
||||
// Resort the category if requested
|
||||
if ($courses = get_courses($category->id, "fullname ASC", 'c.id,c.fullname,c.sortorder')) {
|
||||
if ($courses = get_courses($category->id, '', 'c.id,c.fullname,c.sortorder')) {
|
||||
collatorlib::asort_objects_by_property($courses, 'fullname');
|
||||
$i = 1;
|
||||
foreach ($courses as $course) {
|
||||
$DB->set_field('course', 'sortorder', $category->sortorder+$i, array('id'=>$course->id));
|
||||
|
||||
@@ -150,7 +150,11 @@ class course_edit_form extends moodleform {
|
||||
$mform->addHelpButton('showreports', 'showreports');
|
||||
$mform->setDefault('showreports', $courseconfig->showreports);
|
||||
|
||||
$choices = get_max_upload_sizes($CFG->maxbytes);
|
||||
// Handle non-existing $course->maxbytes on course creation.
|
||||
$coursemaxbytes = !isset($course->maxbytes) ? null : $course->maxbytes;
|
||||
|
||||
// Let's prepare the maxbytes popup.
|
||||
$choices = get_max_upload_sizes($CFG->maxbytes, 0, 0, $coursemaxbytes);
|
||||
$mform->addElement('select', 'maxbytes', get_string('maximumupload'), $choices);
|
||||
$mform->addHelpButton('maxbytes', 'maximumupload');
|
||||
$mform->setDefault('maxbytes', $courseconfig->maxbytes);
|
||||
|
||||
@@ -267,7 +267,7 @@ class core_course_external extends external_api {
|
||||
array('options' => $options));
|
||||
|
||||
//retrieve courses
|
||||
if (!key_exists('ids', $params['options'])
|
||||
if (!array_key_exists('ids', $params['options'])
|
||||
or empty($params['options']['ids'])) {
|
||||
$courses = $DB->get_records('course');
|
||||
} else {
|
||||
@@ -504,13 +504,13 @@ class core_course_external extends external_api {
|
||||
require_capability('moodle/course:create', $context);
|
||||
|
||||
// Make sure lang is valid
|
||||
if (key_exists('lang', $course) and empty($availablelangs[$course['lang']])) {
|
||||
if (array_key_exists('lang', $course) and empty($availablelangs[$course['lang']])) {
|
||||
throw new moodle_exception(
|
||||
get_string('errorinvalidparam', 'webservice', 'lang'));
|
||||
}
|
||||
|
||||
// Make sure theme is valid
|
||||
if (key_exists('forcetheme', $course)) {
|
||||
if (array_key_exists('forcetheme', $course)) {
|
||||
if (!empty($CFG->allowcoursethemes)) {
|
||||
if (empty($availablethemes[$course['forcetheme']])) {
|
||||
throw new moodle_exception(
|
||||
@@ -530,10 +530,10 @@ class core_course_external extends external_api {
|
||||
//set default value for completion
|
||||
$courseconfig = get_config('moodlecourse');
|
||||
if (completion_info::is_enabled_for_site()) {
|
||||
if (!key_exists('enablecompletion', $course)) {
|
||||
if (!array_key_exists('enablecompletion', $course)) {
|
||||
$course['enablecompletion'] = $courseconfig->enablecompletion;
|
||||
}
|
||||
if (!key_exists('completionstartonenrol', $course)) {
|
||||
if (!array_key_exists('completionstartonenrol', $course)) {
|
||||
$course['completionstartonenrol'] = $courseconfig->completionstartonenrol;
|
||||
}
|
||||
} else {
|
||||
|
||||
+21
-19
@@ -1591,6 +1591,11 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
|
||||
if ($accessiblebutdim) {
|
||||
$linkclasses .= ' dimmed';
|
||||
$textclasses .= ' dimmed_text';
|
||||
// If mod is visible and is dimmed because of condition then handle it nicely with JS.
|
||||
if ($mod->visible) {
|
||||
$linkclasses .= ' conditionalhidden';
|
||||
$textclasses .= ' conditionalhidden';
|
||||
}
|
||||
$accesstext = '<span class="accesshide">'.
|
||||
get_string('hiddenfromstudents').': </span>';
|
||||
} else {
|
||||
@@ -1617,8 +1622,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
|
||||
// Display link itself
|
||||
echo '<a ' . $linkcss . $mod->extra . $onclick .
|
||||
' href="' . $url . '"><img src="' . $mod->get_icon_url() .
|
||||
'" class="activityicon" alt="' .
|
||||
$modulename . '" /> ' .
|
||||
'" class="activityicon" alt="' . $modulename . '" /> ' .
|
||||
$accesstext . '<span class="instancename">' .
|
||||
$instancename . $altname . '</span></a>';
|
||||
|
||||
@@ -1655,9 +1659,7 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
|
||||
// Display greyed-out text of link
|
||||
echo '<div ' . $textcss . $mod->extra .
|
||||
' >' . '<img src="' . $mod->get_icon_url() .
|
||||
'" class="activityicon" alt="' .
|
||||
$modulename .
|
||||
'" /> <span>'. $instancename . $altname .
|
||||
'" class="activityicon" alt="" /> <span>'. $instancename . $altname .
|
||||
'</span></div>';
|
||||
|
||||
// Do not display content after link when it is greyed out like this.
|
||||
@@ -3147,7 +3149,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
|
||||
if ($indent > 0) {
|
||||
$actions[] = new action_link(
|
||||
new moodle_url($baseurl, array('id' => $mod->id, 'indent' => '-1')),
|
||||
new pix_icon($leftarrow, $str->moveleft, 'moodle', array('class' => 'iconsmall')),
|
||||
new pix_icon($leftarrow, $str->moveleft, 'moodle', array('class' => 'iconsmall', 'title' => '')),
|
||||
null,
|
||||
array('class' => 'editing_moveleft', 'title' => $str->moveleft)
|
||||
);
|
||||
@@ -3155,7 +3157,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
|
||||
if ($indent >= 0) {
|
||||
$actions[] = new action_link(
|
||||
new moodle_url($baseurl, array('id' => $mod->id, 'indent' => '1')),
|
||||
new pix_icon($rightarrow, $str->moveright, 'moodle', array('class' => 'iconsmall')),
|
||||
new pix_icon($rightarrow, $str->moveright, 'moodle', array('class' => 'iconsmall', 'title' => '')),
|
||||
null,
|
||||
array('class' => 'editing_moveright', 'title' => $str->moveright)
|
||||
);
|
||||
@@ -3167,20 +3169,20 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
|
||||
if ($moveselect) {
|
||||
$actions[] = new action_link(
|
||||
new moodle_url($baseurl, array('copy' => $mod->id)),
|
||||
new pix_icon('t/move', $str->move, 'moodle', array('class' => 'iconsmall')),
|
||||
new pix_icon('t/move', $str->move, 'moodle', array('class' => 'iconsmall', 'title' => '')),
|
||||
null,
|
||||
array('class' => 'editing_move', 'title' => $str->move)
|
||||
);
|
||||
} else {
|
||||
$actions[] = new action_link(
|
||||
new moodle_url($baseurl, array('id' => $mod->id, 'move' => '-1')),
|
||||
new pix_icon('t/up', $str->moveup, 'moodle', array('class' => 'iconsmall')),
|
||||
new pix_icon('t/up', $str->moveup, 'moodle', array('class' => 'iconsmall', 'title' => '')),
|
||||
null,
|
||||
array('class' => 'editing_moveup', 'title' => $str->moveup)
|
||||
);
|
||||
$actions[] = new action_link(
|
||||
new moodle_url($baseurl, array('id' => $mod->id, 'move' => '1')),
|
||||
new pix_icon('t/down', $str->movedown, 'moodle', array('class' => 'iconsmall')),
|
||||
new pix_icon('t/down', $str->movedown, 'moodle', array('class' => 'iconsmall', 'title' => '')),
|
||||
null,
|
||||
array('class' => 'editing_movedown', 'title' => $str->movedown)
|
||||
);
|
||||
@@ -3191,7 +3193,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
|
||||
if ($hasmanageactivities) {
|
||||
$actions[] = new action_link(
|
||||
new moodle_url($baseurl, array('update' => $mod->id)),
|
||||
new pix_icon('t/edit', $str->update, 'moodle', array('class' => 'iconsmall')),
|
||||
new pix_icon('t/edit', $str->update, 'moodle', array('class' => 'iconsmall', 'title' => '')),
|
||||
null,
|
||||
array('class' => 'editing_update', 'title' => $str->update)
|
||||
);
|
||||
@@ -3201,7 +3203,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
|
||||
if (has_all_capabilities($dupecaps, $coursecontext) && plugin_supports('mod', $mod->modname, FEATURE_BACKUP_MOODLE2)) {
|
||||
$actions[] = new action_link(
|
||||
new moodle_url($baseurl, array('duplicate' => $mod->id)),
|
||||
new pix_icon('t/copy', $str->duplicate, 'moodle', array('class' => 'iconsmall')),
|
||||
new pix_icon('t/copy', $str->duplicate, 'moodle', array('class' => 'iconsmall', 'title' => '')),
|
||||
null,
|
||||
array('class' => 'editing_duplicate', 'title' => $str->duplicate)
|
||||
);
|
||||
@@ -3211,7 +3213,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
|
||||
if ($hasmanageactivities) {
|
||||
$actions[] = new action_link(
|
||||
new moodle_url($baseurl, array('delete' => $mod->id)),
|
||||
new pix_icon('t/delete', $str->delete, 'moodle', array('class' => 'iconsmall')),
|
||||
new pix_icon('t/delete', $str->delete, 'moodle', array('class' => 'iconsmall', 'title' => '')),
|
||||
null,
|
||||
array('class' => 'editing_delete', 'title' => $str->delete)
|
||||
);
|
||||
@@ -3222,14 +3224,14 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
|
||||
if ($mod->visible) {
|
||||
$actions[] = new action_link(
|
||||
new moodle_url($baseurl, array('hide' => $mod->id)),
|
||||
new pix_icon('t/hide', $str->hide, 'moodle', array('class' => 'iconsmall')),
|
||||
new pix_icon('t/hide', $str->hide, 'moodle', array('class' => 'iconsmall', 'title' => '')),
|
||||
null,
|
||||
array('class' => 'editing_hide', 'title' => $str->hide)
|
||||
);
|
||||
} else {
|
||||
$actions[] = new action_link(
|
||||
new moodle_url($baseurl, array('show' => $mod->id)),
|
||||
new pix_icon('t/show', $str->show, 'moodle', array('class' => 'iconsmall')),
|
||||
new pix_icon('t/show', $str->show, 'moodle', array('class' => 'iconsmall', 'title' => '')),
|
||||
null,
|
||||
array('class' => 'editing_show', 'title' => $str->show)
|
||||
);
|
||||
@@ -3260,7 +3262,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
|
||||
if ($mod->groupmodelink) {
|
||||
$actions[] = new action_link(
|
||||
new moodle_url($baseurl, array('id' => $mod->id, 'groupmode' => $groupmode)),
|
||||
new pix_icon($groupimage, $grouptitle, 'moodle', array('class' => 'iconsmall')),
|
||||
new pix_icon($groupimage, $grouptitle, 'moodle', array('class' => 'iconsmall', 'title' => '')),
|
||||
null,
|
||||
array('class' => $groupclass, 'title' => $grouptitle)
|
||||
);
|
||||
@@ -3273,7 +3275,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
|
||||
if (has_capability('moodle/role:assign', $modcontext)){
|
||||
$actions[] = new action_link(
|
||||
new moodle_url('/'.$CFG->admin.'/roles/assign.php', array('contextid' => $modcontext->id)),
|
||||
new pix_icon('i/roles', $str->assign, 'moodle', array('class' => 'iconsmall')),
|
||||
new pix_icon('i/roles', $str->assign, 'moodle', array('class' => 'iconsmall', 'title' => '')),
|
||||
null,
|
||||
array('class' => 'editing_assign', 'title' => $str->assign)
|
||||
);
|
||||
@@ -3948,7 +3950,7 @@ function average_number_of_participants() {
|
||||
WHERE ue.enrolid = e.id
|
||||
AND e.courseid <> :siteid
|
||||
AND c.id = e.courseid
|
||||
AND c.visible = 1) as total';
|
||||
AND c.visible = 1) total';
|
||||
$params = array('siteid' => $SITE->id);
|
||||
$enrolmenttotal = $DB->count_records_sql($sql, $params);
|
||||
|
||||
@@ -3981,7 +3983,7 @@ function average_number_of_courses_modules() {
|
||||
WHERE c.id = cm.course
|
||||
AND c.id <> :siteid
|
||||
AND cm.visible = 1
|
||||
AND c.visible = 1) as total';
|
||||
AND c.visible = 1) total';
|
||||
$params = array('siteid' => $SITE->id);
|
||||
$moduletotal = $DB->count_records_sql($sql, $params);
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
$move = optional_param('move', 0, PARAM_INT);
|
||||
$marker = optional_param('marker',-1 , PARAM_INT);
|
||||
$switchrole = optional_param('switchrole',-1, PARAM_INT);
|
||||
$return = optional_param('return', 0, PARAM_LOCALURL);
|
||||
|
||||
if (empty($id) && empty($name) && empty($idnumber)) {
|
||||
print_error('unspecifycourseid', 'error');
|
||||
@@ -110,6 +111,8 @@
|
||||
// Redirect to site root if Editing is toggled on frontpage
|
||||
if ($course->id == SITEID) {
|
||||
redirect($CFG->wwwroot .'/?redirect=0');
|
||||
} else if (!empty($return)) {
|
||||
redirect($CFG->wwwroot . $return);
|
||||
} else {
|
||||
redirect($PAGE->url);
|
||||
}
|
||||
@@ -122,6 +125,8 @@
|
||||
// Redirect to site root if Editing is toggled on frontpage
|
||||
if ($course->id == SITEID) {
|
||||
redirect($CFG->wwwroot .'/?redirect=0');
|
||||
} else if (!empty($return)) {
|
||||
redirect($CFG->wwwroot . $return);
|
||||
} else {
|
||||
redirect($PAGE->url);
|
||||
}
|
||||
|
||||
+6
-2
@@ -54,9 +54,9 @@ echo $OUTPUT->header(); // send headers
|
||||
|
||||
$manager = new course_enrolment_manager($PAGE, $course);
|
||||
|
||||
$outcome = new stdClass;
|
||||
$outcome = new stdClass();
|
||||
$outcome->success = true;
|
||||
$outcome->response = new stdClass;
|
||||
$outcome->response = new stdClass();
|
||||
$outcome->error = '';
|
||||
|
||||
switch ($action) {
|
||||
@@ -99,6 +99,10 @@ switch ($action) {
|
||||
$user->fullname = fullname($user);
|
||||
unset($user->id);
|
||||
}
|
||||
// Chrome will display users in the order of the array keys, so we need
|
||||
// to ensure that the results ordered array keys. Fortunately, the JavaScript
|
||||
// does not care what the array keys are. It uses user.id where necessary.
|
||||
$outcome->response['users'] = array_values($outcome->response['users']);
|
||||
$outcome->success = true;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -415,8 +415,8 @@ function authorize_print_order($orderid)
|
||||
}
|
||||
$a = new stdClass;
|
||||
$a->upto = $upto;
|
||||
$extrahtml = get_string('howmuch', 'enrol_authorize') .
|
||||
' <input type="text" size="5" name="amount" value="'.$amount.'" /> ' .
|
||||
$extrahtml = '<label for="amount">'.get_string('howmuch', 'enrol_authorize').'</label> ' .
|
||||
'<input id="amount" type="text" size="5" name="amount" value="'.$amount.'" /> ' .
|
||||
get_string('canbecredit', 'enrol_authorize', $a) . '<br />';
|
||||
$table->data[] = array("<b>$strs->confirm:</b>",
|
||||
authorize_print_action_button($orderid, ORDER_REFUND, 0, true, $authstrs->unenrolstudent, $strs->no, $extrahtml));
|
||||
|
||||
@@ -446,9 +446,8 @@ class enrol_database_plugin extends enrol_plugin {
|
||||
}
|
||||
$rs->Close();
|
||||
} else {
|
||||
mtrace('Error while communicating with external enrolment database');
|
||||
$extdb->Close();
|
||||
return;
|
||||
mtrace(" error: skipping course '$course->mapping' - could not match with external database");
|
||||
continue;
|
||||
}
|
||||
unset($user_mapping);
|
||||
|
||||
@@ -593,7 +592,7 @@ class enrol_database_plugin extends enrol_plugin {
|
||||
if ($idnumber) {
|
||||
$sqlfields[] = $idnumber;
|
||||
}
|
||||
$sql = $this->db_get_sql($table, array(), $sqlfields);
|
||||
$sql = $this->db_get_sql($table, array(), $sqlfields, true);
|
||||
$createcourses = array();
|
||||
if ($rs = $extdb->Execute($sql)) {
|
||||
if (!$rs->EOF) {
|
||||
|
||||
@@ -371,7 +371,7 @@ class core_role_external extends external_api {
|
||||
// throw an exception if user is not able to assign the role in this context
|
||||
$roles = get_assignable_roles($context, ROLENAME_SHORT);
|
||||
|
||||
if (!key_exists($assignment['roleid'], $roles)) {
|
||||
if (!array_key_exists($assignment['roleid'], $roles)) {
|
||||
throw new invalid_parameter_exception('Can not assign roleid='.$assignment['roleid'].' in contextid='.$assignment['contextid']);
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ class core_role_external extends external_api {
|
||||
|
||||
// throw an exception if user is not able to unassign the role in this context
|
||||
$roles = get_assignable_roles($context, ROLENAME_SHORT);
|
||||
if (!key_exists($unassignment['roleid'], $roles)) {
|
||||
if (!array_key_exists($unassignment['roleid'], $roles)) {
|
||||
throw new invalid_parameter_exception('Can not unassign roleid='.$unassignment['roleid'].' in contextid='.$unassignment['contextid']);
|
||||
}
|
||||
|
||||
|
||||
@@ -93,6 +93,8 @@ $string['pluginname'] = 'LDAP enrolments';
|
||||
$string['pluginname_desc'] = '<p>You can use an LDAP server to control your enrolments. It is assumed your LDAP tree contains groups that map to the courses, and that each of those groups/courses will have membership entries to map to students.</p><p>It is assumed that courses are defined as groups in LDAP, with each group having multiple membership fields (<em>member</em> or <em>memberUid</em>) that contain a uniqueidentification of the user.</p><p>To use LDAP enrolment, your users <strong>must</strong> to have a valid idnumber field. The LDAP groups must have that idnumber in the member fields for a user to be enrolled in the course. This will usually work well if you are already using LDAP Authentication.</p><p>Enrolments will be updated when the user logs in. You can also run a script to keep enrolments in synch. Look in <em>enrol/ldap/cli/sync.php</em>.</p><p>This plugin can also be set to automatically create new courses when new groups appear in LDAP.</p>';
|
||||
$string['pluginnotenabled'] = 'Plugin not enabled!';
|
||||
$string['role_mapping'] = '<p>For each role that you want to assign from LDAP, you need to specify the list of contexts where the role courses\'s groups are located. Separate different contexts with \';\'.</p><p>You also need to specify the attribute your LDAP server uses to hold the members of a group. Usually \'member\' or \'memberUid\'</p>';
|
||||
$string['role_mapping_attribute'] = 'LDAP member attribute for {$a}';
|
||||
$string['role_mapping_context'] = 'LDAP contexts for {$a}';
|
||||
$string['role_mapping_key'] = 'Map roles from LDAP ';
|
||||
$string['roles'] = 'Role mapping';
|
||||
$string['server_settings'] = 'LDAP server settings';
|
||||
|
||||
@@ -151,7 +151,8 @@ class admin_setting_ldap_rolemapping extends admin_setting {
|
||||
foreach ($data as $role) {
|
||||
$contextid = $this->get_id().'['.$role['id'].'][contexts]';
|
||||
$contextname = $this->get_full_name().'['.$role['id'].'][contexts]';
|
||||
$return .= '<div style="height: 2em;"><input type="text" size="40" id="'.$contextid.'" name="'.$contextname.'" value="'.s($role['contexts']).'"/></div>';
|
||||
$return .= '<div style="height: 2em;"><label class="accesshide" for="'.$contextid.'">'.get_string('role_mapping_context', 'enrol_ldap', $role['name']).'</label>';
|
||||
$return .= '<input type="text" size="40" id="'.$contextid.'" name="'.$contextname.'" value="'.s($role['contexts']).'"/></div>';
|
||||
}
|
||||
$return .= '</div>';
|
||||
|
||||
@@ -160,7 +161,8 @@ class admin_setting_ldap_rolemapping extends admin_setting {
|
||||
foreach ($data as $role) {
|
||||
$memberattrid = $this->get_id().'['.$role['id'].'][memberattribute]';
|
||||
$memberattrname = $this->get_full_name().'['.$role['id'].'][memberattribute]';
|
||||
$return .= '<div style="height: 2em;"><input type="text" size="15" id="'.$memberattrid.'" name="'.$memberattrname.'" value="'.s($role['memberattribute']).'"/></div>';
|
||||
$return .= '<div style="height: 2em;"><label class="accesshide" for="'.$memberattrid.'">'.get_string('role_mapping_attribute', 'enrol_ldap', $role['name']).'</label>';
|
||||
$return .= '<input type="text" size="15" id="'.$memberattrid.'" name="'.$memberattrname.'" value="'.s($role['memberattribute']).'"/></div>';
|
||||
}
|
||||
$return .= '</div>';
|
||||
$return .= '<div style="clear:both;"></div>';
|
||||
|
||||
+3
-1
@@ -770,13 +770,15 @@ class course_enrolment_manager {
|
||||
|
||||
$users = array();
|
||||
foreach ($userroles as $userrole) {
|
||||
$contextid = $userrole->contextid;
|
||||
unset($userrole->contextid); // This would collide with user avatar.
|
||||
if (!array_key_exists($userrole->id, $users)) {
|
||||
$users[$userrole->id] = $this->prepare_user_for_display($userrole, $extrafields, $now);
|
||||
}
|
||||
$a = new stdClass;
|
||||
$a->role = $roles[$userrole->roleid]->localname;
|
||||
$changeable = ($userrole->component == '');
|
||||
if ($userrole->contextid == $this->context->id) {
|
||||
if ($contextid == $this->context->id) {
|
||||
$roletext = get_string('rolefromthiscourse', 'enrol', $a);
|
||||
} else {
|
||||
$changeable = false;
|
||||
|
||||
@@ -53,9 +53,9 @@ echo $OUTPUT->header(); // send headers
|
||||
|
||||
$manager = new course_enrolment_manager($PAGE, $course);
|
||||
|
||||
$outcome = new stdClass;
|
||||
$outcome = new stdClass();
|
||||
$outcome->success = true;
|
||||
$outcome->response = new stdClass;
|
||||
$outcome->response = new stdClass();
|
||||
$outcome->error = '';
|
||||
|
||||
switch ($action) {
|
||||
@@ -79,6 +79,10 @@ switch ($action) {
|
||||
}
|
||||
$user->extrafields = implode(', ', $fieldvalues);
|
||||
}
|
||||
// Chrome will display users in the order of the array keys, so we need
|
||||
// to ensure that the results ordered array keys. Fortunately, the JavaScript
|
||||
// does not care what the array keys are. It uses user.id where necessary.
|
||||
$outcome->response['users'] = array_values($outcome->response['users']);
|
||||
$outcome->success = true;
|
||||
break;
|
||||
case 'enrol':
|
||||
@@ -135,4 +139,4 @@ switch ($action) {
|
||||
throw new enrol_ajax_exception('unknowajaxaction');
|
||||
}
|
||||
|
||||
echo json_encode($outcome);
|
||||
echo json_encode($outcome);
|
||||
|
||||
@@ -90,7 +90,7 @@ class enrol_manual_external extends external_api {
|
||||
|
||||
//throw an exception if user is not able to assign the role
|
||||
$roles = get_assignable_roles($context);
|
||||
if (!key_exists($enrolment['roleid'], $roles)) {
|
||||
if (!array_key_exists($enrolment['roleid'], $roles)) {
|
||||
$errorparams = new stdClass();
|
||||
$errorparams->roleid = $enrolment['roleid'];
|
||||
$errorparams->courseid = $enrolment['courseid'];
|
||||
|
||||
@@ -64,7 +64,7 @@ $PAGE->set_heading($course->fullname);
|
||||
navigation_node::override_active_url(new moodle_url('/enrol/users.php', array('id'=>$course->id)));
|
||||
|
||||
// Create the user selector objects.
|
||||
$options = array('enrolid' => $enrolid);
|
||||
$options = array('enrolid' => $enrolid, 'accesscontext' => $context);
|
||||
|
||||
$potentialuserselector = new enrol_manual_potential_participant('addselect', $options);
|
||||
$currentuserselector = new enrol_manual_current_participant('removeselect', $options);
|
||||
|
||||
@@ -35,10 +35,11 @@ if (!$course = $DB->get_record("course", array("id"=>$id))) {
|
||||
}
|
||||
|
||||
$context = get_context_instance(CONTEXT_COURSE, $course->id, MUST_EXIST);
|
||||
$PAGE->set_context($context);
|
||||
|
||||
require_login();
|
||||
|
||||
if ($SESSION->wantsurl) {
|
||||
if (!empty($SESSION->wantsurl)) {
|
||||
$destination = $SESSION->wantsurl;
|
||||
unset($SESSION->wantsurl);
|
||||
} else {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
.moodle-dialogue-base .moodle-dialogue-hd {font-size:110%;color:inherit;font-weight:bold;text-align:left;padding:5px 6px;margin:0;border-bottom:1px solid #ccc;background-color:#f6f6f6;}
|
||||
.moodle-dialogue-base .closebutton {background-image:url(sprite.png);width:25px;height:15px;background-repeat:no-repeat;float:right;vertical-align:middle;display:inline-block;cursor:pointer;}
|
||||
.moodle-dialogue-base .moodle-dialogue-bd {padding:5px; overflow: auto;}
|
||||
.moodle-dialogue-base .moodle-dialogue-fd {}
|
||||
.moodle-dialogue-base .moodle-dialogue-ft {}
|
||||
|
||||
.moodle-dialogue-confirm .confirmation-dialogue {text-align:center;}
|
||||
.moodle-dialogue-confirm .confirmation-message {margin:0.5em 1em;}
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@ var DIALOGUE_NAME = 'Moodle dialogue',
|
||||
HEADER : 'moodle-dialogue-hd',
|
||||
BODY : 'moodle-dialogue-bd',
|
||||
CONTENT : 'moodle-dialogue-content',
|
||||
FOOTER : 'moodle-dialogue-fd',
|
||||
FOOTER : 'moodle-dialogue-ft',
|
||||
HIDDEN : 'hidden',
|
||||
LIGHTBOX : 'moodle-dialogue-lightbox'
|
||||
};
|
||||
@@ -35,7 +35,7 @@ var DIALOGUE = function(config) {
|
||||
.append(C('<div id="'+id+'" class="'+CSS.WRAP+'"></div>')
|
||||
.append(C('<div class="'+CSS.HEADER+' yui3-widget-hd"></div>'))
|
||||
.append(C('<div class="'+CSS.BODY+' yui3-widget-bd"></div>'))
|
||||
.append(C('<div class="'+CSS.CONTENT+' yui3-widget-ft"></div>')));
|
||||
.append(C('<div class="'+CSS.FOOTER+' yui3-widget-ft"></div>')));
|
||||
Y.one(document.body).append(config.notificationBase);
|
||||
config.srcNode = '#'+id;
|
||||
config.width = config.width || '400px';
|
||||
@@ -372,4 +372,4 @@ M.core.confirm = CONFIRM;
|
||||
M.core.exception = EXCEPTION;
|
||||
M.core.ajaxException = AJAXEXCEPTION;
|
||||
|
||||
}, '@VERSION@', {requires:['base','node','overlay','event-key', 'moodle-enrol-notification-skin']});
|
||||
}, '@VERSION@', {requires:['base','node','overlay','event-key', 'moodle-enrol-notification-skin']});
|
||||
|
||||
+1
-1
@@ -1445,7 +1445,7 @@ class grade_structure {
|
||||
|
||||
$url->param('action', 'show');
|
||||
|
||||
$hideicon = $OUTPUT->action_icon($url, new pix_icon('t/'.$type, $tooltip, 'moodle', array('alt'=>$strshow, 'class'=>'iconsmall')));
|
||||
$hideicon = $OUTPUT->action_icon($url, new pix_icon('t/'.$type, $tooltip, 'moodle', array('alt'=>$strshow, 'class'=>'smallicon')));
|
||||
|
||||
} else {
|
||||
$url->param('action', 'hide');
|
||||
|
||||
+16
-10
@@ -339,23 +339,29 @@ class grade_report_user extends grade_report {
|
||||
$hidden = ' hidden';
|
||||
}
|
||||
|
||||
$hide = false;
|
||||
// If this is a hidden grade item, hide it completely from the user.
|
||||
if ($grade_grade->is_hidden() && !$this->canviewhidden && (
|
||||
$this->showhiddenitems == GRADE_REPORT_USER_HIDE_HIDDEN ||
|
||||
($this->showhiddenitems == GRADE_REPORT_USER_HIDE_UNTIL && !$grade_grade->is_hiddenuntil()))) {
|
||||
// return false;
|
||||
} else {
|
||||
// The grade object can be marked visible but still be hidden
|
||||
// if "enablegroupmembersonly" is on and its an activity assigned to a grouping the user is not in
|
||||
if (!empty($grade_object->itemmodule) && !empty($grade_object->iteminstance)) {
|
||||
$instances = $this->gtree->modinfo->get_instances();
|
||||
if (!empty($instances[$grade_object->itemmodule][$grade_object->iteminstance])) {
|
||||
$cm = $instances[$grade_object->itemmodule][$grade_object->iteminstance];
|
||||
if (!$cm->uservisible) {
|
||||
return false;
|
||||
$hide = true;
|
||||
} else if (!empty($grade_object->itemmodule) && !empty($grade_object->iteminstance)) {
|
||||
// The grade object can be marked visible but still be hidden if...
|
||||
// 1) "enablegroupmembersonly" is on and the activity is assigned to a grouping the user is not in.
|
||||
// 2) the student cannot see the activity due to conditional access and its set to be hidden entirely.
|
||||
$instances = $this->gtree->modinfo->get_instances_of($grade_object->itemmodule);
|
||||
if (!empty($instances[$grade_object->iteminstance])) {
|
||||
$cm = $instances[$grade_object->iteminstance];
|
||||
if (!$cm->uservisible) {
|
||||
// Further checks are required to determine whether the activity is entirely hidden or just greyed out.
|
||||
if ($cm->is_user_access_restricted_by_group() || $cm->is_user_access_restricted_by_conditional_access()) {
|
||||
$hide = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$hide) {
|
||||
/// Excluded Item
|
||||
if ($grade_grade->is_excluded()) {
|
||||
$fullname .= ' ['.get_string('excluded', 'grades').']';
|
||||
|
||||
+11
-10
@@ -205,17 +205,18 @@ function groups_update_group_icon($group, $data, $editform) {
|
||||
$context = get_context_instance(CONTEXT_COURSE, $group->courseid, MUST_EXIST);
|
||||
|
||||
//TODO: it would make sense to allow picture deleting too (skodak)
|
||||
|
||||
if ($iconfile = $editform->save_temp_file('imagefile')) {
|
||||
if (process_new_icon($context, 'group', 'icon', $group->id, $iconfile)) {
|
||||
$DB->set_field('groups', 'picture', 1, array('id'=>$group->id));
|
||||
$group->picture = 1;
|
||||
} else {
|
||||
$fs->delete_area_files($context->id, 'group', 'icon', $group->id);
|
||||
$DB->set_field('groups', 'picture', 0, array('id'=>$group->id));
|
||||
$group->picture = 0;
|
||||
if (!empty($CFG->gdversion)) {
|
||||
if ($iconfile = $editform->save_temp_file('imagefile')) {
|
||||
if (process_new_icon($context, 'group', 'icon', $group->id, $iconfile)) {
|
||||
$DB->set_field('groups', 'picture', 1, array('id'=>$group->id));
|
||||
$group->picture = 1;
|
||||
} else {
|
||||
$fs->delete_area_files($context->id, 'group', 'icon', $group->id);
|
||||
$DB->set_field('groups', 'picture', 0, array('id'=>$group->id));
|
||||
$group->picture = 0;
|
||||
}
|
||||
@unlink($iconfile);
|
||||
}
|
||||
@unlink($iconfile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -193,17 +193,21 @@
|
||||
break;
|
||||
|
||||
case FRONTPAGECOURSELIST:
|
||||
$ncourses = $DB->count_records('course');
|
||||
if (isloggedin() and !$hassiteconfig and !isguestuser() and empty($CFG->disablemycourses)) {
|
||||
echo html_writer::tag('a', get_string('skipa', 'access', moodle_strtolower(get_string('mycourses'))), array('href'=>'#skipmycourses', 'class'=>'skip-block'));
|
||||
echo $OUTPUT->heading(get_string('mycourses'), 2, 'headingblock header');
|
||||
print_my_moodle();
|
||||
echo html_writer::tag('span', '', array('class'=>'skip-block-to', 'id'=>'skipmycourses'));
|
||||
} else if ((!$hassiteconfig and !isguestuser()) or ($DB->count_records('course') <= FRONTPAGECOURSELIMIT)) {
|
||||
} else if ((!$hassiteconfig and !isguestuser()) or ($ncourses <= FRONTPAGECOURSELIMIT)) {
|
||||
// admin should not see list of courses when there are too many of them
|
||||
echo html_writer::tag('a', get_string('skipa', 'access', moodle_strtolower(get_string('availablecourses'))), array('href'=>'#skipavailablecourses', 'class'=>'skip-block'));
|
||||
echo $OUTPUT->heading(get_string('availablecourses'), 2, 'headingblock header');
|
||||
print_courses(0);
|
||||
echo html_writer::tag('span', '', array('class'=>'skip-block-to', 'id'=>'skipavailablecourses'));
|
||||
} else {
|
||||
echo html_writer::tag('div', get_string('therearecourses', '', $ncourses), array('class' => 'notifyproblem'));
|
||||
print_course_search('', false, 'short');
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -51,4 +51,5 @@ $string['pathssubdataroot'] = 'Тази директория е място, къ
|
||||
$string['pathssubdirroot'] = 'Пълен път до директорията на Moodle.';
|
||||
$string['pathssubwwwroot'] = 'Пълен интернет адрес, на който ще се отваря Moodle. Не е възможно Moodle да се отваря чрез различни адреси. Ако Вашият сайт има няколко адреса трябва на всеки от другите адреси да направите пренасочване към този. Ако Вашият сайт се отваря както глобално от Интернет, така и от локална мрежа, настройте DNS, така че потребителите от локалната мрежа също да могат да ползват глобалния адрес. Ако адресът не е коректен, моля, променете адреса в браузъра си и започнете инсталирането с правилния адрес.';
|
||||
$string['phpextension'] = '{$a} разширение на PHP';
|
||||
$string['phpversionhelp'] = '<p>Moodle изисква версия на PHP най-малко 4.3.0 или 5.1.0 (5.0.x има значителен брой известни проблеми).</p> <p>Вие използвате в момента версия {$a}</p> <p>Трябва да обновите PHP или да се преместите на нов хост (сървър) с по-нова версия на PHP!<br /> (В случая с 5.0.x може да опитате да инсталирате по-старата версия 4.4.x)</p>';
|
||||
$string['wwwroot'] = 'Уеб адрес';
|
||||
|
||||
@@ -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'] = 'English for kids';
|
||||
@@ -85,7 +85,7 @@ $string['phpversionhelp'] = '<p>Moodle requiere al menos una versión de PHP 4.3
|
||||
(En caso de 5.0.x podría también revertir a la versión 4.4.x)</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Si está viendo esta página es porque ha podido ejecutar el paquete <strong>{$a->packname} {$a->packversion}</strong> en su computadora. !Enhorabuena!';
|
||||
$string['welcomep30'] = 'Esta versión de <strong>{$a->installername}</strong> incluye las aplicaciones necesarias para que <strong>Moodle</strong> funcione en su computadora principalmente:';
|
||||
$string['welcomep30'] = 'Esta versión de <strong>{$a->installername}</strong> incluye las aplicaciones necesarias para que <strong>Moodle</strong> funcione en su computadora, principalmente:';
|
||||
$string['welcomep40'] = 'El paquete también incluye <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'El uso de todas las aplicaciones del paquete está gobernado por sus respectivas
|
||||
licencias. El programa <strong>{$a->installername}</strong> es
|
||||
|
||||
@@ -39,5 +39,5 @@ $string['clitypevaluedefault'] = 'sartu balorea, sakatu Enter-i berezko balorea
|
||||
$string['cliunknowoption'] = 'Aukera ezezagunak:{$a}
|
||||
Mesedez, erabili --laguntza aukera.';
|
||||
$string['cliyesnoprompt'] = 'idatzi b (bai esateko) edo e (ez esateko)';
|
||||
$string['environmentrequireinstall'] = 'derrigorrezkoa da instalatuta etagaituta izatea';
|
||||
$string['environmentrequireinstall'] = 'derrigorrezkoa da instalatuta eta gaituta izatea';
|
||||
$string['environmentrequireversion'] = '{$a->needed} bertsioa beharrezkoa da eta zu {$a->current} ari zara egikaritzen';
|
||||
|
||||
@@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die();
|
||||
$string['admindirname'] = 'Ylläpitohakemisto';
|
||||
$string['availablelangs'] = 'Saatavilla olevat kielipaketit';
|
||||
$string['chooselanguagehead'] = 'Valitse kieli';
|
||||
$string['chooselanguagesub'] = 'Valitse kieli asennusohjelmaa varten. Tätä kieltä käytetään sivuston oletuskielenä. Voit valita muita kieliä käyttöösi myöhemmin.';
|
||||
$string['chooselanguagesub'] = 'Valitse kieli asennusohjelmaa varten. Tätä kieltä käytetään sivuston oletuskielenä, jonka voi vaihtaa tarpeen mukaan. Myöhemmin voit myös lisätä käyttöön muitakin kieliä.';
|
||||
$string['clialreadyconfigured'] = 'Tiedosto config.php on jo olemassa, käytä admin/cli/install_database.php -tiedostoa jos haluat asentaa tämän sivuston.';
|
||||
$string['clialreadyinstalled'] = 'Tiedosto config.php on jo olemassa, ole hyvä ja käytä admin/cli/upgrade.php:ta jos haluat päivittää sivustosi';
|
||||
$string['cliinstallheader'] = 'Moodlen {$a} komentoriviasennusohjelma';
|
||||
@@ -82,10 +82,7 @@ $string['pathsunsecuredataroot'] = 'Dataroot-sijainti on turvallinen';
|
||||
$string['pathswrongadmindir'] = 'Admin-hakemistoa ei ole';
|
||||
$string['phpextension'] = '{$a} PHP-lisäosa';
|
||||
$string['phpversion'] = 'PHP versio';
|
||||
$string['phpversionhelp'] = '<p>Moodle vaatii vähintään PHP version 4.3.0 tai 5.1.0 (5.0.x -versiossa on joitakin tunnettuja ongelmia).</p>
|
||||
<p>Käytät parhaillaan versiota {$a}</p>
|
||||
<p>Sinun täytyy päivittää PHP tai siirtää asennus palvelimelle jossa on uudempi PHP-versio!<br>
|
||||
(jos sinulla on versio 5.0.x, voit myös siirtyä versioon 4.4.x) </p>';
|
||||
$string['phpversionhelp'] = '<p>Moodle vaatii vähintään PHP-version 4.3.0 tai 5.1.0 (5.0.x sisältää monia tunnettuja ongelmia).</p> <p>Käytössäsi on versio {$a}</p> <p>Sinun pitää päivittää PHP tai siirtää palvelimelle jossa on uudempi PHP.<br /> (Jos käytössäsi on 5.0.x voit myös päivittää alaspäin 4.4.x -versioon)</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Näet tämän sivun koska olet onnistuneesti asentanut ja käynnistänyt <strong>{$a->packname} {$a->packversion}</strong> paketin tietokoneellasi.
|
||||
Onnittelut!';
|
||||
|
||||
@@ -30,4 +30,5 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thislanguage'] = 'Føroyskt';
|
||||
|
||||
@@ -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'] = 'Ní féidir eolaire teanga a chruthú';
|
||||
$string['cannotcreatetempdir'] = 'Ní féidir eolaire sealadach a chruthú';
|
||||
$string['cannotdownloadcomponents'] = 'Ní féidir na comhphairteanna a íoslódáil';
|
||||
$string['cannotdownloadzipfile'] = 'Ní féidir comhad ZIP a íoslódáil';
|
||||
$string['cannotfindcomponent'] = 'Ní féidir teacht ar chomhpháirt';
|
||||
$string['cannotsavemd5file'] = 'Ni féidir an comhad md5 a shábháil';
|
||||
$string['cannotsavezipfile'] = 'Ni féidir an comhad ZIP a shábháil';
|
||||
$string['cannotunzipfile'] = 'Ní féidir an comhad a dhízipeáil';
|
||||
$string['componentisuptodate'] = 'Tá an chomhpháirt suas chun dáta';
|
||||
$string['downloadedfilecheckfailed'] = 'Theip ar an seiceáil comhaid íoslódailte';
|
||||
$string['invalidmd5'] = 'Bhí "an athróg seiceála mícheart – triail arís é';
|
||||
$string['missingrequiredfield'] = 'Réimse riachtanach ar iarraidh';
|
||||
$string['remotedownloaderror'] = 'Theip ar íoslódail comhpháirte chuig do fhreastalaí, dearbhaigh seachshocruithe moltar iarmhíreanna , PHP cURL go hard.<br /"><br />Y Caithfidh tú an comhad <a href="""{$a->url}"">{$a->url}</a> a íoslódáil de láimh';
|
||||
$string['wrongdestpath'] = 'Cosán sprice mícheart';
|
||||
$string['wrongsourcebase'] = 'Foinse mícheart do bhunachar URL';
|
||||
$string['wrongzipfilename'] = 'Ainm mícherat comhaid ZIP';
|
||||
@@ -101,11 +101,9 @@ $string['welcomep40'] = 'החבילה כוללת בנוסף
|
||||
$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>';
|
||||
<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>Moodle</strong> במחשבך.
|
||||
תוכל לאשר את הגדרות ברירת המחדל או, באפשרותך, לשנותם לפי צרכיך.';
|
||||
$string['welcomep70'] = 'לחצו "המשך" למטה כדי להמשיך עם הגדרת ה-<strong>Moodle</strong>';
|
||||
|
||||
@@ -30,5 +30,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = '';
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thislanguage'] = 'Italiano';
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle installer
|
||||
*
|
||||
* Do not edit this file manually! It contains just a subset of strings
|
||||
* needed during the very first steps of installation. This file was
|
||||
* generated automatically by export-installer.php (which is part of AMOS
|
||||
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
|
||||
* list of strings defined in /install/stringnames.txt.
|
||||
*
|
||||
* @package installer
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = 'ja';
|
||||
$string['thislanguage'] = 'Japanese - kids';
|
||||
@@ -87,7 +87,7 @@ $string['welcomep20'] = '당신의 컴퓨터에 <strong>{$a->packname} {$a->pack
|
||||
$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> 라이선스에 의해 배포됩니다.';
|
||||
<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'] = '웹 주소';
|
||||
|
||||
@@ -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'] = 't';
|
||||
$string['cliansweryes'] = 'y';
|
||||
$string['cliincorrectvalueerror'] = 'Ralat, nilai tidak betul "{$a->value}" untuk "{$a->option}"';
|
||||
$string['cliincorrectvalueretry'] = 'Nilai yang salah, sila cuba lagi';
|
||||
$string['clitypevalue'] = 'taip nilai';
|
||||
$string['clitypevaluedefault'] = 'taip nilai, tekan Enter untuk gunakan nilai lalai ({$a})';
|
||||
$string['cliunknowoption'] = 'Pilihan yang tidak diketahui:
|
||||
{$a}
|
||||
Sila gunakan pilihan --help';
|
||||
$string['cliyesnoprompt'] = 'tapi y (ya) atau t (tidak)';
|
||||
@@ -0,0 +1,83 @@
|
||||
<?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'] = 'Direktori admin';
|
||||
$string['availablelangs'] = 'Senarai bahasa yang tersedia';
|
||||
$string['chooselanguagehead'] = 'Pilih bahasa';
|
||||
$string['chooselanguagesub'] = 'Sila pilih bahasa untuk pemasangan. Bahasa ini juga akan digunakan sebagai bahasa lalai untuk laman, ia boleh diubah kemudian.';
|
||||
$string['clialreadyinstalled'] = 'config.php fail sudah wujud, sila gunakan admin/cli/upgrade.php jika anda mahu menaik taraf laman web anda.';
|
||||
$string['cliinstallheader'] = 'Baris arahan pemasangan program Moodle {$a}';
|
||||
$string['databasehost'] = 'Hos pangkalan data';
|
||||
$string['databasename'] = 'Nama pangkalan data';
|
||||
$string['databasetypehead'] = 'Pilih pemacu pangkalan data';
|
||||
$string['dataroot'] = 'Direktori data';
|
||||
$string['dbprefix'] = 'Awalan jadual';
|
||||
$string['dirroot'] = 'Direktori Moodle';
|
||||
$string['environmenthead'] = 'Memeriksa persekitaran anda ...';
|
||||
$string['environmentsub2'] = 'Setiap pelepasan Moodle mempunyai keperluan minimum versi PHP dan beberapa sambungan mandatori PHP. Persekitaran penuh disemak sebelum setiap pemasangan dan naik taraf. Sila hubungi pentadbir pelayan jika anda tidak tahu bagaimana untuk memasang versi baru atau membolehkan sambungan PHP.';
|
||||
$string['errorsinenvironment'] = 'Semakan persekitaran gagal!';
|
||||
$string['installation'] = 'Pemasangan';
|
||||
$string['langdownloaderror'] = 'Malangnya bahasa "{$a}" tidak boleh dimuat turun. Proses pemasangan akan diteruskan dalam bahasa Bahasa Inggeris.';
|
||||
$string['memorylimithelp'] = '<p> Had memori PHP untuk pelayan anda ditetapkan kepada {$a}. </p>
|
||||
|
||||
<p> Hal ini akan menyebabkan Moodle untuk mendapat masalah memori di kemudian hari, terutama jika anda mempunyai banyak modul yang diaktifkan dan/atau ramai pengguna. </p>
|
||||
|
||||
<p> Kami menyarankan anda mengkonfigurasikan PHP dengan had yang lebih tinggi jika memungkinkan, seperti 40M. Ada beberapa cara untuk melakukan hal ini yang anda boleh cuba: </p>
|
||||
<ol>
|
||||
<li> Jika anda mampu, kompil semula PHP dengan <i>--enable-memory-limit.</i> Hal ini akan membolehkan Moodle untuk menetapkan batas memori itu sendiri. </li>
|
||||
<li> Jika anda mempunyai akses ke fail php.ini, anda boleh menukar setting <b>memory_limit</b> di sana untuk sesuatu seperti 40M. Jika anda tidak mempunyai akses anda mungkin boleh meminta pentadbir anda untuk melakukan ini untuk anda. </li>
|
||||
<li> Pada beberapa server PHP anda boleh mencipta baris fail .htaccess di direktori Moodle mengandungi ini: <blockquote><div> php_value memory_limit 40M </div></blockquote><p> Namun, pada beberapa server ini akan mencegah <b>semua</b> laman PHP dari berjalan (anda akan melihat ralat ketika anda melihat halaman), sehingga anda hapuskan file .htaccess. </p></li></ol>';
|
||||
$string['paths'] = 'Laluan';
|
||||
$string['pathserrcreatedataroot'] = 'Direktori data ({$a->dataroot}) tidak boleh diwujudkan oleh pemasang.';
|
||||
$string['pathshead'] = 'Sahkan laluan';
|
||||
$string['pathsrodataroot'] = 'Direktori dataroot tidak dapat ditulis.';
|
||||
$string['pathsroparentdataroot'] = 'Direktori induk ({$a->parent}) tidak boleh tulis. Direktori data ({$a->dataroot}) tidak boleh diwujudkan oleh pemasang.';
|
||||
$string['pathssubadmindir'] = 'Beberapa webhos menggunakan /admin sebagai URL khas untuk anda akses panel kawalan atau sesuatu yang lain. Malangnya, ini bertentangan dengan lokasi standard untuk halaman pentadbiran Moodle. Anda boleh memperbaiki ini dengan menamakan semula direktori admin dalam pemasangan anda, dan meletakkan nama baru di sini. Sebagai contoh: <br /> <br /> <b> moodleadmin </ b> <br /> <br />
|
||||
Ini akan memulihkan pautan admin dalam Moodle.';
|
||||
$string['pathssubdataroot'] = 'Anda perlukan lokasi di mana Moodle boleh menyimpan fail yang dimuat naik. Direktori ini sepatutnya boleh dibaca DAN BOLEH DITULIS oleh pengguna web server (biasanya \'nobody\' atau \'apache\'), tetapi ia mestilah tidak boleh diakses secara langsung melalui laman web. Pemasang akan cuba untuk mewujudkannya jika belum ada.';
|
||||
$string['pathssubdirroot'] = 'Direktori laluan penuh untuk pemasangan Moodle.';
|
||||
$string['pathssubwwwroot'] = 'Alamat penuh web di mana Moodle akan dicapai. Adalah tidak mungkin untuk mengakses Moodle menggunakan pelbagai alamat. Jika laman anda mempunyai beberapa alamat awam, anda mesti menubuhkan pelencongan kekal kepada semua mereka kecuali yang satu ini. Jika laman web anda boleh diakses kedua-duanya dari Intranet dan Internet menggunakan alamat awam di sini dan menubuhkan DNS supaya pengguna Intranet boleh menggunakan alamat awam juga. Jika alamat itu tidak betul, sila ubah URL di pelayar anda untuk memulakan semula pemasangan dengan nilai yang berbeza.';
|
||||
$string['pathsunsecuredataroot'] = 'Lokasi dataroot tidak selamat';
|
||||
$string['pathswrongadmindir'] = 'Direktori admin tidak wujud';
|
||||
$string['phpextension'] = 'Sambungan PHP {$a}';
|
||||
$string['phpversion'] = 'Versi PHP';
|
||||
$string['phpversionhelp'] = '<p> Moodle memerlukan versi PHP minimal 4.3.0 atau 5.1.0 (5.0.x memiliki sejumlah masalah yang diketahui). </p>
|
||||
<p> Anda sedang menjalankan versi {$a} </p>
|
||||
<p> Anda harus upgrade PHP atau berpindah ke host dengan versi terbaru PHP! <br /> (Dalam kes 5.0.x Anda juga boleh turun taraf ke versi 4.4.x) </p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Anda melihat halaman ini kerana anda telah berjaya memasang dan melancarkan pakej <strong>{$a->packname} {$a->packversion}</strong> di komputer anda. Tahniah!';
|
||||
$string['welcomep30'] = 'Keluaran ini <strong>{$a->installername}</strong> termasuk aplikasi untuk mencipta sebuah persekitaran di mana <strong>Moodle</strong> akan beroperasi, iaitu:';
|
||||
$string['welcomep40'] = 'Pakej ini juga termasuk <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'Penggunaan semua aplikasi di dalam pakej ini dikawal oleh lesen masing-masing. Pakej lengkap <strong>{$a->installername}</strong> adalah <a href="http://www.opensource.org/docs/definition_plain.html">sumber terbuka</a> dan diedarkan di bawah lesen <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
|
||||
$string['welcomep60'] = 'Laman-laman berikut akan membawa anda melalui beberapa langkah-langkah mudah diikuti untuk mengkonfigurasi dan menetapkan <strong>Moodle</strong> pada komputer anda. Anda mungkin menerima tetapan lalai atau, dengan pilihan, meminda untuk disesuaikan dengan keperluan anda.';
|
||||
$string['welcomep70'] = 'Klik butang "Seterusnya" di bawah untuk meneruskan penubuhan <strong>Moodle</strong>.';
|
||||
$string['wwwroot'] = 'Alamat Web';
|
||||
@@ -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'] = 'Bahasa';
|
||||
$string['next'] = 'Seterusnya';
|
||||
$string['previous'] = 'Sebelum';
|
||||
$string['reload'] = 'Muat semula';
|
||||
@@ -42,7 +42,7 @@ $string['componentisuptodate'] = 'Komponenten er oppdatert';
|
||||
$string['downloadedfilecheckfailed'] = 'Sjekk av nedlastet fil mislykkes.';
|
||||
$string['invalidmd5'] = 'Ugyldig md5, prøv igjen';
|
||||
$string['missingrequiredfield'] = 'Noen påkrevde felt mangler';
|
||||
$string['remotedownloaderror'] = 'Mislykkes i å laste ned komponenten til din server, vennligst sjekk proxy-innstillingene. PHP cURL tillegget er sterkt anbefalt. <br /><br />Du må laste ned <a href="{$a->url}">{$a->url}</a> filen manuelt, kopiere den til "{$a->dest}" på serveren din og pakke den ut der.';
|
||||
$string['remotedownloaderror'] = 'Mislykkes i å laste ned komponenten til din server, vennligst sjekk proxy-innstillingene. PHP cURL-tillegget er sterkt anbefalt. <br /><br />Du må laste ned <a href="{$a->url}">{$a->url}</a> filen manuelt, kopiere den til "{$a->dest}" på serveren din og pakke den ut der.';
|
||||
$string['wrongdestpath'] = 'Gal målmappe';
|
||||
$string['wrongsourcebase'] = 'Feil kilde URL base';
|
||||
$string['wrongzipfilename'] = 'Galt ZIP-filnavn.';
|
||||
|
||||
@@ -72,7 +72,7 @@ $string['pathssubwwwroot'] = 'Full webadresse til der hvor Moodle skal vises. De
|
||||
Dersom adressen ikke er korrekt, vennligst endre URL i nettleseren slik at at installasjonen restartes med andre verdier.';
|
||||
$string['pathsunsecuredataroot'] = 'Dataroot plassering er ikke sikker';
|
||||
$string['pathswrongadmindir'] = 'Adminkatalog finnes ikke';
|
||||
$string['phpextension'] = '{$a} PHP etternavn';
|
||||
$string['phpextension'] = '{$a} PHP-tillegg';
|
||||
$string['phpversion'] = 'PHP versjon';
|
||||
$string['phpversionhelp'] = '<p>Moodle trenger en PHP versjon minst 4.3.0 eller 5.1.0 (5.0.x har rekke kjente problem).</p>
|
||||
<Du kjører nå versjon {$a}</p>
|
||||
|
||||
@@ -32,13 +32,11 @@ defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['clianswerno'] = 'n';
|
||||
$string['cliansweryes'] = 's';
|
||||
$string['cliincorrectvalueerror'] = 'Erro. Valor "{$a->value}" incorreto para "{$a->option}"';
|
||||
$string['cliincorrectvalueerror'] = 'Erro: o valor "{$a->value}" não é permitido para a opção "{$a->option}"';
|
||||
$string['cliincorrectvalueretry'] = 'Valor incorreto, por favor tente novamente';
|
||||
$string['clitypevalue'] = 'valor do tipo';
|
||||
$string['clitypevaluedefault'] = 'valor do tipo, pressione a tecla Enter para usar o valor predefinido ({$a})';
|
||||
$string['cliunknowoption'] = 'Opções desconhecidas:
|
||||
{$a}
|
||||
Por favor use a opção --help';
|
||||
$string['cliunknowoption'] = 'Opções desconhecidas: {$a} Por favor use a opção --help';
|
||||
$string['cliyesnoprompt'] = 'digite s (para sim) ou n (para não)';
|
||||
$string['environmentrequireinstall'] = 'deve estar instalada e ativa';
|
||||
$string['environmentrequireversion'] = 'é requerida a versão {$a->needed} e está a correr a versão {$a->current}';
|
||||
|
||||
+14
-14
@@ -30,19 +30,19 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotcreatelangdir'] = 'Não é possível criar o diretório para pacotes linguísticos';
|
||||
$string['cannotcreatetempdir'] = 'Não é possível criar o diretório temporário';
|
||||
$string['cannotdownloadcomponents'] = 'Não é possível descarregar componentes';
|
||||
$string['cannotdownloadzipfile'] = 'Não é possível descarregar o ficheiro ZIP';
|
||||
$string['cannotfindcomponent'] = 'O componente não foi encontrado';
|
||||
$string['cannotsavemd5file'] = 'Não é possível gravar ficheiro md5';
|
||||
$string['cannotsavezipfile'] = 'Não é possível gravar ficheiro ZIP';
|
||||
$string['cannotunzipfile'] = 'Não é possível descompatar ficheiro ZIP';
|
||||
$string['componentisuptodate'] = 'O componente está atualizado';
|
||||
$string['downloadedfilecheckfailed'] = 'Falhou a verificação do ficheiro descarregado.';
|
||||
$string['invalidmd5'] = 'md5 inválido';
|
||||
$string['missingrequiredfield'] = 'Falta algum campo necessário';
|
||||
$string['remotedownloaderror'] = 'Não foi possível descarregar algum componente para o seu servidor; verifique as definições do proxy; recomenda-se fortemente o uso da extensão cURL do PHP.<br /><br />Deverá descarregar o ficheiro <a href="{$a->url}">{$a->url}</a> manualmente, copiá-lo para "{$a->dest}" no seu servidor, e descomprimi-lo nesse local.';
|
||||
$string['cannotcreatelangdir'] = 'Não é possível criar a pasta de pacotes linguísticos';
|
||||
$string['cannotcreatetempdir'] = 'Não é possível criar a pasta de ficheiros temporários';
|
||||
$string['cannotdownloadcomponents'] = 'Não é possível descarregar os componentes.';
|
||||
$string['cannotdownloadzipfile'] = 'Não é possível descarregar o ficheiro ZIP.';
|
||||
$string['cannotfindcomponent'] = 'Não é possível encontrar o componente';
|
||||
$string['cannotsavemd5file'] = 'Não é possível gravar o ficheiro md5';
|
||||
$string['cannotsavezipfile'] = 'Não é possível gravar o ficheiro ZIP';
|
||||
$string['cannotunzipfile'] = 'Não é possível descompactar o ficheiro ZIP';
|
||||
$string['componentisuptodate'] = 'O componente está atualizado.';
|
||||
$string['downloadedfilecheckfailed'] = 'A verificação do ficheiro descarregado falhou.';
|
||||
$string['invalidmd5'] = 'A variável de verificação está errada - tente novamente.';
|
||||
$string['missingrequiredfield'] = 'Um dos campos obrigatórios está em falta';
|
||||
$string['remotedownloaderror'] = 'A descarga do componente para o servidor falhou. Verifique as configurações do proxy. A instalação da extensão cURL do PHP é muito recomendada.<br /><br />Terá que descarregar o ficheiro <a href="{$a->url}">{$a->url}</a> manualmente, copiá-lo para a pasta "{$a->dest}" no seu servidor e descompactá-lo.';
|
||||
$string['wrongdestpath'] = 'Caminho de destino errado.';
|
||||
$string['wrongsourcebase'] = 'URL errado para a fonte.';
|
||||
$string['wrongsourcebase'] = 'Base do URL de origem errada';
|
||||
$string['wrongzipfilename'] = 'Nome de ficheiro ZIP errado.';
|
||||
|
||||
+35
-57
@@ -30,68 +30,46 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['admindirname'] = 'Diretório de administração';
|
||||
$string['availablelangs'] = 'Lista de línguas disponíveis';
|
||||
$string['chooselanguagehead'] = 'Escolha uma língua';
|
||||
$string['chooselanguagesub'] = 'Escolha por favor a língua a usar na instalação. Esta língua será usada por omissão no site, mas pode ser alterada posteriormente.';
|
||||
$string['clialreadyconfigured'] = 'O ficheiro config.php já existe; por favor execute admin/cli/install_database.php se quiser instalar este sítio.';
|
||||
$string['clialreadyinstalled'] = 'O ficheiro config.php já existe. Por favor, use o script admin/cli/upgrade.php se quiser atualizar o seu sítio.';
|
||||
$string['cliinstallheader'] = 'Programa de instalação do Moodle {$a} por linha de comandos';
|
||||
$string['admindirname'] = 'Pasta de administração';
|
||||
$string['availablelangs'] = 'Idiomas disponíveis';
|
||||
$string['chooselanguagehead'] = 'Selecione um idioma';
|
||||
$string['chooselanguagesub'] = 'Selecione o idioma a utilizar durante a instalação. Poderá depois selecionar um outro idioma para o site e para os utilizadores.';
|
||||
$string['clialreadyconfigured'] = 'O ficheiro config.php já existe, use admin/cli/install_database.php se desejar instalar este site.';
|
||||
$string['clialreadyinstalled'] = 'O ficheiro <b>config.php</b> já se encontra no servidor, o que indica que já existe uma instalação prévia do Moodle. Se pretender realizar uma atualização do Moodle existente, deve usar o <i>script</i> <b>admin/cli/upgrade.php</b>';
|
||||
$string['cliinstallheader'] = 'Programa para instalação do Moodle <b>{$a}</b> através da linha de comandos';
|
||||
$string['databasehost'] = 'Servidor da base de dados';
|
||||
$string['databasename'] = 'Nome da base de dados';
|
||||
$string['databasetypehead'] = 'Escolha driver da base de dados';
|
||||
$string['dataroot'] = 'Diretório de dados';
|
||||
$string['datarootpermission'] = 'Permissão dos diretórios de dados';
|
||||
$string['databasetypehead'] = 'Escolha o <i>driver</i> da base de dados';
|
||||
$string['dataroot'] = 'Pasta de dados';
|
||||
$string['datarootpermission'] = 'Permissões da diretoria de dados';
|
||||
$string['dbprefix'] = 'Prefixo das tabelas';
|
||||
$string['dirroot'] = 'Diretório do Moodle';
|
||||
$string['environmenthead'] = 'A verificar o seu ambiente ...';
|
||||
$string['environmentsub2'] = 'Cada versão do Moodle tem requisitos mínimos relativamente à versão do PHP e às extensões PHP obrigatórias. É feita uma análise total ao ambiente existente antes de cada instalação ou atualização. Por favor contate o seu administrador de sistemas se não souber como instalar uma nova versão do PHP ou ativar as suas extensões.';
|
||||
$string['errorsinenvironment'] = 'Erros no ambiente!';
|
||||
$string['dirroot'] = 'Pasta do Moodle';
|
||||
$string['environmenthead'] = 'A verificar sistema...';
|
||||
$string['environmentsub2'] = 'Cada nova versão do Moodle tem pré-requisitos mínimos relativamente à versão do PHP e extensões necessárias para o seu correto funcionamento. Estes pré-requisitos são verificados sempre que o Moodle é instalado ou atualizado. Contacte o administrador do servidor caso seja necessário atualizar a versão do PHP ou instalar novas extensões.';
|
||||
$string['errorsinenvironment'] = 'A verificação do sistema falhou!';
|
||||
$string['installation'] = 'Instalação';
|
||||
$string['langdownloaderror'] = 'Não foi possível descarregar a língua "{$a}". O processo de instalação continuará em Inglês.';
|
||||
$string['memorylimithelp'] = '<p>Atualmente o seu servidor impõe ao PHP um limite de memória de {$a}.</p>
|
||||
|
||||
<p>Isso poderá causar mais tarde problemas, especialmente se tiver um grande número de módulos ativos e/ou um número elevado de utilizadores.</p>
|
||||
|
||||
<p>Recomendamos que configure o PHP com um limite maior, por exemplo, 40M.
|
||||
Existem várias formas de fazer essa alteração:</p>
|
||||
<ol>
|
||||
<li>Recompilar o PHP com <i>--enable-memory-limit</i>.
|
||||
Isso permitirá que o próprio Moodle modifique o limite de memória.</li>
|
||||
<li>Se tiver acesso ao ficheiro php.ini, poderá modificar o valor de <b>memory_limit</b> para algo como 40M. Se não tiver acesso, poderá pedir ao adiminstrador do seu sistema que o faça.</li>
|
||||
<li>Em alguns servidores PHP poderá criar um ficheiro .htaccess no diretório do Moodle, com a linha:
|
||||
<p><blockquote>php_value memory_limit 40M</blockquote></p>
|
||||
<p>No entanto, em alguns servidores, isso faz com que nenhuma página PHP funcione (verá erros quando tentar ver as páginas) e terá que apagar o ficheiro .htaccess.</p></li>
|
||||
</ol>';
|
||||
$string['langdownloaderror'] = 'Não foi possível instalar o idioma <b>{$a}</b> por falha na descarga. O processo de instalação continuará em Inglês.';
|
||||
$string['memorylimithelp'] = '<p>O limite de memória para o PHP definido atualmente no servidor é <b>{$a}</b>.</p><p>Um número elevado de módulos em utilização ou de utilizadores registados pode fazer com que o Moodle apresente problemas de falta de memória.</p><p>É recomendado que o PHP seja configurado com um limite de memória de pelo menos 40MB. Esta configuração pode ser definida de diversas formas:</p><ol><li>Compilação do PHP com o parâmetro <b>--enable-memory-limit</b>. Esta definição permitirá ao próprio Moodle definir o valor a utilizar.</li><li>Alteração do parâmetro <b>memory_limit</b> no ficheiro de configuração do PHP para um valor igual ou superior a 40MB.</li><li>Criação de um ficheiro <b>.htaccess</b> na raiz da pasta do Moodle com a linha <b>php_value memory_limit 40M</b><p>ATENÇÃO: Em alguns servidores esta configuração impedirá o funcionamento de <b>todas</b> as páginas PHP. Nestes casos, não poderá ser utilizado o ficheiro <b>.htaccess</b>.</p></li></ol>';
|
||||
$string['paths'] = 'Caminhos';
|
||||
$string['pathserrcreatedataroot'] = 'O programa de instalação não conseguiu criar o diretório de dados ({$a->dataroot})';
|
||||
$string['pathserrcreatedataroot'] = 'O programa de instalação não conseguiu criar a pasta de dados <b>{$a->dataroot}</b>.';
|
||||
$string['pathshead'] = 'Confirmar caminhos';
|
||||
$string['pathsrodataroot'] = 'A diretoria dataroot não tem permissões de escrita.';
|
||||
$string['pathsroparentdataroot'] = 'O diretório pai ({$a->parent}) não tem permissões de escrita. O programa de instalação não conseguiu criar o diretório de dados ({$a->dataroot})';
|
||||
$string['pathssubadmindir'] = 'Alguns (poucos) alojamentos web usam /admin como um URL especial para permitir o acesso ao control panel ou a outras funcionalidades.
|
||||
Infelizmente esta designação entra em conflito com a localização que o Moodle atribui às páginas de administração.
|
||||
A solução passa por renomear o diretório admin da sua instalação do Moodle e colocando o nome escolhido aqui. Por exemplo:
|
||||
<em>moodleadmin</em>. Isto corrige os links de administração no Moodle.';
|
||||
$string['pathssubdataroot'] = 'É necessário um local onde o Moodle possa gravar os ficheiros submetidos. Este diretório tem que ter permissões de leitura e ESCRITA pelo servidor web (normalmente \'nobody\' ou \'apache\'), mas não pode estar acessível através da web. O programa de instalação tentará criar este diretório se ele ainda não existir.';
|
||||
$string['pathssubdirroot'] = 'Caminho completo para a diretoria de instalação do Moodle.';
|
||||
$string['pathssubwwwroot'] = 'Endereço web completo para acesso ao Moodle.
|
||||
Não é possível aceder ao Moodle usando vários endereços.
|
||||
Se o seu site tem vários endereços públicos é necessário definir redirecionamentos permanentes em todos eles exceto neste.
|
||||
Se o seu site pode ser acedido via intranet e Internet use este endereço público e configure o DNS para que a intranet permita a utilização deste endereço.
|
||||
Se o endereço não estiver correto mude o URL no seu browser para reiniciar a instalação com um valor diferente.';
|
||||
$string['pathsunsecuredataroot'] = 'O diretório dataroot não é seguro';
|
||||
$string['pathswrongadmindir'] = 'A diretoria admin não existe';
|
||||
$string['phpextension'] = 'Extensão PHP {$a}';
|
||||
$string['pathsrodataroot'] = 'A pasta de dados não tem permissões de escrita.';
|
||||
$string['pathsroparentdataroot'] = 'A pasta pai <b>{$a->parent}</b> não tem permissões de escrita. O programa de instalação não conseguiu criar a pasta <b>{$a->dataroot}</b>.';
|
||||
$string['pathssubadmindir'] = 'Alguns servidores Web utilizam a pasta <strong>admin</strong> em URLs especiais de acesso a funcionalidades especiais, como é o caso de painéis de controlo. Algumas situações podem criar conflitos com a localização normal das páginas de administração do Moodle. Estes problemas podem ser resolvidos renomeando a pasta <strong>admin</strong> na instalação do Moodle e indicando aqui o novo nome a utilizar. Por exemplo:<br /><br /><b>moodleadmin</b><br /><br />Esta ação resolverá os problemas de acesso dos links para as funcionalidades de administração do Moodle.';
|
||||
$string['pathssubdataroot'] = 'É necessária uma pasta onde o Moodle possa gravar os ficheiros enviados para a plataforma. Esta pasta deve ter permissão de <b>leitura</b> e <b>escrita</b> pelo utilizador do web server (normalmente <b>nobody</b> ou <b>apache</b>). Por razões de segurança esta pasta não deve estar diretamente acessível através da Internet.';
|
||||
$string['pathssubdirroot'] = 'Caminho completo para a pasta de instalação do Moodle.';
|
||||
$string['pathssubwwwroot'] = 'Endereço web completo de acesso ao Moodle. Não é possível aceder ao Moodle usando mais do que um endereço. Se o site tiver mais do que um endereço público, devem ser configurados redireccionamentos permanentes em todos eles, à exceção deste. Se o site pode ser acedido a partir da Internet e de Intranets, então este endereço deve ser configurado no DNS de forma a que os utilizadores das Intranets possam usar este endereço público para aceder ao Moodle. Se o endereço não está correto, então altere o endereço indicado no browser para reiniciar a instalação com o URL correto.';
|
||||
$string['pathsunsecuredataroot'] = 'A localização da pasta de dados não é segura';
|
||||
$string['pathswrongadmindir'] = 'A pasta <b>admin</b> não existe';
|
||||
$string['phpextension'] = 'Extensão <b>{$a}</b> do PHP';
|
||||
$string['phpversion'] = 'Versão do PHP';
|
||||
$string['phpversionhelp'] = '<p>O Moodle precisa da versão 4.3.0 ou 5.1.0 do PHP (5.0.x produz vários problemas) ou superior.</p>
|
||||
<p>Atualmente está a utilizar a versão {$a}</p>
|
||||
<p>Deverá atualizar o PHP ou migrar para outro servidor com uma versão do PHP mais recente!</p>
|
||||
(No caso da versão 5.0.x, poderá regredir para uma versão 4.4.x)</p>';
|
||||
$string['phpversionhelp'] = '<p>A instalação do Moodle só é possível se o servidor tiver instalada a versão 4.3.0 ou 5.1.0 ( a versão 5.0.x apresenta vários problemas) ou superiores.</p><p>A versão atualmente instalada é <b>{$a}</b></p><p>É necessário atualizar esta versão do PHP ou mudar para um novo servidor que possua as referidas versões!<br />(Se a versão instalada for a 5.0.x é possível regredir para a versão 4.4.x)</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Está a ver esta página porque o pacote <strong>{$a->packname} {$a->packversion}</strong> foi instalado e posto a funcionar com sucesso no seu computador. Parabens!';
|
||||
$string['welcomep30'] = 'Esta versão do <strong>{$a->installername}</strong> inclui aplicações para criar um ambiente onde o <strong>Moodle</strong> possa funcionar, nomeadamente:';
|
||||
$string['welcomep40'] = 'Este pacote também inclui <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'A utilização de todas as aplicações neste pacote está regida pelas respetivas licenças. O pacote <strong>{$a->installername}</strong> completo é <a href="http://www.opensource.org/docs/definition_plain.html">open source</a> distribuido nos termos da licença <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
|
||||
$string['welcomep60'] = 'As páginas seguintes vão conduzí-lo por alguns passos simples de seguir para configurar o <strong>Moodle</strong> no seu computador. Poderá aceitar as definições selecionadas por omissão, ou, opcionalmente, usar outras definições mais apropriadas às suas necessidades.';
|
||||
$string['welcomep70'] = 'Clique no botão "Seguinte" em baixo, para continuar com a configuração do <strong>Moodle</strong>.';
|
||||
$string['wwwroot'] = 'Endereço Web';
|
||||
$string['welcomep20'] = 'A apresentação desta página confirma a correta instalação e ativação do pacote <strong>{$a->packname} {$a->packversion}</strong> no servidor.';
|
||||
$string['welcomep30'] = 'Esta versão do pacote <strong>{$a->installername}</strong> inclui as aplicações necessárias para o correto funcionamento do <strong>Moodle</strong>, nomeadamente:';
|
||||
$string['welcomep40'] = 'Este pacote inclui <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong>.';
|
||||
$string['welcomep50'] = 'A utilização de todas as aplicações incluídas neste pacote é limitada pelas respetivas licenças. O pacote completo <strong>{$a->installername}</strong> é <ahref="http://www.opensource.org/docs/definition_plain.html">código aberto</a> e distribuído nos termos da licença <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
|
||||
$string['welcomep60'] = 'As páginas seguintes irão levá-lo através de alguns passos simples para
|
||||
configurar e definir o <strong>Moodle</strong> no seu computador. Você pode aceitar as configurações predefinidas ou, opcionalmente, alterá-las para atender às suas próprias necessidades.';
|
||||
$string['welcomep70'] = 'Clique no botão "Seguinte" para continuar a configuração do <strong>Moodle</strong>.';
|
||||
$string['wwwroot'] = 'Endereço web';
|
||||
|
||||
@@ -30,5 +30,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['parentlanguage'] = '';
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thislanguage'] = 'Português - Portugal';
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['language'] = 'Língua';
|
||||
$string['next'] = 'Próximo';
|
||||
$string['language'] = 'Idioma';
|
||||
$string['next'] = 'Seguinte';
|
||||
$string['previous'] = 'Anterior';
|
||||
$string['reload'] = 'Recarregar';
|
||||
|
||||
@@ -30,15 +30,22 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['admindirname'] = 'Admin Directory';
|
||||
$string['admindirname'] = 'Director Admin';
|
||||
$string['availablelangs'] = 'Pachete de limbă disponibile';
|
||||
$string['chooselanguagehead'] = 'Selectare limbă';
|
||||
$string['chooselanguagesub'] = 'Vă rugăm selectaţi limba pentru interfaţa de instalare, limba selectată va fi folosită EXCLUSIV în cadrul procedurii de instalare. Ulterior veţi putea selecta limba în care doriţi să fie afişată interfaţa.';
|
||||
$string['dataroot'] = 'Data Directory';
|
||||
$string['databasehost'] = 'Gazdă baza de date';
|
||||
$string['databasename'] = 'Nume baza de date';
|
||||
$string['databasetypehead'] = 'Alegere driver baza de date';
|
||||
$string['dataroot'] = 'Director date';
|
||||
$string['datarootpermission'] = 'Permisiuni directoare date';
|
||||
$string['dbprefix'] = 'Prefix tabele';
|
||||
$string['dirroot'] = 'Director Moodle';
|
||||
$string['environmenthead'] = 'Se verifică mediul...';
|
||||
$string['installation'] = 'Instalare';
|
||||
$string['paths'] = 'Căi';
|
||||
$string['pathshead'] = 'Confirmare căi';
|
||||
$string['phpextension'] = 'extensie PHP {$a}';
|
||||
$string['phpversion'] = 'Versiune PHP';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['wwwroot'] = 'Adresă Web';
|
||||
|
||||
@@ -45,7 +45,7 @@ $string['datarootpermission'] = 'Овлашћења над директориј
|
||||
$string['dbprefix'] = 'Префикс табеле';
|
||||
$string['dirroot'] = 'Moodle директоријум';
|
||||
$string['environmenthead'] = 'Проверавање Вашег окружења...';
|
||||
$string['environmentsub2'] = 'Свака верзија Moodlea има минимум захтева по питању одговарајуће PHP верѕије и неколико обавезних PHP екстензија.
|
||||
$string['environmentsub2'] = 'Свака верзија Moodlea има минимум захтева по питању одговарајуће PHP верзије и неколико обавезних PHP екстензија.
|
||||
Пуна провера окружења се врши пре сваке инсталације или ажурирања постојеће верзије. Уколико не знате како да инсталирате нову верзију или омогућите PHP ектензије контактирајте Вашег сервер администратора.';
|
||||
$string['errorsinenvironment'] = 'Провера окружења није прошла!';
|
||||
$string['installation'] = 'Инсталација';
|
||||
@@ -75,7 +75,7 @@ $string['pathssubwwwroot'] = 'Пуна веб адреса путем које
|
||||
Ако је адреса нетачна промените URL у свом веб читачу да бисте поново покренули инсталацију са другачијом вредношћу.';
|
||||
$string['pathsunsecuredataroot'] = 'Dataroot локација није безбедна';
|
||||
$string['pathswrongadmindir'] = 'Админ директоријум не постоји';
|
||||
$string['phpextension'] = '{$a} PHP екстенѕија';
|
||||
$string['phpextension'] = '{$a} PHP екстензија';
|
||||
$string['phpversion'] = 'PHP верзија';
|
||||
$string['phpversionhelp'] = '<p>Moodle захтева најмање PHP верзију 4.3.0 или 5.1.0 (5.0.x има бројне уочене проблеме).</p>
|
||||
<p>Тренутно користите верзију {$a}</p>
|
||||
|
||||
@@ -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['databasehost'] = 'Сервер бази даних';
|
||||
$string['databasename'] = 'Ім’я бази даних';
|
||||
+3
-1
@@ -255,7 +255,7 @@ $string['configmycoursesperpage'] = 'Maximum number of courses to display in any
|
||||
$string['configmymoodleredirect'] = 'This setting forces redirects to /my on login for non-admins and replaces the top level site navigation with /my';
|
||||
$string['configmypagelocked'] = 'This setting prevents the default page from being edited by any non-admins';
|
||||
$string['confignavcourselimit'] = 'Limits the number of courses shown to the user when they are either not logged in or are not enrolled in any courses.';
|
||||
$string['confignavshowallcourses'] = 'Setting this ensures that all courses on the site are shown in the navigation at all times.';
|
||||
$string['confignavshowallcourses'] = 'If enabled users will see courses they are enrolled in both within the My Courses branch and the course structure. When disabled users with enrolments will only see the My Courses branch of the navigaiton. The number of course shown would still be limited by "Course limit(navcourselimit)" setting when user is either not logged in or not enrolled in any course.';
|
||||
$string['confignavshowcategories'] = 'Show course categories in the navigation bar and navigation blocks. This does not occur with courses the user is currently enrolled in, they will still be listed under mycourses without categories.';
|
||||
$string['confignotifyloginfailures'] = 'If login failures have been recorded, email notifications can be sent out. Who should see these notifications?';
|
||||
$string['confignotifyloginthreshold'] = 'If notifications about failed logins are active, how many failed login attempts by one user or one IP address is it worth notifying about?';
|
||||
@@ -550,6 +550,8 @@ $string['googlemapkey'] = 'Google Maps API V2 key';
|
||||
$string['gotofirst'] = 'Go to first missing string';
|
||||
$string['gradebook'] = 'Gradebook';
|
||||
$string['gradebookroles'] = 'Graded roles';
|
||||
$string['gravatardefaulturl'] = 'Gravatar default image URL';
|
||||
$string['gravatardefaulturl_help'] = 'Gravatar needs a default image to display if it is unable to find a picture for a given user. Provide a full URL for an image. If you leave this setting empty, Moodle will attempt to use the most appropriate default image for the page you are viewing. Note also that Gravatar has a number of codes which can be used to <a href="https://en.gravatar.com/site/implement/images/#default-image">generate default images</a>.';
|
||||
$string['gradeexport'] = 'Primary grade export methods';
|
||||
$string['guestroleid'] = 'Role for guest';
|
||||
$string['guestroleid_help'] = 'This role is automatically assigned to the guest user. It is also temporarily assigned to not enrolled users that enter the course via guest enrolment plugin.';
|
||||
|
||||
@@ -59,7 +59,7 @@ $string['eventduration'] = 'Duration';
|
||||
$string['eventendtime'] = 'End time';
|
||||
$string['eventinstanttime'] = 'Time';
|
||||
$string['eventkind'] = 'Type of event';
|
||||
$string['eventname'] = 'Name';
|
||||
$string['eventname'] = 'Event title';
|
||||
$string['eventnone'] = 'No events';
|
||||
$string['eventrepeat'] = 'Repeats';
|
||||
$string['eventsall'] = 'All events';
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
$string['addfields'] = 'Add {$a} fields to form';
|
||||
$string['advancedelement'] = 'Advanced element';
|
||||
$string['close'] = 'Close';
|
||||
$string['day'] = 'Day';
|
||||
$string['display'] = 'Display';
|
||||
$string['err_alphanumeric'] = 'You must enter only letters or numbers here.';
|
||||
|
||||
@@ -356,6 +356,7 @@ $string['createaccount'] = 'Create my new account';
|
||||
$string['createcategory'] = 'Create category';
|
||||
$string['createfolder'] = 'Create a folder in {$a}';
|
||||
$string['createuserandpass'] = 'Choose your username and password';
|
||||
$string['createuser'] = 'Create user';
|
||||
$string['createziparchive'] = 'Create zip archive';
|
||||
$string['creatingblocks'] = 'Creating blocks';
|
||||
$string['creatingblocksroles'] = 'Creating block level role assignments and overrides';
|
||||
@@ -1632,6 +1633,7 @@ $string['theme'] = 'Theme';
|
||||
$string['themes'] = 'Themes';
|
||||
$string['themesaved'] = 'New theme saved';
|
||||
$string['thereareno'] = 'There are no {$a} in this course';
|
||||
$string['therearecourses'] = 'There are {$a} courses';
|
||||
$string['thiscategorycontains'] = 'This category contains';
|
||||
$string['time'] = 'Time';
|
||||
$string['timezone'] = 'Timezone';
|
||||
|
||||
+3
-4
@@ -6237,9 +6237,8 @@ function format_admin_setting($setting, $title='', $form='', $description='', $l
|
||||
$str = '
|
||||
<div class="form-item clearfix" id="admin-'.$setting->name.'">
|
||||
<div class="form-label">
|
||||
<label '.$labelfor.'>'.highlightfast($query, $title).'<span class="form-shortname">'.highlightfast($query, $name).'</span>
|
||||
'.$override.$warning.'
|
||||
</label>
|
||||
<label '.$labelfor.'>'.highlightfast($query, $title).$override.$warning.'</label>
|
||||
<span class="form-shortname">'.highlightfast($query, $name).'</span>
|
||||
</div>
|
||||
<div class="form-setting">'.$form.$defaultinfo.'</div>
|
||||
<div class="form-description">'.highlight($query, markdown_to_html($description)).'</div>
|
||||
@@ -7585,7 +7584,7 @@ class admin_setting_managewebservicetokens extends admin_setting {
|
||||
array(array('id' => $token->userid)), $token->serviceid);
|
||||
|
||||
if (!is_siteadmin($token->userid) and
|
||||
key_exists($token->userid, $usermissingcaps)) {
|
||||
array_key_exists($token->userid, $usermissingcaps)) {
|
||||
$missingcapabilities = implode(', ',
|
||||
$usermissingcaps[$token->userid]);
|
||||
if (!empty($missingcapabilities)) {
|
||||
|
||||
@@ -592,8 +592,10 @@ resource_class.prototype.init_resource = function(id, group, config, parentObj)
|
||||
this.id = this.getEl().id.replace(/module-/i, '');
|
||||
|
||||
this.hidden = false;
|
||||
if (YAHOO.util.Dom.hasClass(this.getEl().getElementsByTagName('a')[0], 'dimmed') ||
|
||||
YAHOO.util.Dom.hasClass(this.getEl().getElementsByTagName('div')[1], 'dimmed_text')) {
|
||||
// If dimmed and is not conditional dimmed then hidden.
|
||||
if ((YAHOO.util.Dom.hasClass(this.getEl().getElementsByTagName('a')[0], 'dimmed') ||
|
||||
YAHOO.util.Dom.hasClass(this.getEl().getElementsByTagName('div')[1], 'dimmed_text')) &&
|
||||
!YAHOO.util.Dom.hasClass(this.getEl().getElementsByTagName('a')[0], 'conditionalhidden')) {
|
||||
this.hidden = true;
|
||||
}
|
||||
this.hiddenStored = null;
|
||||
|
||||
+3
-1
@@ -451,7 +451,9 @@ class block_manager {
|
||||
* @return bool True if all of the blocks within that region are docked
|
||||
*/
|
||||
public function region_completely_docked($region, $output) {
|
||||
if (!$this->page->theme->enable_dock) {
|
||||
global $CFG;
|
||||
// If theme doesn't allow docking or allowblockstodock is not set, then return.
|
||||
if (!$this->page->theme->enable_dock || empty($CFG->allowblockstodock)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1762,6 +1762,11 @@ function user_accesstime_log($courseid=0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isguestuser()) {
|
||||
// Do not update guest access times/ips for performance.
|
||||
return;
|
||||
}
|
||||
|
||||
if (empty($courseid)) {
|
||||
$courseid = SITEID;
|
||||
}
|
||||
|
||||
@@ -1061,6 +1061,8 @@ function xmldb_main_upgrade($oldversion) {
|
||||
}
|
||||
|
||||
if ($oldversion < 2009010602) {
|
||||
// Issue with field in the user table being null in postgres.
|
||||
$DB->execute("UPDATE {user} SET lastip = '' WHERE lastip IS NULL");
|
||||
|
||||
/// Changing precision of field lastip on table user to (45)
|
||||
$table = new xmldb_table('user');
|
||||
@@ -4708,6 +4710,10 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
|
||||
if ($dbman->index_exists($table, $index)) {
|
||||
$dbman->drop_index($table, $index);
|
||||
}
|
||||
|
||||
// Issue with field in the user table being null in postgres.
|
||||
$DB->execute("UPDATE {user} SET city = '' WHERE city IS NULL");
|
||||
|
||||
/// Changing precision of field city on table user to (120)
|
||||
$field = new xmldb_field('city', XMLDB_TYPE_CHAR, '120', null, XMLDB_NOTNULL, null, null, 'address');
|
||||
|
||||
@@ -7159,5 +7165,87 @@ FROM
|
||||
upgrade_main_savepoint(true, 2011120504.12);
|
||||
}
|
||||
|
||||
if ($oldversion < 2011120505.09) {
|
||||
// Issue with Moodle version < 1.7 using postgres having null values in the user table.
|
||||
if ($DB->get_dbfamily() === 'postgres') {
|
||||
// Array to store columns we may need to change.
|
||||
$arrcolumns = array('idnumber', 'icq', 'skype', 'yahoo', 'aim', 'msn',
|
||||
'phone1', 'phone2', 'institution', 'department',
|
||||
'address', 'city', 'country', 'lastip', 'secret',
|
||||
'picture', 'url');
|
||||
// OK, now we want to remove the columns that already have the default values before editing.
|
||||
$columns = $DB->get_columns('user');
|
||||
foreach ($columns as $c) {
|
||||
if (in_array($c->name, $arrcolumns)) {
|
||||
if ($c->has_default && $c->not_null) {
|
||||
$arrcolumns = array_diff($arrcolumns, array($c->name));
|
||||
} else {
|
||||
if ($c->name == 'picture') {
|
||||
$DB->execute("UPDATE {user} SET picture = '0' WHERE picture IS NULL");
|
||||
} else {
|
||||
$DB->execute("UPDATE {user} SET $c->name = '' WHERE $c->name IS NULL");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Create user table object.
|
||||
$table = new xmldb_table('user');
|
||||
// Create array to store the indexes in the user table.
|
||||
$arrindexes = array();
|
||||
$arrindexes['idnumber'] = new xmldb_index('idnumber', XMLDB_INDEX_NOTUNIQUE, array('idnumber'));
|
||||
$arrindexes['city'] = new xmldb_index('city', XMLDB_INDEX_NOTUNIQUE, array('city'));
|
||||
$arrindexes['country'] = new xmldb_index('country', XMLDB_INDEX_NOTUNIQUE, array('country'));
|
||||
// Loop through the indexes.
|
||||
foreach ($arrindexes as $key => $index) {
|
||||
// Check if it is not in the columns array and remove as it does not need editing.
|
||||
if (!in_array($key, $arrcolumns)) {
|
||||
unset($arrindexes[$key]);
|
||||
}
|
||||
}
|
||||
// Remove the indexes that need to be removed.
|
||||
foreach ($arrindexes as $index) {
|
||||
if ($dbman->index_exists($table, $index)) {
|
||||
$dbman->drop_index($table, $index);
|
||||
}
|
||||
}
|
||||
// Create list of fields that potentially need changed.
|
||||
$arrfields = array();
|
||||
$arrfields['idnumber'] = new xmldb_field('idnumber', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, 'password');
|
||||
$arrfields['icq'] = new xmldb_field('icq', XMLDB_TYPE_CHAR, '15', null, XMLDB_NOTNULL, null, null, 'emailstop');
|
||||
$arrfields['skype'] = new xmldb_field('skype', XMLDB_TYPE_CHAR, '50', null, XMLDB_NOTNULL, null, null, 'icq');
|
||||
$arrfields['yahoo'] = new xmldb_field('yahoo', XMLDB_TYPE_CHAR, '50', null, XMLDB_NOTNULL, null, null, 'skype');
|
||||
$arrfields['aim'] = new xmldb_field('aim', XMLDB_TYPE_CHAR, '50', null, XMLDB_NOTNULL, null, null, 'yahoo');
|
||||
$arrfields['msn'] = new xmldb_field('msn', XMLDB_TYPE_CHAR, '50', null, XMLDB_NOTNULL, null, null, 'aim');
|
||||
$arrfields['phone1'] = new xmldb_field('phone1', XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, 'msn');
|
||||
$arrfields['phone2'] = new xmldb_field('phone2', XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, 'phone1');
|
||||
$arrfields['institution'] = new xmldb_field('institution', XMLDB_TYPE_CHAR, '40', null, XMLDB_NOTNULL, null, null, 'phone2');
|
||||
$arrfields['department'] = new xmldb_field('department', XMLDB_TYPE_CHAR, '30', null, XMLDB_NOTNULL, null, null, 'institution');
|
||||
$arrfields['address'] = new xmldb_field('address', XMLDB_TYPE_CHAR, '70', null, XMLDB_NOTNULL, null, null, 'department');
|
||||
$arrfields['city'] = new xmldb_field('city', XMLDB_TYPE_CHAR, '120', null, XMLDB_NOTNULL, null, null, 'address');
|
||||
$arrfields['country'] = new xmldb_field('country', XMLDB_TYPE_CHAR, '2', null, XMLDB_NOTNULL, null, null, 'city');
|
||||
$arrfields['lastip'] = new xmldb_field('lastip', XMLDB_TYPE_CHAR, '45', null, XMLDB_NOTNULL, null, null, 'country');
|
||||
$arrfields['secret'] = new xmldb_field('secret', XMLDB_TYPE_CHAR, '15', null, XMLDB_NOTNULL, null, null, 'lastip');
|
||||
$arrfields['picture'] = new xmldb_field('picture', XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0, 'secret');
|
||||
$arrfields['url'] = new xmldb_field('url', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, 'picture');
|
||||
foreach ($arrfields as $key => $field) {
|
||||
// If it is in the columns array it needs editing.
|
||||
if (in_array($key, $arrcolumns)) {
|
||||
if ($dbman->field_exists($table, $field)) {
|
||||
$dbman->change_field_notnull($table, $field);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Re-add the indexes that were removed.
|
||||
foreach ($arrindexes as $index) {
|
||||
if (!$dbman->index_exists($table, $index)) {
|
||||
$dbman->add_index($table, $index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Main savepoint reached.
|
||||
upgrade_main_savepoint(true, 2011120505.09);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -121,6 +121,7 @@ $string['advanced_dlg:about_version'] = 'Version';
|
||||
$string['advanced_dlg:anchor_name'] = 'Anchor name';
|
||||
$string['advanced_dlg:anchor_title'] = 'Insert/edit anchor';
|
||||
$string['advanced_dlg:charmap_title'] = 'Select custom character';
|
||||
$string['advanced_dlg:charmap_usage'] = 'Use left and right arrows to navigate.';
|
||||
$string['advanced_dlg:code_title'] = 'HTML Source Editor';
|
||||
$string['advanced_dlg:code_wordwrap'] = 'Word wrap';
|
||||
$string['advanced_dlg:colorpicker_color'] = 'Color:';
|
||||
|
||||
+1
-1
@@ -1626,7 +1626,7 @@ abstract class enrol_plugin {
|
||||
$participants->close();
|
||||
|
||||
// now clean up all remainders that were not removed correctly
|
||||
$DB->delete_records('role_assignments', array('itemid'=>$instance->id, 'component'=>$name));
|
||||
$DB->delete_records('role_assignments', array('itemid'=>$instance->id, 'component'=>'enrol_'.$name));
|
||||
$DB->delete_records('user_enrolments', array('enrolid'=>$instance->id));
|
||||
|
||||
// finally drop the enrol row
|
||||
|
||||
@@ -284,7 +284,7 @@ class file_storage {
|
||||
*/
|
||||
public function get_area_tree($contextid, $component, $filearea, $itemid) {
|
||||
$result = array('dirname'=>'', 'dirfile'=>null, 'subdirs'=>array(), 'files'=>array());
|
||||
$files = $this->get_area_files($contextid, $component, $filearea, $itemid, "sortorder, itemid, filepath, filename", true);
|
||||
$files = $this->get_area_files($contextid, $component, $filearea, $itemid, "itemid, filepath, filename", true);
|
||||
// first create directory structure
|
||||
foreach ($files as $hash=>$dir) {
|
||||
if (!$dir->is_directory()) {
|
||||
|
||||
+37
-19
@@ -70,33 +70,48 @@ if (!empty($CFG->debug) and $CFG->debug >= DEBUG_ALL){
|
||||
* @global moodle_page $PAGE
|
||||
*/
|
||||
function form_init_date_js() {
|
||||
global $PAGE;
|
||||
global $CFG, $PAGE;
|
||||
static $done = false;
|
||||
if (!$done) {
|
||||
$module = 'moodle-form-dateselector';
|
||||
$function = 'M.form.dateselector.init_date_selectors';
|
||||
$config = array(array(
|
||||
'firstdayofweek' => get_string('firstdayofweek', 'langconfig'),
|
||||
'mon' => strftime('%a', strtotime("Monday")), // 5th Jan 1970 at 12pm
|
||||
'firstdayofweek' => get_string('firstdayofweek', 'langconfig'),
|
||||
'mon' => strftime('%a', strtotime("Monday")),
|
||||
'tue' => strftime('%a', strtotime("Tuesday")),
|
||||
'wed' => strftime('%a', strtotime("Wednesday")),
|
||||
'thu' => strftime('%a', strtotime("Thursday")),
|
||||
'fri' => strftime('%a', strtotime("Friday")),
|
||||
'sat' => strftime('%a', strtotime("Saturday")),
|
||||
'sun' => strftime('%a', strtotime("Sunday")),
|
||||
'january' => strftime('%B', strtotime("January")), // 1st Jan 1970 at 12pm
|
||||
'february' => strftime('%B', strtotime("February")),
|
||||
'march' => strftime('%B', strtotime("March")),
|
||||
'april' => strftime('%B', strtotime("April")),
|
||||
'may' => strftime('%B', strtotime("May")),
|
||||
'june' => strftime('%B', strtotime("June")),
|
||||
'july' => strftime('%B', strtotime("July")),
|
||||
'august' => strftime('%B', strtotime("August")),
|
||||
'september' => strftime('%B', strtotime("September")),
|
||||
'october' => strftime('%B', strtotime("October")),
|
||||
'november' => strftime('%B', strtotime("November")),
|
||||
'december' => strftime('%B', strtotime("December"))
|
||||
'january' => strftime('%B', strtotime("January 1")),
|
||||
'february' => strftime('%B', strtotime("February 1")),
|
||||
'march' => strftime('%B', strtotime("March 1")),
|
||||
'april' => strftime('%B', strtotime("April 1")),
|
||||
'may' => strftime('%B', strtotime("May 1")),
|
||||
'june' => strftime('%B', strtotime("June 1")),
|
||||
'july' => strftime('%B', strtotime("July 1")),
|
||||
'august' => strftime('%B', strtotime("August 1")),
|
||||
'september' => strftime('%B', strtotime("September 1")),
|
||||
'october' => strftime('%B', strtotime("October 1")),
|
||||
'november' => strftime('%B', strtotime("November 1")),
|
||||
'december' => strftime('%B', strtotime("December 1"))
|
||||
));
|
||||
|
||||
// If we are running under Windows convert from windows encoding to UTF-8 (because it's impossible
|
||||
// to specify UTF-8 to fetch locale info in Win32. Snippet copied from userdate().
|
||||
if ($CFG->ostype == 'WINDOWS') {
|
||||
if ($localewincharset = get_string('localewincharset', 'langconfig')) {
|
||||
$textlib = textlib_get_instance();
|
||||
foreach ($config[0] as $key => &$value) {
|
||||
if ($key == 'firstdayofweek') {
|
||||
continue;
|
||||
}
|
||||
$value = $textlib->convert($value, $localewincharset, 'utf-8');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$PAGE->requires->yui_module($module, $function, $config);
|
||||
$done = true;
|
||||
}
|
||||
@@ -1649,10 +1664,14 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless {
|
||||
$unfiltered = array();
|
||||
if (null === $elementList) {
|
||||
// iterate over all elements, calling their exportValue() methods
|
||||
$emptyarray = array();
|
||||
foreach (array_keys($this->_elements) as $key) {
|
||||
if ($this->_elements[$key]->isFrozen() && !$this->_elements[$key]->_persistantFreeze){
|
||||
$value = $this->_elements[$key]->exportValue($emptyarray, true);
|
||||
if ($this->_elements[$key]->isFrozen() && !$this->_elements[$key]->_persistantFreeze) {
|
||||
$varname = $this->_elements[$key]->_attributes['name'];
|
||||
$value = '';
|
||||
// If we have a default value then export it.
|
||||
if (isset($this->_defaultValues[$varname])) {
|
||||
$value = array($varname => $this->_defaultValues[$varname]);
|
||||
}
|
||||
} else {
|
||||
$value = $this->_elements[$key]->exportValue($this->_submitValues, true);
|
||||
}
|
||||
@@ -1679,7 +1698,6 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless {
|
||||
if (is_array($this->_constantValues)) {
|
||||
$unfiltered = HTML_QuickForm::arrayMerge($unfiltered, $this->_constantValues);
|
||||
}
|
||||
|
||||
return $unfiltered;
|
||||
}
|
||||
/**
|
||||
|
||||
@@ -917,7 +917,10 @@ class grade_category extends grade_object {
|
||||
|
||||
$i = 1;
|
||||
while ($originalindex+$i < count($grade_keys)) {
|
||||
|
||||
$possibleitemid = $grade_keys[$originalindex+$i];
|
||||
$i++;
|
||||
|
||||
if ($grade_values[$founditemid] != $grade_values[$possibleitemid]) {
|
||||
// The next grade item has a different grade. Stop looking.
|
||||
break;
|
||||
@@ -934,8 +937,6 @@ class grade_category extends grade_object {
|
||||
$founditemid = $possibleitemid;
|
||||
// Continue searching to see if there is an even higher grademax...
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Now drop whatever grade item we have found
|
||||
|
||||
+34
-18
@@ -87,17 +87,17 @@ M.util.CollapsibleRegion = function(Y, id, userpref, strtooltip) {
|
||||
|
||||
// Get the caption for the collapsible region
|
||||
var caption = this.div.one('#'+id + '_caption');
|
||||
caption.setAttribute('title', strtooltip);
|
||||
|
||||
// Create a link
|
||||
var a = Y.Node.create('<a href="#"></a>');
|
||||
// Create a local scoped lamba function to move nodes to a new link
|
||||
var movenode = function(node){
|
||||
node.remove();
|
||||
a.append(node);
|
||||
};
|
||||
// Apply the lamba function on each of the captions child nodes
|
||||
caption.get('children').each(movenode, this);
|
||||
a.setAttribute('title', strtooltip);
|
||||
|
||||
// Get all the nodes from caption, remove them and append them to <a>
|
||||
while (caption.hasChildNodes()) {
|
||||
child = caption.get('firstChild');
|
||||
child.remove();
|
||||
a.append(child);
|
||||
}
|
||||
caption.append(a);
|
||||
|
||||
// Get the height of the div at this point before we shrink it if required
|
||||
@@ -1109,6 +1109,18 @@ function openpopup(event, args) {
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure the name argument is set and valid.
|
||||
var nameregex = /[^a-z0-9_]/i;
|
||||
if (typeof args.name !== 'string') {
|
||||
args.name = '_blank';
|
||||
} else if (args.name.match(nameregex)) {
|
||||
// Cleans window name because IE does not support funky ones.
|
||||
args.name = args.name.replace(nameregex, '_');
|
||||
if (M.cfg.developerdebug) {
|
||||
alert('DEVELOPER NOTICE: Invalid \'name\' passed to openpopup()');
|
||||
}
|
||||
}
|
||||
|
||||
var fullurl = args.url;
|
||||
if (!args.url.match(/https?:\/\//)) {
|
||||
fullurl = M.cfg.wwwroot + args.url;
|
||||
@@ -1295,16 +1307,17 @@ M.util.help_icon = {
|
||||
event.preventDefault();
|
||||
if (M.util.help_icon.instance === null) {
|
||||
var Y = M.util.help_icon.Y;
|
||||
Y.use('overlay', 'io-base', 'event-mouseenter', 'node', 'event-key', function(Y) {
|
||||
Y.use('overlay', 'io-base', 'event-mouseenter', 'node', 'event-key', 'escape', function(Y) {
|
||||
var help_content_overlay = {
|
||||
helplink : null,
|
||||
overlay : null,
|
||||
init : function() {
|
||||
|
||||
var closebtn = Y.Node.create('<a id="closehelpbox" href="#"><img src="'+M.util.image_url('t/delete', 'moodle')+'" /></a>');
|
||||
var strclose = Y.Escape.html(M.str.form.close);
|
||||
var footerbtn = Y.Node.create('<button class="closebtn">'+strclose+'</button>');
|
||||
// Create an overlay from markup
|
||||
this.overlay = new Y.Overlay({
|
||||
headerContent: closebtn,
|
||||
footerContent: footerbtn,
|
||||
bodyContent: '',
|
||||
id: 'helppopupbox',
|
||||
width:'400px',
|
||||
@@ -1313,7 +1326,7 @@ M.util.help_icon = {
|
||||
});
|
||||
this.overlay.render(Y.one(document.body));
|
||||
|
||||
closebtn.on('click', this.overlay.hide, this.overlay);
|
||||
footerbtn.on('click', this.overlay.hide, this.overlay);
|
||||
|
||||
var boundingBox = this.overlay.get("boundingBox");
|
||||
|
||||
@@ -1329,9 +1342,6 @@ M.util.help_icon = {
|
||||
this.overlay.hide();
|
||||
}
|
||||
}, this);
|
||||
|
||||
Y.on("key", this.close, closebtn , "down:13", this);
|
||||
closebtn.on('click', this.close, this);
|
||||
},
|
||||
|
||||
close : function(e) {
|
||||
@@ -1341,9 +1351,16 @@ M.util.help_icon = {
|
||||
},
|
||||
|
||||
display : function(event, args) {
|
||||
if (Y.one('html').get('dir') == 'rtl') {
|
||||
var overlayPosition = [Y.WidgetPositionAlign.TR, Y.WidgetPositionAlign.LC];
|
||||
} else {
|
||||
var overlayPosition = [Y.WidgetPositionAlign.TL, Y.WidgetPositionAlign.RC];
|
||||
}
|
||||
|
||||
this.helplink = args.node;
|
||||
|
||||
this.overlay.set('bodyContent', Y.Node.create('<img src="'+M.cfg.loadingicon+'" class="spinner" />'));
|
||||
this.overlay.set("align", {node:args.node, points:[Y.WidgetPositionAlign.TL, Y.WidgetPositionAlign.RC]});
|
||||
this.overlay.set("align", {node:args.node, points: overlayPosition});
|
||||
|
||||
var fullurl = args.url;
|
||||
if (!args.url.match(/https?:\/\//)) {
|
||||
@@ -1371,11 +1388,10 @@ M.util.help_icon = {
|
||||
|
||||
Y.io(ajaxurl, cfg);
|
||||
this.overlay.show();
|
||||
|
||||
Y.one('#closehelpbox').focus();
|
||||
},
|
||||
|
||||
display_callback : function(content) {
|
||||
content = '<div role="alert">' + content + '</div>';
|
||||
this.overlay.set('bodyContent', content);
|
||||
},
|
||||
|
||||
|
||||
+10
-2
@@ -548,6 +548,14 @@ abstract class list_item {
|
||||
$strmovedown = get_string('movedown');
|
||||
$strmoveleft = get_string('maketoplevelitem', 'question');
|
||||
|
||||
if (right_to_left()) { // Exchange arrows on RTL
|
||||
$rightarrow = 'left';
|
||||
$leftarrow = 'right';
|
||||
} else {
|
||||
$rightarrow = 'right';
|
||||
$leftarrow = 'left';
|
||||
}
|
||||
|
||||
if (isset($this->parentlist->parentitem)) {
|
||||
$parentitem = $this->parentlist->parentitem;
|
||||
if (isset($parentitem->parentlist->parentitem)) {
|
||||
@@ -556,7 +564,7 @@ abstract class list_item {
|
||||
$action = $strmoveleft;
|
||||
}
|
||||
$url = new moodle_url($this->parentlist->pageurl, (array('sesskey'=>sesskey(), 'left'=>$this->id)));
|
||||
$this->icons['left'] = $this->image_icon($action, $url, 'left');
|
||||
$this->icons['left'] = $this->image_icon($action, $url, $leftarrow);
|
||||
} else {
|
||||
$this->icons['left'] = $this->image_spacer();
|
||||
}
|
||||
@@ -578,7 +586,7 @@ abstract class list_item {
|
||||
if (!empty($lastitem)) {
|
||||
$makechildof = get_string('makechildof', 'question', $lastitem->name);
|
||||
$url = new moodle_url($this->parentlist->pageurl, (array('sesskey'=>sesskey(), 'right'=>$this->id)));
|
||||
$this->icons['right'] = $this->image_icon($makechildof, $url, 'right');
|
||||
$this->icons['right'] = $this->image_icon($makechildof, $url, $rightarrow);
|
||||
} else {
|
||||
$this->icons['right'] = $this->image_spacer();
|
||||
}
|
||||
|
||||
+71
-16
@@ -985,8 +985,12 @@ class cm_info extends stdClass {
|
||||
}
|
||||
|
||||
/**
|
||||
* Works out whether activity is visible *for current user* - if this is false, they
|
||||
* aren't allowed to access it.
|
||||
* Works out whether activity is available to the current user
|
||||
*
|
||||
* If the activity is unavailable, additional checks are required to determine if its hidden or greyed out
|
||||
*
|
||||
* @see is_user_access_restricted_by_group()
|
||||
* @see is_user_access_restricted_by_conditional_access()
|
||||
* @return void
|
||||
*/
|
||||
private function update_user_visible() {
|
||||
@@ -994,26 +998,77 @@ class cm_info extends stdClass {
|
||||
$modcontext = get_context_instance(CONTEXT_MODULE, $this->id);
|
||||
$userid = $this->modinfo->get_user_id();
|
||||
$this->uservisible = true;
|
||||
// Check visibility/availability conditions.
|
||||
|
||||
// If the user cannot access the activity set the uservisible flag to false.
|
||||
// Additional checks are required to determine whether the activity is entirely hidden or just greyed out.
|
||||
if ((!$this->visible or !$this->available) and
|
||||
!has_capability('moodle/course:viewhiddenactivities', $modcontext, $userid)) {
|
||||
// If the activity is hidden or unavailable, and you don't have viewhiddenactivities,
|
||||
// set it so that user can't see or access it.
|
||||
|
||||
$this->uservisible = false;
|
||||
}
|
||||
// Check group membership. The grouping option makes the activity
|
||||
// completely invisible as it does not apply to the user at all.
|
||||
if (!empty($CFG->enablegroupmembersonly) and !empty($this->groupmembersonly)
|
||||
and !has_capability('moodle/site:accessallgroups', $modcontext, $userid)) {
|
||||
// If the activity has 'group members only' and you don't have accessallgroups...
|
||||
$groups = $this->modinfo->get_groups($this->groupingid);
|
||||
if (empty($groups)) {
|
||||
// ...and you don't belong to a group, then set it so you can't see/access it
|
||||
$this->uservisible = false;
|
||||
// Ensure activity is completely hidden from user.
|
||||
$this->showavailability = 0;
|
||||
|
||||
// Check group membership.
|
||||
if ($this->is_user_access_restricted_by_group()) {
|
||||
|
||||
$this->uservisible = false;
|
||||
// Ensure activity is completely hidden from the user.
|
||||
$this->showavailability = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the module's group settings restrict the current user's access
|
||||
*
|
||||
* @return bool True if the user access is restricted
|
||||
*/
|
||||
public function is_user_access_restricted_by_group() {
|
||||
global $CFG;
|
||||
|
||||
if (!empty($CFG->enablegroupmembersonly) and !empty($this->groupmembersonly)) {
|
||||
$modcontext = context_module::instance($this->id);
|
||||
$userid = $this->modinfo->get_user_id();
|
||||
if (!has_capability('moodle/site:accessallgroups', $modcontext, $userid)) {
|
||||
// If the activity has 'group members only' and you don't have accessallgroups...
|
||||
$groups = $this->modinfo->get_groups($this->groupingid);
|
||||
if (empty($groups)) {
|
||||
// ...and you don't belong to a group, then set it so you can't see/access it
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the module's conditional access settings mean that the user cannot see the activity at all
|
||||
*
|
||||
* @return bool True if the user cannot see the module. False if the activity is either available or should be greyed out.
|
||||
*/
|
||||
public function is_user_access_restricted_by_conditional_access() {
|
||||
global $CFG, $USER;
|
||||
|
||||
if (empty($CFG->enableavailability)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If module will always be visible anyway (but greyed out), don't bother checking anything else
|
||||
if ($this->showavailability == CONDITION_STUDENTVIEW_SHOW) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Can the user see hidden modules?
|
||||
$modcontext = context_module::instance($this->id);
|
||||
$userid = $this->modinfo->get_user_id();
|
||||
if (has_capability('moodle/course:viewhiddenactivities', $modcontext, $userid)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Is the module hidden due to unmet conditions?
|
||||
if (!$this->available) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+56
-16
@@ -3201,6 +3201,11 @@ function get_user_key($script, $userid, $instance=null, $iprestriction=null, $va
|
||||
function update_user_login_times() {
|
||||
global $USER, $DB;
|
||||
|
||||
if (isguestuser()) {
|
||||
// Do not update guest access times/ips for performance.
|
||||
return true;
|
||||
}
|
||||
|
||||
$now = time();
|
||||
|
||||
$user = new stdClass();
|
||||
@@ -5808,20 +5813,33 @@ function get_max_upload_file_size($sitebytes=0, $coursebytes=0, $modulebytes=0)
|
||||
* @param int $sizebytes Set maximum size
|
||||
* @param int $coursebytes Current course $course->maxbytes (in bytes)
|
||||
* @param int $modulebytes Current module ->maxbytes (in bytes)
|
||||
* @param int|array $custombytes custom upload size/s which will be added to list,
|
||||
* Only value/s smaller then maxsize will be added to list.
|
||||
* @return array
|
||||
*/
|
||||
function get_max_upload_sizes($sitebytes=0, $coursebytes=0, $modulebytes=0) {
|
||||
function get_max_upload_sizes($sitebytes = 0, $coursebytes = 0, $modulebytes = 0, $custombytes = null) {
|
||||
global $CFG;
|
||||
|
||||
if (!$maxsize = get_max_upload_file_size($sitebytes, $coursebytes, $modulebytes)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$filesize = array();
|
||||
$filesize[intval($maxsize)] = display_size($maxsize);
|
||||
|
||||
$sizelist = array(10240, 51200, 102400, 512000, 1048576, 2097152,
|
||||
5242880, 10485760, 20971520, 52428800, 104857600);
|
||||
|
||||
// If custombytes is given and is valid then add it to the list.
|
||||
if (is_number($custombytes) and $custombytes > 0) {
|
||||
$custombytes = (int)$custombytes;
|
||||
if (!in_array($custombytes, $sizelist)) {
|
||||
$sizelist[] = $custombytes;
|
||||
}
|
||||
} else if (is_array($custombytes)) {
|
||||
$sizelist = array_unique(array_merge($sizelist, $custombytes));
|
||||
}
|
||||
|
||||
// Allow maxbytes to be selected if it falls outside the above boundaries
|
||||
if (isset($CFG->maxbytes) && !in_array(get_real_size($CFG->maxbytes), $sizelist)) {
|
||||
// note: get_real_size() is used in order to prevent problems with invalid values
|
||||
@@ -8179,18 +8197,45 @@ function check_php_version($version='5.2.4') {
|
||||
|
||||
|
||||
case 'Gecko': /// Gecko based browsers
|
||||
if (empty($version) and substr_count($agent, 'Camino')) {
|
||||
// MacOS X Camino support
|
||||
$version = 20041110;
|
||||
// Do not look for dates any more, we expect real Firefox version here.
|
||||
if (empty($version)) {
|
||||
$version = 1;
|
||||
} else if ($version > 20000000) {
|
||||
// This is just a guess, it is not supposed to be 100% accurate!
|
||||
if (preg_match('/^201/', $version)) {
|
||||
$version = 3.6;
|
||||
} else if (preg_match('/^200[7-9]/', $version)) {
|
||||
$version = 3;
|
||||
} else if (preg_match('/^2006/', $version)) {
|
||||
$version = 2;
|
||||
} else {
|
||||
$version = 1.5;
|
||||
}
|
||||
}
|
||||
|
||||
// the proper string - Gecko/CCYYMMDD Vendor/Version
|
||||
// Faster version and work-a-round No IDN problem.
|
||||
if (preg_match("/Gecko\/([0-9]+)/i", $agent, $match)) {
|
||||
if ($match[1] > $version) {
|
||||
return true;
|
||||
if (preg_match("/(Iceweasel|Firefox)\/([0-9\.]+)/i", $agent, $match)) {
|
||||
// Use real Firefox version if specified in user agent string.
|
||||
if (version_compare($match[2], $version) >= 0) {
|
||||
return true;
|
||||
}
|
||||
} else if (preg_match("/Gecko\/([0-9\.]+)/i", $agent, $match)) {
|
||||
// Gecko might contain date or Firefox revision, let's just guess the Firefox version from the date.
|
||||
$browserver = $match[1];
|
||||
if ($browserver > 20000000) {
|
||||
// This is just a guess, it is not supposed to be 100% accurate!
|
||||
if (preg_match('/^201/', $browserver)) {
|
||||
$browserver = 3.6;
|
||||
} else if (preg_match('/^200[7-9]/', $browserver)) {
|
||||
$browserver = 3;
|
||||
} else if (preg_match('/^2006/', $version)) {
|
||||
$browserver = 2;
|
||||
} else {
|
||||
$browserver = 1.5;
|
||||
}
|
||||
}
|
||||
if (version_compare($browserver, $version) >= 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -10223,17 +10268,12 @@ function object_property_exists( $obj, $property ) {
|
||||
*/
|
||||
function convert_to_array($var) {
|
||||
$result = array();
|
||||
$references = array();
|
||||
|
||||
// loop over elements/properties
|
||||
foreach ($var as $key => $value) {
|
||||
// recursively convert objects
|
||||
if (is_object($value) || is_array($value)) {
|
||||
// but prevent cycles
|
||||
if (!in_array($value, $references)) {
|
||||
$result[$key] = convert_to_array($value);
|
||||
$references[] = $value;
|
||||
}
|
||||
$result[$key] = convert_to_array($value);
|
||||
} else {
|
||||
// simple values are untouched
|
||||
$result[$key] = $value;
|
||||
|
||||
@@ -3177,7 +3177,7 @@ class settings_navigation extends navigation_node {
|
||||
|
||||
if (has_capability('moodle/course:update', $coursecontext)) {
|
||||
// Add the turn on/off settings
|
||||
$url = new moodle_url('/course/view.php', array('id'=>$course->id, 'sesskey'=>sesskey()));
|
||||
$url = new moodle_url('/course/view.php', array('id'=>$course->id, 'return'=>str_replace($CFG->wwwroot, '', $this->page->url->out(false)), 'sesskey'=>sesskey()));
|
||||
if ($this->page->user_is_editing()) {
|
||||
$url->param('edit', 'off');
|
||||
$editstring = get_string('turneditingoff');
|
||||
|
||||
@@ -329,12 +329,26 @@ class user_picture implements renderable {
|
||||
// Hash the users email address
|
||||
$md5 = md5(strtolower(trim($this->user->email)));
|
||||
// Build a gravatar URL with what we know.
|
||||
|
||||
// Find the best default image URL we can (MDL-35669)
|
||||
if (empty($CFG->gravatardefaulturl)) {
|
||||
$absoluteimagepath = $page->theme->resolve_image_location('u/'.$filename, 'core');
|
||||
if (strpos($absoluteimagepath, $CFG->dirroot) === 0) {
|
||||
$gravatardefault = $CFG->wwwroot . substr($absoluteimagepath, strlen($CFG->dirroot));
|
||||
} else {
|
||||
$gravatardefault = $CFG->wwwroot . '/pix/u/' . $filename . '.png';
|
||||
}
|
||||
} else {
|
||||
$gravatardefault = $CFG->gravatardefaulturl;
|
||||
}
|
||||
|
||||
// If the currently requested page is https then we'll return an
|
||||
// https gravatar page.
|
||||
if (strpos($CFG->httpswwwroot, 'https:') === 0) {
|
||||
$imageurl = new moodle_url("https://secure.gravatar.com/avatar/{$md5}", array('s' => $size, 'd' => $imageurl->out(false)));
|
||||
$gravatardefault = str_replace($CFG->wwwroot, $CFG->httpswwwroot, $gravatardefault); // Replace by secure url.
|
||||
$imageurl = new moodle_url("https://secure.gravatar.com/avatar/{$md5}", array('s' => $size, 'd' => $gravatardefault));
|
||||
} else {
|
||||
$imageurl = new moodle_url("http://www.gravatar.com/avatar/{$md5}", array('s' => $size, 'd' => $imageurl->out(false)));
|
||||
$imageurl = new moodle_url("http://www.gravatar.com/avatar/{$md5}", array('s' => $size, 'd' => $gravatardefault));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -470,6 +484,10 @@ class pix_icon implements renderable {
|
||||
}
|
||||
if (!isset($this->attributes['title'])) {
|
||||
$this->attributes['title'] = $this->attributes['alt'];
|
||||
} else if (empty($this->attributes['title'])) {
|
||||
// Remove the title attribute if empty, we probably want to use the parent node's title
|
||||
// and some browsers might overwrite it with an empty title.
|
||||
unset($this->attributes['title']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-3
@@ -1530,7 +1530,13 @@ class core_renderer extends renderer_base {
|
||||
$ratinghtml .= html_writer::empty_tag('input', $attributes);
|
||||
|
||||
if (!$rating->settings->scale->isnumeric) {
|
||||
$ratinghtml .= $this->help_icon_scale($rating->settings->scale->courseid, $rating->settings->scale);
|
||||
// If a global scale, try to find current course ID from the context
|
||||
if (empty($rating->settings->scale->courseid) and $coursecontext = $rating->context->get_course_context(false)) {
|
||||
$courseid = $coursecontext->instanceid;
|
||||
} else {
|
||||
$courseid = $rating->settings->scale->courseid;
|
||||
}
|
||||
$ratinghtml .= $this->help_icon_scale($courseid, $rating->settings->scale);
|
||||
}
|
||||
$ratinghtml .= html_writer::end_tag('span');
|
||||
$ratinghtml .= html_writer::end_tag('div');
|
||||
@@ -1617,12 +1623,13 @@ class core_renderer extends renderer_base {
|
||||
// note: this title is displayed only if JS is disabled, otherwise the link will have the new ajax tooltip
|
||||
$title = get_string('helpprefix2', '', trim($helpicon->title, ". \t"));
|
||||
|
||||
$attributes = array('href'=>$url, 'title'=>$title);
|
||||
$attributes = array('href'=>$url, 'title'=>$title, 'aria-haspopup' => 'true');
|
||||
$id = html_writer::random_id('helpicon');
|
||||
$attributes['id'] = $id;
|
||||
$output = html_writer::tag('a', $output, $attributes);
|
||||
|
||||
$this->page->requires->js_init_call('M.util.help_icon.add', array(array('id'=>$id, 'url'=>$url->out(false))));
|
||||
$this->page->requires->string_for_js('close', 'form');
|
||||
|
||||
// and finally span
|
||||
return html_writer::tag('span', $output, array('class' => 'helplink'));
|
||||
@@ -1681,12 +1688,13 @@ class core_renderer extends renderer_base {
|
||||
// note: this title is displayed only if JS is disabled, otherwise the link will have the new ajax tooltip
|
||||
$title = get_string('helpprefix2', '', trim($title, ". \t"));
|
||||
|
||||
$attributes = array('href'=>$url, 'title'=>$title);
|
||||
$attributes = array('href'=>$url, 'title'=>$title, 'aria-haspopup' => 'true');
|
||||
$id = html_writer::random_id('helpicon');
|
||||
$attributes['id'] = $id;
|
||||
$output = html_writer::tag('a', $output, $attributes);
|
||||
|
||||
$this->page->requires->js_init_call('M.util.help_icon.add', array(array('id'=>$id, 'url'=>$url->out(false))));
|
||||
$this->page->requires->string_for_js('close', 'form');
|
||||
|
||||
// and finally span
|
||||
return html_writer::tag('span', $output, array('class' => 'helplink'));
|
||||
|
||||
@@ -918,6 +918,7 @@ class moodle_page {
|
||||
*/
|
||||
public function set_title($title) {
|
||||
$title = format_string($title);
|
||||
$title = strip_tags($title);
|
||||
$title = str_replace('"', '"', $title);
|
||||
$this->_title = $title;
|
||||
}
|
||||
|
||||
@@ -1238,6 +1238,74 @@ function portfolio_rewrite_pluginfile_url_callback($contextid, $component, $file
|
||||
return $format->file_output($file, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to require any potential callback files, throwing exceptions
|
||||
* if an issue occurs.
|
||||
*
|
||||
* @param string $callbackfile This is the location of the callback file '/mod/forum/locallib.php'
|
||||
* @param string $class Name of the class containing the callback functions
|
||||
* activity components should ALWAYS use their name_portfolio_caller
|
||||
* other locations must use something unique
|
||||
*/
|
||||
function portfolio_include_callback_file($callbackfile, $class = null) {
|
||||
global $CFG;
|
||||
require_once($CFG->libdir . '/adminlib.php');
|
||||
|
||||
// Get the last occurrence of '/' in the file path.
|
||||
$pos = strrpos($callbackfile, '/');
|
||||
// Get rid of the first slash (if it exists).
|
||||
$callbackfile = ltrim($callbackfile, '/');
|
||||
// Get a list of valid plugin types.
|
||||
$plugintypes = get_plugin_types(false);
|
||||
// Assume it is not valid for now.
|
||||
$isvalid = false;
|
||||
// Go through the plugin types.
|
||||
foreach ($plugintypes as $type => $path) {
|
||||
if (strrpos($callbackfile, $path) === 0) {
|
||||
// Found the plugin type.
|
||||
$isvalid = true;
|
||||
$plugintype = $type;
|
||||
$pluginpath = $path;
|
||||
}
|
||||
}
|
||||
// Throw exception if not a valid component.
|
||||
if (!$isvalid) {
|
||||
throw new coding_exception('Somehow a non-valid plugin path was passed, could be a hackz0r attempt, exiting.');
|
||||
}
|
||||
// Keep record of the filename.
|
||||
$filename = substr($callbackfile, $pos);
|
||||
// Remove the file name.
|
||||
$component = trim(substr($callbackfile, 0, $pos), '/');
|
||||
// Replace the path with the type.
|
||||
$component = str_replace($pluginpath, $plugintype, $component);
|
||||
// Ok, replace '/' with '_'.
|
||||
$component = str_replace('/', '_', $component);
|
||||
// Check that it is a valid component.
|
||||
if (!get_component_version($component)) {
|
||||
throw new portfolio_button_exception('nocallbackcomponent', 'portfolio', '', $component);
|
||||
}
|
||||
|
||||
// Obtain the component's location.
|
||||
if (!$componentloc = get_component_directory($component)) {
|
||||
throw new portfolio_button_exception('nocallbackcomponent', 'portfolio', '', $component);
|
||||
}
|
||||
|
||||
// Check if the filename does not meet any of the expected names.
|
||||
if (($filename != 'locallib.php') && ($filename != 'portfoliolib.php') && ($filename != 'portfolio_callback.php')) {
|
||||
debugging('Please standardise your plugin by keeping your portfolio callback functionality in the file locallib.php.', DEBUG_DEVELOPER);
|
||||
}
|
||||
|
||||
// Throw error if file does not exist.
|
||||
if (!file_exists($componentloc . '/' . $filename)) {
|
||||
throw new portfolio_button_exception('nocallbackfile', 'portfolio', '', $callbackfile);
|
||||
}
|
||||
|
||||
require_once($componentloc . '/' . $filename);
|
||||
|
||||
if (!is_null($class) && !class_exists($class)) {
|
||||
throw new portfolio_button_exception('nocallbackclass', 'portfolio', '', $class);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* go through all the @@PLUGINFILE@@ matches in some text,
|
||||
|
||||
+18
-5
@@ -1179,12 +1179,25 @@ function question_add_tops($categories, $pcontexts) {
|
||||
function question_categorylist($categoryid) {
|
||||
global $DB;
|
||||
|
||||
$subcategories = $DB->get_records('question_categories',
|
||||
array('parent' => $categoryid), 'sortorder ASC', 'id, 1');
|
||||
// final list of category IDs
|
||||
$categorylist = array();
|
||||
|
||||
$categorylist = array($categoryid);
|
||||
foreach ($subcategories as $subcategory) {
|
||||
$categorylist = array_merge($categorylist, question_categorylist($subcategory->id));
|
||||
// a list of category IDs to check for any sub-categories
|
||||
$subcategories = array($categoryid);
|
||||
|
||||
while ($subcategories) {
|
||||
foreach ($subcategories as $subcategory) {
|
||||
// if anything from the temporary list was added already, then we have a loop
|
||||
if (isset($categorylist[$subcategory])) {
|
||||
throw new coding_exception("Category id=$subcategory is already on the list - loop of categories detected.");
|
||||
}
|
||||
$categorylist[$subcategory] = $subcategory;
|
||||
}
|
||||
|
||||
list ($in, $params) = $DB->get_in_or_equal($subcategories);
|
||||
|
||||
$subcategories = $DB->get_records_select_menu('question_categories',
|
||||
"parent $in", $params, NULL, 'id,id AS id2');
|
||||
}
|
||||
|
||||
return $categorylist;
|
||||
|
||||
+12
-9
@@ -734,16 +734,19 @@ class flexible_table {
|
||||
function col_fullname($row) {
|
||||
global $COURSE, $CFG;
|
||||
|
||||
if (!$this->download) {
|
||||
$profileurl = new moodle_url('/user/profile.php', array('id' => $row->{$this->useridfield}));
|
||||
if ($COURSE->id != SITEID) {
|
||||
$profileurl->param('course', $COURSE->id);
|
||||
}
|
||||
return html_writer::link($profileurl, fullname($row));
|
||||
|
||||
} else {
|
||||
return fullname($row);
|
||||
$name = fullname($row);
|
||||
if ($this->download) {
|
||||
return $name;
|
||||
}
|
||||
|
||||
$userid = $row->{$this->useridfield};
|
||||
if ($COURSE->id == SITEID) {
|
||||
$profileurl = new moodle_url('/user/profile.php', array('id' => $userid));
|
||||
} else {
|
||||
$profileurl = new moodle_url('/user/view.php',
|
||||
array('id' => $userid, 'course' => $COURSE->id));
|
||||
}
|
||||
return html_writer::link($profileurl, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -877,7 +877,7 @@ function external_update_descriptions($component) {
|
||||
$dbfunction->classpath = $function['classpath'];
|
||||
$update = true;
|
||||
}
|
||||
$functioncapabilities = key_exists('capabilities', $function)?$function['capabilities']:'';
|
||||
$functioncapabilities = array_key_exists('capabilities', $function)?$function['capabilities']:'';
|
||||
if ($dbfunction->capabilities != $functioncapabilities) {
|
||||
$dbfunction->capabilities = $functioncapabilities;
|
||||
$update = true;
|
||||
@@ -893,7 +893,7 @@ function external_update_descriptions($component) {
|
||||
$dbfunction->methodname = $function['methodname'];
|
||||
$dbfunction->classpath = empty($function['classpath']) ? null : $function['classpath'];
|
||||
$dbfunction->component = $component;
|
||||
$dbfunction->capabilities = key_exists('capabilities', $function)?$function['capabilities']:'';
|
||||
$dbfunction->capabilities = array_key_exists('capabilities', $function)?$function['capabilities']:'';
|
||||
$dbfunction->id = $DB->insert_record('external_functions', $dbfunction);
|
||||
}
|
||||
unset($functions);
|
||||
|
||||
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