Compare commits
171 Commits
v2.3.0-rc1
...
v2.3.1
| Author | SHA1 | Date | |
|---|---|---|---|
| f2867a8672 | |||
| 62e9e694b7 | |||
| b24e6ed930 | |||
| 50b1caaf86 | |||
| 2ddf3ffcd2 | |||
| b73a7519c4 | |||
| 2425229c88 | |||
| 353580b0e3 | |||
| 4539b33788 | |||
| 9b47ec7bb3 | |||
| b9c20952a3 | |||
| e819ff4263 | |||
| b20b1c32bf | |||
| 1e9130ae6e | |||
| c57fa60f3d | |||
| 617d260dd7 | |||
| b86a48c5b9 | |||
| a2c2ab3e1a | |||
| bbe378a63e | |||
| 9d5ced06c1 | |||
| 6019d2b2f3 | |||
| ccef7fe8d0 | |||
| f2b7928df7 | |||
| 9f6f18d2c2 | |||
| 848fc30a2d | |||
| 8530aac4a8 | |||
| 3bcca35591 | |||
| e3f4094ac8 | |||
| 7df86db31d | |||
| b41f914927 | |||
| a5f68fb2c2 | |||
| 28f23328c5 | |||
| 3e1648723f | |||
| 60a72a03b2 | |||
| 741543e9a7 | |||
| a1a00aeee7 | |||
| 9152878ed3 | |||
| 81b2147092 | |||
| e570ee4b63 | |||
| 0afd953daf | |||
| f224fd9498 | |||
| 69b2bab32e | |||
| f95e28e0ff | |||
| f5cd2c6ef1 | |||
| 10ff22d6f6 | |||
| d0d407f0bb | |||
| 8ad459ed58 | |||
| cf5b51af0e | |||
| 18c264790a | |||
| 7523da44fc | |||
| bd9ecafba9 | |||
| 5200c254a1 | |||
| 3d43075cfd | |||
| 5df543a60e | |||
| bed1c4a943 | |||
| 66ff4c0a06 | |||
| 9ea8065f1c | |||
| eadad29dc9 | |||
| e068b3dbe3 | |||
| 5809f6912b | |||
| 815aecf6c7 | |||
| 15d8babd1a | |||
| a78e4e9147 | |||
| d9edd25111 | |||
| 1a76bbe2e4 | |||
| af63cc85df | |||
| dff8438e50 | |||
| ec3fe6e123 | |||
| 770cee9696 | |||
| 1db89f5e6a | |||
| 5c1b768aec | |||
| f2b4305c8e | |||
| 502ecc4c9f | |||
| 34c10b84fb | |||
| f09dcd4b6d | |||
| 2b1b2017a6 | |||
| 592443f4e1 | |||
| dabab94b6e | |||
| 039089f3aa | |||
| 9cb942820c | |||
| 0ba1ee1dd2 | |||
| 7debccbdee | |||
| 9a211c853d | |||
| ed8cab855e | |||
| 6253f69246 | |||
| 49ac5deff6 | |||
| 6737eda426 | |||
| c7132d7c93 | |||
| d9b9bfd288 | |||
| ec70cf6ef1 | |||
| a6b0b36cdc | |||
| 3e839bd513 | |||
| 8633142f53 | |||
| 564b878840 | |||
| c3f59e043c | |||
| 4b0e6f38fa | |||
| fb978df0f0 | |||
| 45353da409 | |||
| 08641906e1 | |||
| 6b5ce20c16 | |||
| 800fb7533e | |||
| 789c8b8194 | |||
| e9aa190a37 | |||
| 786ad3511c | |||
| abfc9e2512 | |||
| e5c2bbd0f7 | |||
| 1494f20da3 | |||
| 4fa4a727b4 | |||
| 4be710795a | |||
| 9ea40f27a0 | |||
| 19ba134d3b | |||
| d0812ba0e6 | |||
| a2b8856558 | |||
| a61e8c8ebe | |||
| 1cf431a329 | |||
| 9ee97228bd | |||
| 43fb824bd2 | |||
| 9d774c9445 | |||
| 8b3d60557c | |||
| 134affd943 | |||
| 5df5bcba99 | |||
| 93fd7cb10c | |||
| 3705a88629 | |||
| 5cb477c4a1 | |||
| 4aabce216c | |||
| b273b20a7c | |||
| f8e05deb35 | |||
| 263e8c144c | |||
| b574c078a6 | |||
| a44c303d63 | |||
| e5ff0d3278 | |||
| faca708484 | |||
| fc14c79fc9 | |||
| 2670a3a684 | |||
| d81d6ea2c3 | |||
| b0cf55f145 | |||
| 5af6c9676e | |||
| 225e058685 | |||
| 3d348a3cc7 | |||
| 896f9ae83b | |||
| 11824b0461 | |||
| 9b57d5bc38 | |||
| a5f6ea2e88 | |||
| 7dcdca9c85 | |||
| 386a862f95 | |||
| a2be8d9dbe | |||
| 84874400c5 | |||
| a9ca93db95 | |||
| 95bcc6e2d3 | |||
| f5fee1e148 | |||
| 3ab04302dd | |||
| 6100b006f1 | |||
| 13429b9596 | |||
| b0d3162930 | |||
| c8161eec94 | |||
| 72b33964f6 | |||
| 26992cf171 | |||
| 4c8926c7c3 | |||
| 224d186ebb | |||
| 511a58d945 | |||
| d71f207da0 | |||
| 125231acf9 | |||
| f935363572 | |||
| c01f7628f7 | |||
| 75d1891548 | |||
| 6c213ef776 | |||
| aefe9734fa | |||
| e0d90c54c0 | |||
| a1b0852779 | |||
| 99f374c457 | |||
| 8ac8aae4f4 |
+15
-8
@@ -131,12 +131,25 @@
|
||||
$table->setup();
|
||||
$tablerows = array();
|
||||
|
||||
// Sort blocks using current locale.
|
||||
$blocknames = array();
|
||||
foreach ($blocks as $blockid=>$block) {
|
||||
$blockname = $block->name;
|
||||
if (file_exists("$CFG->dirroot/blocks/$blockname/block_$blockname.php")) {
|
||||
$blocknames[$blockid] = get_string('pluginname', 'block_'.$blockname);
|
||||
} else {
|
||||
$blocknames[$blockid] = $blockname;
|
||||
}
|
||||
}
|
||||
collatorlib::asort($blocknames);
|
||||
|
||||
foreach ($blocknames as $blockid=>$strblockname) {
|
||||
$block = $blocks[$blockid];
|
||||
$blockname = $block->name;
|
||||
|
||||
if (!file_exists("$CFG->dirroot/blocks/$blockname/block_$blockname.php")) {
|
||||
$blockobject = false;
|
||||
$strblockname = '<span class="notifyproblem">'.$blockname.' ('.get_string('missingfromdisk').')</span>';
|
||||
$strblockname = '<span class="notifyproblem">'.$strblockname.' ('.get_string('missingfromdisk').')</span>';
|
||||
$plugin = new stdClass();
|
||||
$plugin->version = $block->version;
|
||||
|
||||
@@ -151,7 +164,6 @@
|
||||
$incompatible[] = $block;
|
||||
continue;
|
||||
}
|
||||
$strblockname = get_string('pluginname', 'block_'.$blockname);
|
||||
}
|
||||
|
||||
$delete = '<a href="blocks.php?delete='.$blockid.'&sesskey='.sesskey().'">'.$strdelete.'</a>';
|
||||
@@ -222,12 +234,7 @@
|
||||
$delete,
|
||||
$settings
|
||||
);
|
||||
$tablerows[] = array(strip_tags($strblockname), $row); // first element will be used for sorting
|
||||
}
|
||||
|
||||
collatorlib::asort($tablerows);
|
||||
foreach ($tablerows as $row) {
|
||||
$table->add_data($row[1]);
|
||||
$table->add_data($row);
|
||||
}
|
||||
|
||||
$table->print_html();
|
||||
|
||||
+4
-20
@@ -214,11 +214,7 @@
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mysql" version="5.0.25">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="mysql416required" />
|
||||
</FEEDBACK>
|
||||
</VENDOR>
|
||||
<VENDOR name="mysql" version="5.0.25" />
|
||||
<VENDOR name="postgres" version="8.3" />
|
||||
<VENDOR name="mssql" version="9.0" />
|
||||
<VENDOR name="odbc_mssql" version="9.0" />
|
||||
@@ -335,11 +331,7 @@
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mysql" version="5.0.25">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="mysql416required" />
|
||||
</FEEDBACK>
|
||||
</VENDOR>
|
||||
<VENDOR name="mysql" version="5.0.25" />
|
||||
<VENDOR name="postgres" version="8.3" />
|
||||
<VENDOR name="mssql" version="9.0" />
|
||||
<VENDOR name="odbc_mssql" version="9.0" />
|
||||
@@ -449,11 +441,7 @@
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mysql" version="5.0.25">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="mysql416required" />
|
||||
</FEEDBACK>
|
||||
</VENDOR>
|
||||
<VENDOR name="mysql" version="5.0.25" />
|
||||
<VENDOR name="postgres" version="8.3" />
|
||||
<VENDOR name="mssql" version="9.0" />
|
||||
<VENDOR name="odbc_mssql" version="9.0" />
|
||||
@@ -563,11 +551,7 @@
|
||||
</FEEDBACK>
|
||||
</UNICODE>
|
||||
<DATABASE level="required">
|
||||
<VENDOR name="mysql" version="5.0.25">
|
||||
<FEEDBACK>
|
||||
<ON_ERROR message="mysql416required" />
|
||||
</FEEDBACK>
|
||||
</VENDOR>
|
||||
<VENDOR name="mysql" version="5.1.33" />
|
||||
<VENDOR name="postgres" version="8.3" />
|
||||
<VENDOR name="mssql" version="9.0" />
|
||||
<VENDOR name="odbc_mssql" version="9.0" />
|
||||
|
||||
@@ -30,5 +30,9 @@ function xmldb_tool_customlang_upgrade($oldversion) {
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
width: 60%;
|
||||
margin: auto;
|
||||
padding: 1em;
|
||||
border: 1px black solid;
|
||||
border: 1px solid black;
|
||||
-moz-border-radius: 6px;
|
||||
}
|
||||
.path-admin-tool-health dl.healthissues {
|
||||
@@ -35,15 +35,15 @@
|
||||
.path-admin-tool-health dl.healthissues dd {
|
||||
margin: 0px;
|
||||
padding: 1em;
|
||||
border: 1px black solid;
|
||||
border: 1px solid black;
|
||||
}
|
||||
.path-admin-tool-health dl.healthissues dt {
|
||||
font-weight: bold;
|
||||
border-bottom: none;
|
||||
border-bottom: 0;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
.path-admin-tool-health dl.healthissues dd {
|
||||
border-top: none;
|
||||
border-top: 0;
|
||||
padding-top: 0.5em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
@@ -33,8 +33,9 @@ $PAGE->set_title("$site->fullname: $loginsite");
|
||||
$PAGE->set_heading($site->fullname);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
// $PAGE->https_required() up above takes care of what $CFG->httpswwwroot should be.
|
||||
$msg = '<p>'.get_string('ntlmsso_attempting', 'auth_ldap').'</p>'
|
||||
. '<img width="1", height="1" '
|
||||
. ' src="' . $CFG->wwwroot . '/auth/ldap/ntlmsso_magic.php?sesskey='
|
||||
. ' src="' . $CFG->httpswwwroot . '/auth/ldap/ntlmsso_magic.php?sesskey='
|
||||
. $sesskey . '" />';
|
||||
redirect($CFG->wwwroot . '/auth/ldap/ntlmsso_finish.php', $msg, 3);
|
||||
redirect($CFG->httpswwwroot . '/auth/ldap/ntlmsso_finish.php', $msg, 3);
|
||||
|
||||
@@ -29,7 +29,8 @@ $file = $CFG->dirroot.'/pix/spacer.gif';
|
||||
if ($authplugin->ntlmsso_magic($sesskey) && file_exists($file)) {
|
||||
if (!empty($authplugin->config->ntlmsso_ie_fastpath)) {
|
||||
if (check_browser_version('MSIE')) {
|
||||
redirect($CFG->wwwroot.'/auth/ldap/ntlmsso_finish.php');
|
||||
// $PAGE->https_required() up above takes care of what $CFG->httpswwwroot should be.
|
||||
redirect($CFG->httpswwwroot.'/auth/ldap/ntlmsso_finish.php');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,5 +33,9 @@ function xmldb_auth_manual_upgrade($oldversion) {
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -34,5 +34,9 @@ function xmldb_auth_mnet_upgrade($oldversion) {
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,17 +44,17 @@ $PAGE->https_required();
|
||||
// Redirect to SessionInitiator with entityID as argument
|
||||
if (isset($IdPs[$selectedIdP][1]) && !empty($IdPs[$selectedIdP][1])) {
|
||||
// For Shibbolet 1.x Service Providers
|
||||
header('Location: '.$IdPs[$selectedIdP][1].'?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
|
||||
header('Location: '.$IdPs[$selectedIdP][1].'?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
|
||||
|
||||
// For Shibbolet 2.x Service Providers
|
||||
// header('Location: '.$IdPs[$selectedIdP][1].'?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
|
||||
// header('Location: '.$IdPs[$selectedIdP][1].'?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
|
||||
|
||||
} else {
|
||||
// For Shibbolet 1.x Service Providers
|
||||
header('Location: /Shibboleth.sso?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
|
||||
header('Location: /Shibboleth.sso?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
|
||||
|
||||
// For Shibboleth 2.x Service Providers
|
||||
// header('Location: /Shibboleth.sso/DS?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
|
||||
// header('Location: /Shibboleth.sso/DS?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
|
||||
}
|
||||
} elseif (isset($_POST['idp']) && !isset($IdPs[$_POST['idp']])) {
|
||||
$errormsg = get_string('auth_shibboleth_errormsg', 'auth_shibboleth');
|
||||
|
||||
@@ -46,5 +46,9 @@
|
||||
function xmldb_block_community_upgrade($oldversion) {
|
||||
global $CFG, $DB;
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
bottom:0;
|
||||
right:0;
|
||||
opacity:0.35;
|
||||
filter:alpha(opacity:35);
|
||||
filter:alpha(opacity=35);
|
||||
background:#000;
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ class block_completionstatus extends block_base {
|
||||
$a = new stdClass();
|
||||
$a->first = $prerequisites_complete;
|
||||
$a->second = count($prerequisites);
|
||||
$shtml .= get_string('firstofsecond', 'block_completionstatus', $a);
|
||||
$phtml .= get_string('firstofsecond', 'block_completionstatus', $a);
|
||||
$phtml .= '</td></tr>';
|
||||
|
||||
$shtml = $phtml . $shtml;
|
||||
|
||||
@@ -4,7 +4,7 @@ if (is_file($CFG->dirroot.'/mod/feedback/lib.php')) {
|
||||
define('FEEDBACK_BLOCK_LIB_IS_OK', true);
|
||||
}
|
||||
|
||||
class block_feedback extends block_base {
|
||||
class block_feedback extends block_list {
|
||||
|
||||
function init() {
|
||||
$this->title = get_string('feedback', 'block_feedback');
|
||||
@@ -21,10 +21,13 @@ class block_feedback extends block_base {
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
$this->content = new stdClass;
|
||||
$this->content->items = array();
|
||||
$this->content->icons = array();
|
||||
$this->content->footer = '';
|
||||
|
||||
if (!defined('FEEDBACK_BLOCK_LIB_IS_OK')) {
|
||||
$this->content = new stdClass;
|
||||
$this->content->text = get_string('missing_feedback_module', 'block_feedback');
|
||||
$this->content->footer = '';
|
||||
$this->content->items = array(get_string('missing_feedback_module', 'block_feedback'));
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
@@ -33,9 +36,7 @@ class block_feedback extends block_base {
|
||||
$courseid = SITEID;
|
||||
}
|
||||
|
||||
$this->content = new stdClass;
|
||||
$this->content->text = '';
|
||||
$this->content->footer = '';
|
||||
$icon = '<img src="'.$OUTPUT->pix_url('icon', 'feedback') . '" class="icon" alt="" />';
|
||||
|
||||
|
||||
if (empty($this->instance->pageid)) {
|
||||
@@ -47,8 +48,7 @@ class block_feedback extends block_base {
|
||||
foreach ($feedbacks as $feedback) {
|
||||
$url = new moodle_url($baseurl);
|
||||
$url->params(array('id'=>$feedback->cmid, 'courseid'=>$courseid));
|
||||
$icon = '<img src="'.$OUTPUT->pix_url('icon', 'feedback') . '" class="icon" alt="" /> ';
|
||||
$this->content->text = ' <a href="'.$url->out().'">'.$icon.$feedback->name.'</a>';
|
||||
$this->content->items[] = '<a href="'.$url->out().'">'.$icon.$feedback->name.'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,5 +32,9 @@
|
||||
function xmldb_block_html_upgrade($oldversion) {
|
||||
global $CFG, $DB;
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -58,5 +58,9 @@ function xmldb_block_navigation_upgrade($oldversion, $block) {
|
||||
// Moodle v2.2.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -58,5 +58,9 @@ function xmldb_block_settings_upgrade($oldversion, $block) {
|
||||
// Moodle v2.2.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
+1
-1
@@ -108,7 +108,7 @@ $repeatspan = '';
|
||||
if (!empty($event->eventrepeats) && $event->eventrepeats > 0) {
|
||||
$url = new moodle_url(CALENDAR_URL.'delete.php', array('id'=>$event->repeatid, 'confirm'=>true, 'repeats'=>true));
|
||||
$buttons .= $OUTPUT->single_button($url, get_string('deleteall'));
|
||||
$repeatspan = '<br /><br /><span>'.get_string('youcandeleteallrepeats', 'calendar').'</span>';
|
||||
$repeatspan = '<br /><br /><span>'.get_string('youcandeleteallrepeats', 'calendar', $event->eventrepeats).'</span>';
|
||||
}
|
||||
|
||||
// And add the cancel button
|
||||
|
||||
@@ -49,7 +49,7 @@ class cohort_edit_form extends moodleform {
|
||||
$mform->addElement('select', 'contextid', get_string('context', 'role'), $options);
|
||||
|
||||
$mform->addElement('text', 'idnumber', get_string('idnumber', 'cohort'), 'maxlength="254" size="50"');
|
||||
$mform->setType('name', PARAM_RAW); // idnumbers are plain text, must not be changed
|
||||
$mform->setType('idnumber', PARAM_RAW); // idnumbers are plain text, must not be changed
|
||||
|
||||
$mform->addElement('editor', 'description_editor', get_string('description', 'cohort'), null, $editoroptions);
|
||||
$mform->setType('description_editor', PARAM_RAW);
|
||||
|
||||
@@ -141,16 +141,6 @@ if ($form->is_cancelled()){
|
||||
$aggregation->setMethod($data->role_aggregation);
|
||||
$aggregation->save();
|
||||
|
||||
// Update course total passing grade
|
||||
if (!empty($data->criteria_grade)) {
|
||||
if ($grade_item = grade_category::fetch_course_category($course->id)->grade_item) {
|
||||
$grade_item->gradepass = $data->criteria_grade_value;
|
||||
if (method_exists($grade_item, 'update')) {
|
||||
$grade_item->update('course/completion.php');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
add_to_log($course->id, 'course', 'completion updated', 'completion.php?id='.$course->id);
|
||||
|
||||
$url = new moodle_url('/course/view.php', array('id' => $course->id));
|
||||
|
||||
@@ -179,10 +179,13 @@ class course_completion_form extends moodleform {
|
||||
$criteria->config_form_display($mform);
|
||||
|
||||
// Completion on course grade
|
||||
$mform->addElement('header', 'grade', get_string('grade'));
|
||||
$mform->addElement('header', 'grade', get_string('coursegrade', 'completion'));
|
||||
|
||||
// Grade enable and passing grade
|
||||
$course_grade = $DB->get_field('grade_items', 'gradepass', array('courseid' => $course->id, 'itemtype' => 'course'));
|
||||
if (!$course_grade) {
|
||||
$course_grade = '0.00000';
|
||||
}
|
||||
$criteria = new completion_criteria_grade($params);
|
||||
$criteria->config_form_display($mform, $course_grade);
|
||||
|
||||
|
||||
+18
-5
@@ -904,9 +904,10 @@ class core_course_external extends external_api {
|
||||
'"parent" (int) the parent category id,'.
|
||||
'"idnumber" (string) category idnumber'.
|
||||
' - user must have \'moodle/category:manage\' to search on idnumber,'.
|
||||
'"visible" (int) whether the category is visible or not'.
|
||||
'"visible" (int) whether the returned categories must be visible or hidden. If the key is not passed,
|
||||
then the function return all categories that the user can see.'.
|
||||
' - user must have \'moodle/category:manage\' or \'moodle/category:viewhiddencategories\' to search on visible,'.
|
||||
'"theme" (string) category theme'.
|
||||
'"theme" (string) only return the categories having this theme'.
|
||||
' - user must have \'moodle/category:manage\' to search on theme'),
|
||||
'value' => new external_value(PARAM_RAW, 'the value to match')
|
||||
)
|
||||
@@ -1017,10 +1018,22 @@ class core_course_external extends external_api {
|
||||
if ($categories and !empty($params['addsubcategories'])) {
|
||||
$newcategories = array();
|
||||
|
||||
// Check if we required visible/theme checks.
|
||||
$additionalselect = '';
|
||||
$additionalparams = array();
|
||||
if (isset($conditions['visible'])) {
|
||||
$additionalselect .= ' AND visible = :visible';
|
||||
$additionalparams['visible'] = $conditions['visible'];
|
||||
}
|
||||
if (isset($conditions['theme'])) {
|
||||
$additionalselect .= ' AND theme= :theme';
|
||||
$additionalparams['theme'] = $conditions['theme'];
|
||||
}
|
||||
|
||||
foreach ($categories as $category) {
|
||||
$sqllike = $DB->sql_like('path', ':path');
|
||||
$sqlparams = array('path' => $category->path.'/%'); // It will NOT include the specified category.
|
||||
$subcategories = $DB->get_records_select('course_categories', $sqllike, $sqlparams);
|
||||
$sqlselect = $DB->sql_like('path', ':path') . $additionalselect;
|
||||
$sqlparams = array('path' => $category->path.'/%') + $additionalparams; // It will NOT include the specified category.
|
||||
$subcategories = $DB->get_records_select('course_categories', $sqlselect, $sqlparams);
|
||||
$newcategories = $newcategories + $subcategories; // Both arrays have integer as keys.
|
||||
}
|
||||
$categories = $categories + $newcategories;
|
||||
|
||||
+5
-5
@@ -1470,9 +1470,8 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
|
||||
// 2. the activity has dates set which do not include current, or
|
||||
// 3. the activity has any other conditions set (regardless of whether
|
||||
// current user meets them)
|
||||
$canviewhidden = has_capability(
|
||||
'moodle/course:viewhiddenactivities',
|
||||
get_context_instance(CONTEXT_MODULE, $mod->id));
|
||||
$modcontext = context_module::instance($mod->id);
|
||||
$canviewhidden = has_capability('moodle/course:viewhiddenactivities', $modcontext);
|
||||
$accessiblebutdim = false;
|
||||
if ($canviewhidden) {
|
||||
$accessiblebutdim = !$mod->visible;
|
||||
@@ -1684,9 +1683,10 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
|
||||
}
|
||||
if ($completionicon) {
|
||||
$imgsrc = $OUTPUT->pix_url('i/completion-'.$completionicon);
|
||||
$imgalt = s(get_string('completion-alt-'.$completionicon, 'completion', $mod->name));
|
||||
$formattedname = format_string($mod->name, true, array('context' => $modcontext));
|
||||
$imgalt = get_string('completion-alt-' . $completionicon, 'completion', $formattedname);
|
||||
if ($completion == COMPLETION_TRACKING_MANUAL && !$isediting) {
|
||||
$imgtitle = s(get_string('completion-title-'.$completionicon, 'completion', $mod->name));
|
||||
$imgtitle = get_string('completion-title-' . $completionicon, 'completion', $formattedname);
|
||||
$newstate =
|
||||
$completiondata->completionstate==COMPLETION_COMPLETE
|
||||
? COMPLETION_INCOMPLETE
|
||||
|
||||
@@ -0,0 +1,570 @@
|
||||
<?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/>.
|
||||
|
||||
/**
|
||||
* External course functions unit tests
|
||||
*
|
||||
* @package core_course
|
||||
* @category external
|
||||
* @copyright 2012 Jerome Mouneyrac
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
global $CFG;
|
||||
|
||||
require_once($CFG->dirroot . '/webservice/tests/helpers.php');
|
||||
|
||||
/**
|
||||
* External course functions unit tests
|
||||
*
|
||||
* @package core_course
|
||||
* @category external
|
||||
* @copyright 2012 Jerome Mouneyrac
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class core_course_external_testcase extends externallib_advanced_testcase {
|
||||
|
||||
/**
|
||||
* Tests set up
|
||||
*/
|
||||
protected function setUp() {
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/course/externallib.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test create_categories
|
||||
*/
|
||||
public function test_create_categories() {
|
||||
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
// Set the required capabilities by the external function
|
||||
$contextid = context_system::instance()->id;
|
||||
$roleid = $this->assignUserCapability('moodle/category:manage', $contextid);
|
||||
|
||||
// Create base categories.
|
||||
$category1 = new stdClass();
|
||||
$category1->name = 'Root Test Category 1';
|
||||
$category2 = new stdClass();
|
||||
$category2->name = 'Root Test Category 2';
|
||||
$category2->idnumber = 'rootcattest2';
|
||||
$category2->desc = 'Description for root test category 1';
|
||||
$category2->theme = 'base';
|
||||
$categories = array(
|
||||
array('name' => $category1->name, 'parent' => 0),
|
||||
array('name' => $category2->name, 'parent' => 0, 'idnumber' => $category2->idnumber,
|
||||
'description' => $category2->desc, 'theme' => $category2->theme)
|
||||
);
|
||||
|
||||
$createdcats = core_course_external::create_categories($categories);
|
||||
|
||||
// Initially confirm that base data was inserted correctly.
|
||||
$this->assertEquals($category1->name, $createdcats[0]['name']);
|
||||
$this->assertEquals($category2->name, $createdcats[1]['name']);
|
||||
|
||||
// Save the ids.
|
||||
$category1->id = $createdcats[0]['id'];
|
||||
$category2->id = $createdcats[1]['id'];
|
||||
|
||||
// Create on sub category.
|
||||
$category3 = new stdClass();
|
||||
$category3->name = 'Sub Root Test Category 3';
|
||||
$subcategories = array(
|
||||
array('name' => $category3->name, 'parent' => $category1->id)
|
||||
);
|
||||
|
||||
$createdsubcats = core_course_external::create_categories($subcategories);
|
||||
|
||||
// Confirm that sub categories were inserted correctly.
|
||||
$this->assertEquals($category3->name, $createdsubcats[0]['name']);
|
||||
|
||||
// Save the ids.
|
||||
$category3->id = $createdsubcats[0]['id'];
|
||||
|
||||
// Calling the ws function should provide a new sortorder to give category1,
|
||||
// category2, category3. New course categories are ordered by id not name.
|
||||
$category1 = $DB->get_record('course_categories', array('id' => $category1->id));
|
||||
$category2 = $DB->get_record('course_categories', array('id' => $category2->id));
|
||||
$category3 = $DB->get_record('course_categories', array('id' => $category3->id));
|
||||
|
||||
$this->assertGreaterThanOrEqual($category1->sortorder, $category3->sortorder);
|
||||
$this->assertGreaterThanOrEqual($category2->sortorder, $category3->sortorder);
|
||||
|
||||
// Call without required capability
|
||||
$this->unassignUserCapability('moodle/category:manage', $contextid, $roleid);
|
||||
$this->setExpectedException('required_capability_exception');
|
||||
$createdsubcats = core_course_external::create_categories($subcategories);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test delete categories
|
||||
*/
|
||||
public function test_delete_categories() {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
// Set the required capabilities by the external function
|
||||
$contextid = context_system::instance()->id;
|
||||
$roleid = $this->assignUserCapability('moodle/category:manage', $contextid);
|
||||
|
||||
$category1 = self::getDataGenerator()->create_category();
|
||||
$category2 = self::getDataGenerator()->create_category(
|
||||
array('parent' => $category1->id));
|
||||
$category3 = self::getDataGenerator()->create_category();
|
||||
$category4 = self::getDataGenerator()->create_category(
|
||||
array('parent' => $category3->id));
|
||||
$category5 = self::getDataGenerator()->create_category(
|
||||
array('parent' => $category4->id));
|
||||
|
||||
//delete category 1 and 2 + delete category 4, category 5 moved under category 3
|
||||
core_course_external::delete_categories(array(
|
||||
array('id' => $category1->id, 'recursive' => 1),
|
||||
array('id' => $category4->id)
|
||||
));
|
||||
|
||||
//check $category 1 and 2 are deleted
|
||||
$notdeletedcount = $DB->count_records_select('course_categories',
|
||||
'id IN ( ' . $category1->id . ',' . $category2->id . ',' . $category4->id . ')');
|
||||
$this->assertEquals(0, $notdeletedcount);
|
||||
|
||||
//check that $category5 as $category3 for parent
|
||||
$dbcategory5 = $DB->get_record('course_categories', array('id' => $category5->id));
|
||||
$this->assertEquals($dbcategory5->path, $category3->path . '/' . $category5->id);
|
||||
|
||||
// Call without required capability
|
||||
$this->unassignUserCapability('moodle/category:manage', $contextid, $roleid);
|
||||
$this->setExpectedException('required_capability_exception');
|
||||
$createdsubcats = core_course_external::delete_categories(
|
||||
array(array('id' => $category3->id)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get categories
|
||||
*/
|
||||
public function test_get_categories() {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
$category1data['idnumber'] = 'idnumbercat1';
|
||||
$category1data['name'] = 'Category 1 for PHPunit test';
|
||||
$category1data['description'] = 'Category 1 description';
|
||||
$category1data['descriptionformat'] = FORMAT_MOODLE;
|
||||
$category1 = self::getDataGenerator()->create_category($category1data);
|
||||
$category2 = self::getDataGenerator()->create_category(
|
||||
array('parent' => $category1->id));
|
||||
$category6 = self::getDataGenerator()->create_category(
|
||||
array('parent' => $category1->id, 'visible' => 0));
|
||||
$category3 = self::getDataGenerator()->create_category();
|
||||
$category4 = self::getDataGenerator()->create_category(
|
||||
array('parent' => $category3->id));
|
||||
$category5 = self::getDataGenerator()->create_category(
|
||||
array('parent' => $category4->id));
|
||||
|
||||
// Set the required capabilities by the external function.
|
||||
$context = context_system::instance();
|
||||
$roleid = $this->assignUserCapability('moodle/category:manage', $context->id);
|
||||
|
||||
// Retrieve category1 + sub-categories except not visible ones
|
||||
$categories = core_course_external::get_categories(array(
|
||||
array('key' => 'id', 'value' => $category1->id),
|
||||
array('key' => 'visible', 'value' => 1)), 1);
|
||||
|
||||
// Check we retrieve the good total number of categories.
|
||||
$this->assertEquals(2, count($categories));
|
||||
|
||||
// Check the return values
|
||||
$this->assertEquals($categories[0]['id'], $category1->id);
|
||||
$this->assertEquals($categories[0]['idnumber'], $category1->idnumber);
|
||||
$this->assertEquals($categories[0]['name'], $category1->name);
|
||||
$this->assertEquals($categories[0]['description'], $category1->description);
|
||||
$this->assertEquals($categories[0]['descriptionformat'], FORMAT_HTML);
|
||||
|
||||
// Check different params.
|
||||
$categories = core_course_external::get_categories(array(
|
||||
array('key' => 'id', 'value' => $category1->id),
|
||||
array('key' => 'idnumber', 'value' => $category1->idnumber),
|
||||
array('key' => 'visible', 'value' => 1)), 0);
|
||||
$this->assertEquals(1, count($categories));
|
||||
|
||||
// Retrieve categories from parent.
|
||||
$categories = core_course_external::get_categories(array(
|
||||
array('key' => 'parent', 'value' => $category3->id)), 1);
|
||||
$this->assertEquals(2, count($categories));
|
||||
|
||||
// Retrieve all categories.
|
||||
$categories = core_course_external::get_categories();
|
||||
$this->assertEquals($DB->count_records('course_categories'), count($categories));
|
||||
|
||||
// Call without required capability (it will fail cause of the search on idnumber).
|
||||
$this->unassignUserCapability('moodle/category:manage', $context->id, $roleid);
|
||||
$this->setExpectedException('moodle_exception');
|
||||
$categories = core_course_external::get_categories(array(
|
||||
array('key' => 'id', 'value' => $category1->id),
|
||||
array('key' => 'idnumber', 'value' => $category1->idnumber),
|
||||
array('key' => 'visible', 'value' => 1)), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test update_categories
|
||||
*/
|
||||
public function test_update_categories() {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
// Set the required capabilities by the external function
|
||||
$contextid = context_system::instance()->id;
|
||||
$roleid = $this->assignUserCapability('moodle/category:manage', $contextid);
|
||||
|
||||
// Create base categories.
|
||||
$category1data['idnumber'] = 'idnumbercat1';
|
||||
$category1data['name'] = 'Category 1 for PHPunit test';
|
||||
$category1data['description'] = 'Category 1 description';
|
||||
$category1data['descriptionformat'] = FORMAT_MOODLE;
|
||||
$category1 = self::getDataGenerator()->create_category($category1data);
|
||||
$category2 = self::getDataGenerator()->create_category(
|
||||
array('parent' => $category1->id));
|
||||
$category3 = self::getDataGenerator()->create_category();
|
||||
$category4 = self::getDataGenerator()->create_category(
|
||||
array('parent' => $category3->id));
|
||||
$category5 = self::getDataGenerator()->create_category(
|
||||
array('parent' => $category4->id));
|
||||
|
||||
// We update all category1 attribut.
|
||||
// Then we move cat4 and cat5 parent: cat3 => cat1
|
||||
$categories = array(
|
||||
array('id' => $category1->id,
|
||||
'name' => $category1->name . '_updated',
|
||||
'idnumber' => $category1->idnumber . '_updated',
|
||||
'description' => $category1->description . '_updated',
|
||||
'descriptionformat' => FORMAT_HTML,
|
||||
'theme' => $category1->theme),
|
||||
array('id' => $category4->id, 'parent' => $category1->id));
|
||||
|
||||
core_course_external::update_categories($categories);
|
||||
|
||||
// Check the values were updated.
|
||||
$dbcategories = $DB->get_records_select('course_categories',
|
||||
'id IN (' . $category1->id . ',' . $category2->id . ',' . $category2->id
|
||||
. ',' . $category3->id . ',' . $category4->id . ',' . $category5->id .')');
|
||||
$this->assertEquals($category1->name . '_updated',
|
||||
$dbcategories[$category1->id]->name);
|
||||
$this->assertEquals($category1->idnumber . '_updated',
|
||||
$dbcategories[$category1->id]->idnumber);
|
||||
$this->assertEquals($category1->description . '_updated',
|
||||
$dbcategories[$category1->id]->description);
|
||||
$this->assertEquals(FORMAT_HTML, $dbcategories[$category1->id]->descriptionformat);
|
||||
|
||||
// Check that category4 and category5 have been properly moved.
|
||||
$this->assertEquals('/' . $category1->id . '/' . $category4->id,
|
||||
$dbcategories[$category4->id]->path);
|
||||
$this->assertEquals('/' . $category1->id . '/' . $category4->id . '/' . $category5->id,
|
||||
$dbcategories[$category5->id]->path);
|
||||
|
||||
// Call without required capability.
|
||||
$this->unassignUserCapability('moodle/category:manage', $contextid, $roleid);
|
||||
$this->setExpectedException('required_capability_exception');
|
||||
core_course_external::update_categories($categories);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test create_courses
|
||||
*/
|
||||
public function test_create_courses() {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
// Set the required capabilities by the external function
|
||||
$contextid = context_system::instance()->id;
|
||||
$roleid = $this->assignUserCapability('moodle/course:create', $contextid);
|
||||
$this->assignUserCapability('moodle/course:visibility', $contextid, $roleid);
|
||||
|
||||
$category = self::getDataGenerator()->create_category();
|
||||
|
||||
// Create base categories.
|
||||
$course1['fullname'] = 'Test course 1';
|
||||
$course1['shortname'] = 'Testcourse1';
|
||||
$course1['categoryid'] = $category->id;
|
||||
$course2['fullname'] = 'Test course 2';
|
||||
$course2['shortname'] = 'Testcourse2';
|
||||
$course2['categoryid'] = $category->id;
|
||||
$course2['idnumber'] = 'testcourse2idnumber';
|
||||
$course2['summary'] = 'Description for course 2';
|
||||
$course2['summaryformat'] = FORMAT_MOODLE;
|
||||
$course2['format'] = 'weeks';
|
||||
$course2['showgrades'] = 1;
|
||||
$course2['newsitems'] = 3;
|
||||
$course2['startdate'] = 32882306400; // 01/01/3012
|
||||
$course2['numsections'] = 4;
|
||||
$course2['maxbytes'] = 100000;
|
||||
$course2['showreports'] = 1;
|
||||
$course2['visible'] = 0;
|
||||
$course2['hiddensections'] = 0;
|
||||
$course2['groupmode'] = 0;
|
||||
$course2['groupmodeforce'] = 0;
|
||||
$course2['defaultgroupingid'] = 0;
|
||||
$course2['enablecompletion'] = 1;
|
||||
$course2['completionstartonenrol'] = 1;
|
||||
$course2['completionnotify'] = 1;
|
||||
$course2['lang'] = 'en';
|
||||
$course2['forcetheme'] = 'base';
|
||||
$courses = array($course1, $course2);
|
||||
|
||||
$createdcourses = core_course_external::create_courses($courses);
|
||||
|
||||
// Check that right number of courses were created.
|
||||
$this->assertEquals(2, count($createdcourses));
|
||||
|
||||
// Check that the courses were correctly created.
|
||||
foreach ($createdcourses as $createdcourse) {
|
||||
$dbcourse = $DB->get_record('course', array('id' => $createdcourse['id']));
|
||||
|
||||
if ($createdcourse['shortname'] == $course2['shortname']) {
|
||||
$this->assertEquals($dbcourse->fullname, $course2['fullname']);
|
||||
$this->assertEquals($dbcourse->shortname, $course2['shortname']);
|
||||
$this->assertEquals($dbcourse->category, $course2['categoryid']);
|
||||
$this->assertEquals($dbcourse->idnumber, $course2['idnumber']);
|
||||
$this->assertEquals($dbcourse->summary, $course2['summary']);
|
||||
$this->assertEquals($dbcourse->summaryformat, $course2['summaryformat']);
|
||||
$this->assertEquals($dbcourse->format, $course2['format']);
|
||||
$this->assertEquals($dbcourse->showgrades, $course2['showgrades']);
|
||||
$this->assertEquals($dbcourse->newsitems, $course2['newsitems']);
|
||||
$this->assertEquals($dbcourse->startdate, $course2['startdate']);
|
||||
$this->assertEquals($dbcourse->numsections, $course2['numsections']);
|
||||
$this->assertEquals($dbcourse->maxbytes, $course2['maxbytes']);
|
||||
$this->assertEquals($dbcourse->showreports, $course2['showreports']);
|
||||
$this->assertEquals($dbcourse->visible, $course2['visible']);
|
||||
$this->assertEquals($dbcourse->hiddensections, $course2['hiddensections']);
|
||||
$this->assertEquals($dbcourse->groupmode, $course2['groupmode']);
|
||||
$this->assertEquals($dbcourse->groupmodeforce, $course2['groupmodeforce']);
|
||||
$this->assertEquals($dbcourse->defaultgroupingid, $course2['defaultgroupingid']);
|
||||
$this->assertEquals($dbcourse->completionnotify, $course2['completionnotify']);
|
||||
$this->assertEquals($dbcourse->lang, $course2['lang']);
|
||||
|
||||
if (!empty($CFG->allowcoursethemes)) {
|
||||
$this->assertEquals($dbcourse->theme, $course2['forcetheme']);
|
||||
}
|
||||
|
||||
if (completion_info::is_enabled_for_site()) {
|
||||
$this->assertEquals($dbcourse->enablecompletion, $course2['enabledcompletion']);
|
||||
$this->assertEquals($dbcourse->completionstartonenrol, $course2['completionstartonenrol']);
|
||||
} else {
|
||||
$this->assertEquals($dbcourse->enablecompletion, 0);
|
||||
$this->assertEquals($dbcourse->completionstartonenrol, 0);
|
||||
}
|
||||
|
||||
} else if ($createdcourse['shortname'] == $course1['shortname']) {
|
||||
$courseconfig = get_config('moodlecourse');
|
||||
$this->assertEquals($dbcourse->fullname, $course1['fullname']);
|
||||
$this->assertEquals($dbcourse->shortname, $course1['shortname']);
|
||||
$this->assertEquals($dbcourse->category, $course1['categoryid']);
|
||||
$this->assertEquals($dbcourse->summaryformat, FORMAT_HTML);
|
||||
$this->assertEquals($dbcourse->format, $courseconfig->format);
|
||||
$this->assertEquals($dbcourse->showgrades, $courseconfig->showgrades);
|
||||
$this->assertEquals($dbcourse->newsitems, $courseconfig->newsitems);
|
||||
$this->assertEquals($dbcourse->numsections, $courseconfig->numsections);
|
||||
$this->assertEquals($dbcourse->maxbytes, $courseconfig->maxbytes);
|
||||
$this->assertEquals($dbcourse->showreports, $courseconfig->showreports);
|
||||
$this->assertEquals($dbcourse->hiddensections, $courseconfig->hiddensections);
|
||||
$this->assertEquals($dbcourse->groupmode, $courseconfig->groupmode);
|
||||
$this->assertEquals($dbcourse->groupmodeforce, $courseconfig->groupmodeforce);
|
||||
$this->assertEquals($dbcourse->defaultgroupingid, 0);
|
||||
} else {
|
||||
throw moodle_exception('Unexpected shortname');
|
||||
}
|
||||
}
|
||||
|
||||
// Call without required capability
|
||||
$this->unassignUserCapability('moodle/course:create', $contextid, $roleid);
|
||||
$this->setExpectedException('required_capability_exception');
|
||||
$createdsubcats = core_course_external::create_courses($courses);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test delete_courses
|
||||
*/
|
||||
public function test_delete_courses() {
|
||||
global $DB, $USER;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
// Admin can delete a course.
|
||||
$this->setAdminUser();
|
||||
// Validate_context() will fail as the email is not set by $this->setAdminUser().
|
||||
$USER->email = 'emailtopass@contextvalidation.me';
|
||||
|
||||
$course1 = self::getDataGenerator()->create_course();
|
||||
$course2 = self::getDataGenerator()->create_course();
|
||||
$course3 = self::getDataGenerator()->create_course();
|
||||
|
||||
// Delete courses.
|
||||
core_course_external::delete_courses(array($course1->id, $course2->id));
|
||||
|
||||
// Check $course 1 and 2 are deleted.
|
||||
$notdeletedcount = $DB->count_records_select('course',
|
||||
'id IN ( ' . $course1->id . ',' . $course2->id . ')');
|
||||
$this->assertEquals(0, $notdeletedcount);
|
||||
|
||||
// Fail when the user is not allow to access the course (enrolled) or is not admin.
|
||||
$this->setGuestUser();
|
||||
$this->setExpectedException('require_login_exception');
|
||||
$createdsubcats = core_course_external::delete_courses(array($course3->id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get_courses
|
||||
*/
|
||||
public function test_get_courses () {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
$coursedata['idnumber'] = 'idnumbercourse1';
|
||||
$coursedata['fullname'] = 'Course 1 for PHPunit test';
|
||||
$coursedata['summary'] = 'Course 1 description';
|
||||
$coursedata['summaryformat'] = FORMAT_MOODLE;
|
||||
$course1 = self::getDataGenerator()->create_course($coursedata);
|
||||
$course2 = self::getDataGenerator()->create_course();
|
||||
$course3 = self::getDataGenerator()->create_course();
|
||||
|
||||
// Set the required capabilities by the external function.
|
||||
$context = context_system::instance();
|
||||
$roleid = $this->assignUserCapability('moodle/course:view', $context->id);
|
||||
$this->assignUserCapability('moodle/course:update',
|
||||
context_course::instance($course1->id)->id, $roleid);
|
||||
$this->assignUserCapability('moodle/course:update',
|
||||
context_course::instance($course2->id)->id, $roleid);
|
||||
$this->assignUserCapability('moodle/course:update',
|
||||
context_course::instance($course3->id)->id, $roleid);
|
||||
|
||||
$courses = core_course_external::get_courses(array('ids' =>
|
||||
array($course1->id, $course2->id)));
|
||||
|
||||
// Check we retrieve the good total number of categories.
|
||||
$this->assertEquals(2, count($courses));
|
||||
|
||||
// Check the return values for course 1
|
||||
$dbcourse = $DB->get_record('course', array('id' => $course1->id));
|
||||
$this->assertEquals($courses[0]['id'], $dbcourse->id);
|
||||
$this->assertEquals($courses[0]['idnumber'], $coursedata['idnumber']);
|
||||
$this->assertEquals($courses[0]['fullname'], $coursedata['fullname']);
|
||||
$this->assertEquals($courses[0]['summary'], $coursedata['summary']);
|
||||
$this->assertEquals($courses[0]['summaryformat'], FORMAT_HTML);
|
||||
$this->assertEquals($courses[0]['shortname'], $dbcourse->shortname);
|
||||
$this->assertEquals($courses[0]['categoryid'], $dbcourse->category);
|
||||
$this->assertEquals($courses[0]['format'], $dbcourse->format);
|
||||
$this->assertEquals($courses[0]['showgrades'], $dbcourse->showgrades);
|
||||
$this->assertEquals($courses[0]['newsitems'], $dbcourse->newsitems);
|
||||
$this->assertEquals($courses[0]['startdate'], $dbcourse->startdate);
|
||||
$this->assertEquals($courses[0]['numsections'], $dbcourse->numsections);
|
||||
$this->assertEquals($courses[0]['maxbytes'], $dbcourse->maxbytes);
|
||||
$this->assertEquals($courses[0]['showreports'], $dbcourse->showreports);
|
||||
$this->assertEquals($courses[0]['visible'], $dbcourse->visible);
|
||||
$this->assertEquals($courses[0]['hiddensections'], $dbcourse->hiddensections);
|
||||
$this->assertEquals($courses[0]['groupmode'], $dbcourse->groupmode);
|
||||
$this->assertEquals($courses[0]['groupmodeforce'], $dbcourse->groupmodeforce);
|
||||
$this->assertEquals($courses[0]['defaultgroupingid'], $dbcourse->defaultgroupingid);
|
||||
$this->assertEquals($courses[0]['completionnotify'], $dbcourse->completionnotify);
|
||||
$this->assertEquals($courses[0]['lang'], $dbcourse->lang);
|
||||
$this->assertEquals($courses[0]['forcetheme'], $dbcourse->theme);
|
||||
$this->assertEquals($courses[0]['completionstartonenrol'], $dbcourse->completionstartonenrol);
|
||||
$this->assertEquals($courses[0]['enablecompletion'], $dbcourse->enablecompletion);
|
||||
$this->assertEquals($courses[0]['completionstartonenrol'], $dbcourse->completionstartonenrol);
|
||||
|
||||
// Get all courses in the DB
|
||||
$courses = core_course_external::get_courses(array());
|
||||
$this->assertEquals($DB->count_records('course'), count($courses));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get_course_contents
|
||||
*/
|
||||
public function test_get_course_contents() {
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
$course = self::getDataGenerator()->create_course();
|
||||
$forum = $this->getDataGenerator()->create_module('forum', array('course'=>$course->id));
|
||||
$forumcm = get_coursemodule_from_id('forum', $forum->cmid);
|
||||
$forumcontext = context_module::instance($forum->cmid);
|
||||
$data = $this->getDataGenerator()->create_module('data', array('assessed'=>1, 'scale'=>100, 'course'=>$course->id));
|
||||
$datacontext = context_module::instance($data->cmid);
|
||||
$datacm = get_coursemodule_from_instance('page', $data->id);
|
||||
$page = $this->getDataGenerator()->create_module('page', array('course'=>$course->id));
|
||||
$pagecontext = context_module::instance($page->cmid);
|
||||
$pagecm = get_coursemodule_from_instance('page', $page->id);
|
||||
|
||||
// Set the required capabilities by the external function.
|
||||
$context = context_course::instance($course->id);
|
||||
$roleid = $this->assignUserCapability('moodle/course:view', $context->id);
|
||||
$this->assignUserCapability('moodle/course:update', $context->id, $roleid);
|
||||
|
||||
$courses = core_course_external::get_course_contents($course->id, array());
|
||||
|
||||
// Check that the course has the 3 created modules
|
||||
$this->assertEquals(3, count($courses[0]['modules']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test duplicate_course
|
||||
*/
|
||||
public function test_duplicate_course() {
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
// Create one course with three modules.
|
||||
$course = self::getDataGenerator()->create_course();
|
||||
$forum = $this->getDataGenerator()->create_module('forum', array('course'=>$course->id));
|
||||
$forumcm = get_coursemodule_from_id('forum', $forum->cmid);
|
||||
$forumcontext = context_module::instance($forum->cmid);
|
||||
$data = $this->getDataGenerator()->create_module('data', array('assessed'=>1, 'scale'=>100, 'course'=>$course->id));
|
||||
$datacontext = context_module::instance($data->cmid);
|
||||
$datacm = get_coursemodule_from_instance('page', $data->id);
|
||||
$page = $this->getDataGenerator()->create_module('page', array('course'=>$course->id));
|
||||
$pagecontext = context_module::instance($page->cmid);
|
||||
$pagecm = get_coursemodule_from_instance('page', $page->id);
|
||||
|
||||
// Set the required capabilities by the external function.
|
||||
$coursecontext = context_course::instance($course->id);
|
||||
$categorycontext = context_coursecat::instance($course->category);
|
||||
$roleid = $this->assignUserCapability('moodle/course:create', $categorycontext->id);
|
||||
$this->assignUserCapability('moodle/course:view', $categorycontext->id, $roleid);
|
||||
$this->assignUserCapability('moodle/restore:restorecourse', $categorycontext->id, $roleid);
|
||||
$this->assignUserCapability('moodle/backup:backupcourse', $coursecontext->id, $roleid);
|
||||
$this->assignUserCapability('moodle/backup:configure', $coursecontext->id, $roleid);
|
||||
// Optional capabilities to copy user data.
|
||||
$this->assignUserCapability('moodle/backup:userinfo', $coursecontext->id, $roleid);
|
||||
$this->assignUserCapability('moodle/restore:userinfo', $categorycontext->id, $roleid);
|
||||
|
||||
$newcourse['fullname'] = 'Course duplicate';
|
||||
$newcourse['shortname'] = 'courseduplicate';
|
||||
$newcourse['categoryid'] = $course->category;
|
||||
$newcourse['visible'] = true;
|
||||
$newcourse['options'][] = array('name' => 'users', 'value' => true);
|
||||
|
||||
$duplicate = core_course_external::duplicate_course($course->id, $newcourse['fullname'],
|
||||
$newcourse['shortname'], $newcourse['categoryid'], $newcourse['visible'], $newcourse['options']);
|
||||
|
||||
// Check that the course has been duplicated.
|
||||
$this->assertEquals($newcourse['shortname'], $duplicate['shortname']);
|
||||
}
|
||||
}
|
||||
+12
-2
@@ -99,8 +99,18 @@
|
||||
$infoid = $course->id;
|
||||
if(!empty($section)) {
|
||||
$loglabel = 'view section';
|
||||
$sectionparams = array('course' => $course->id, 'section' => $section);
|
||||
$coursesections = $DB->get_record('course_sections', $sectionparams, 'id', MUST_EXIST);
|
||||
|
||||
// Get section details and check it exists.
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
$coursesections = $modinfo->get_section_info($section, MUST_EXIST);
|
||||
|
||||
// Check user is allowed to see it.
|
||||
if (!$coursesections->uservisible) {
|
||||
// Note: We actually already know they don't have this capability
|
||||
// or uservisible would have been true; this is just to get the
|
||||
// correct error message shown.
|
||||
require_capability('moodle/course:viewhiddensections', $context);
|
||||
}
|
||||
$infoid = $coursesections->id;
|
||||
$logparam .= '§ionid='. $infoid;
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -91,7 +91,7 @@ YUI.add('moodle-course-dragdrop', function(Y) {
|
||||
// Keep it inside the .course-content
|
||||
constrain: '#'+CSS.PAGECONTENT,
|
||||
stickY: true
|
||||
});
|
||||
}).plug(Y.Plugin.DDWinScroll);
|
||||
}
|
||||
}
|
||||
}, this);
|
||||
@@ -306,7 +306,7 @@ YUI.add('moodle-course-dragdrop', function(Y) {
|
||||
}).plug(Y.Plugin.DDConstrained, {
|
||||
// Keep it inside the .course-content
|
||||
constrain: '#'+CSS.PAGECONTENT
|
||||
});
|
||||
}).plug(Y.Plugin.DDWinScroll);
|
||||
}
|
||||
}, this);
|
||||
},
|
||||
@@ -411,4 +411,4 @@ YUI.add('moodle-course-dragdrop', function(Y) {
|
||||
M.course.init_section_dragdrop = function(params) {
|
||||
new DRAGSECTION(params);
|
||||
}
|
||||
}, '@VERSION@', {requires:['base', 'node', 'io', 'dom', 'dd', 'moodle-core-dragdrop', 'moodle-enrol-notification', 'moodle-course-coursebase']});
|
||||
}, '@VERSION@', {requires:['base', 'node', 'io', 'dom', 'dd', 'dd-scroll', 'moodle-core-dragdrop', 'moodle-enrol-notification', 'moodle-course-coursebase']});
|
||||
|
||||
@@ -26,5 +26,9 @@ function xmldb_enrol_authorize_upgrade($oldversion) {
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -30,5 +30,9 @@ function xmldb_enrol_database_upgrade($oldversion) {
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -445,8 +445,9 @@ class enrol_database_plugin extends enrol_plugin {
|
||||
$sql = $this->db_get_sql($table, array($coursefield=>$course->mapping), $sqlfields);
|
||||
if ($rs = $extdb->Execute($sql)) {
|
||||
if (!$rs->EOF) {
|
||||
$usersearch = array('deleted' => 0);
|
||||
if ($localuserfield === 'username') {
|
||||
$usersearch = array('mnethostid'=>$CFG->mnet_localhost_id, 'deleted' =>0);
|
||||
$usersearch['mnethostid'] = $CFG->mnet_localhost_id;
|
||||
}
|
||||
while ($fields = $rs->FetchRow()) {
|
||||
$fields = array_change_key_case($fields, CASE_LOWER);
|
||||
|
||||
@@ -32,5 +32,9 @@ function xmldb_enrol_flatfile_upgrade($oldversion) {
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,10 @@ function xmldb_enrol_guest_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2011112901, 'enrol', 'guest');
|
||||
}
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,10 @@ function xmldb_enrol_imsenterprise_upgrade($oldversion) {
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,5 +32,9 @@ function xmldb_enrol_mnet_upgrade($oldversion) {
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -47,5 +47,9 @@ function xmldb_enrol_paypal_upgrade($oldversion) {
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-1
@@ -291,7 +291,7 @@ class enrol_self_plugin extends enrol_plugin {
|
||||
if ($rusers) {
|
||||
$contact = reset($rusers);
|
||||
} else {
|
||||
$contact = get_admin();
|
||||
$contact = generate_email_supportuser();
|
||||
}
|
||||
|
||||
//directly emailing welcome message rather than using messaging
|
||||
|
||||
+13
-15
@@ -219,7 +219,7 @@ class core_files_renderer extends plugin_renderer_base {
|
||||
<div class="filemanager-container" >
|
||||
<div class="fm-content-wrapper">
|
||||
<div class="fp-content"></div>
|
||||
<div class="fm-empty-container <!--mdl-align-->">
|
||||
<div class="fm-empty-container">
|
||||
<span class="dndupload-message">'.$strdndenabledinbox.'<br/><span class="dndupload-arrow"></span></span>
|
||||
</div>
|
||||
<div class="dndupload-target">'.$strdroptoupload.'<br/><span class="dndupload-arrow"></span></div>
|
||||
@@ -279,6 +279,8 @@ class core_files_renderer extends plugin_renderer_base {
|
||||
<span class="fp-filename-icon">
|
||||
<a href="#">
|
||||
<span class="{!}fp-icon"></span>
|
||||
<span class="fp-reficons1"></span>
|
||||
<span class="fp-reficons2"></span>
|
||||
<span class="{!}fp-filename"></span>
|
||||
</a>
|
||||
<a class="{!}fp-contextmenu" href="#" onclick="return false;">'.$this->pix_icon('i/menu', '▶').'</a>
|
||||
@@ -366,8 +368,7 @@ class core_files_renderer extends plugin_renderer_base {
|
||||
$rv = '
|
||||
<div class="filemanager fp-select">
|
||||
<div class="fp-select-loading">
|
||||
<img src="'.$this->pix_url('i/loading').'" />
|
||||
<p>'.get_string('loading', 'repository').'</p>
|
||||
<img src="'.$this->pix_url('i/loading_small').'" />
|
||||
</div>
|
||||
<form>
|
||||
<button class="{!}fp-file-download">'.get_string('download').'</button>
|
||||
@@ -424,7 +425,7 @@ class core_files_renderer extends plugin_renderer_base {
|
||||
$rv = '
|
||||
<div class="filemanager fp-dlg">
|
||||
<div class="{!}fp-dlg-text"></div>
|
||||
<button class="{!}fp-dlg-butconfirm">'.get_string('delete').'</button>
|
||||
<button class="{!}fp-dlg-butconfirm">'.get_string('ok').'</button>
|
||||
<button class="{!}fp-dlg-butcancel">'.get_string('cancel').'</button>
|
||||
</div>';
|
||||
return preg_replace('/\{\!\}/', '', $rv);
|
||||
@@ -453,10 +454,10 @@ class core_files_renderer extends plugin_renderer_base {
|
||||
*/
|
||||
private function fm_print_restrictions($fm) {
|
||||
$maxbytes = display_size($fm->options->maxbytes);
|
||||
if (empty($options->maxfiles) || $options->maxfiles == -1) {
|
||||
if (empty($fm->options->maxfiles) || $fm->options->maxfiles == -1) {
|
||||
$maxsize = get_string('maxfilesize', 'moodle', $maxbytes);
|
||||
} else {
|
||||
$strparam = (object)array('size' => $maxbytes, 'attachments' => $options->maxfiles);
|
||||
$strparam = (object)array('size' => $maxbytes, 'attachments' => $fm->options->maxfiles);
|
||||
$maxsize = get_string('maxsizeandattachments', 'moodle', $strparam);
|
||||
}
|
||||
// TODO MDL-32020 also should say about 'File types accepted'
|
||||
@@ -620,8 +621,7 @@ class core_files_renderer extends plugin_renderer_base {
|
||||
<div class="{!}fp-nextpage">
|
||||
<div class="fp-nextpage-link"><a href="#">'.get_string('more').'</a></div>
|
||||
<div class="fp-nextpage-loading">
|
||||
<img src="'.$this->pix_url('i/loading').'" />
|
||||
<p>'.get_string('loading', 'repository').'</p>
|
||||
<img src="'.$this->pix_url('i/loading_small').'" />
|
||||
</div>
|
||||
</div>';
|
||||
return preg_replace('/\{\!\}/', '', $rv);
|
||||
@@ -659,19 +659,18 @@ class core_files_renderer extends plugin_renderer_base {
|
||||
$rv = '
|
||||
<div class="file-picker fp-select">
|
||||
<div class="fp-select-loading">
|
||||
<img src="'.$this->pix_url('i/loading').'" />
|
||||
<p>'.get_string('loading', 'repository').'</p>
|
||||
<img src="'.$this->pix_url('i/loading_small').'" />
|
||||
</div>
|
||||
<form>
|
||||
<table>
|
||||
<tr class="{!}fp-linktype-2">
|
||||
<td></td>
|
||||
<td class="mdl-right"></td>
|
||||
<td class="mdl-left"><input type="radio"/><label> '.get_string('makefileinternal', 'repository').'</label></td></tr>
|
||||
<tr class="{!}fp-linktype-1">
|
||||
<td></td>
|
||||
<td class="mdl-right"></td>
|
||||
<td class="mdl-left"><input type="radio"/><label> '.get_string('makefilelink', 'repository').'</label></td></tr>
|
||||
<tr class="{!}fp-linktype-4">
|
||||
<td></td>
|
||||
<td class="mdl-right"></td>
|
||||
<td class="mdl-left"><input type="radio"/><label> '.get_string('makefilereference', 'repository').'</label></td></tr>
|
||||
<tr class="{!}fp-saveas">
|
||||
<td class="mdl-right"><label>'.get_string('saveas', 'repository').'</label>:</td>
|
||||
@@ -757,8 +756,7 @@ class core_files_renderer extends plugin_renderer_base {
|
||||
return '
|
||||
<div class="fp-content-loading">
|
||||
<div class="fp-content-center">
|
||||
<img src="'.$this->pix_url('i/loading').'" />
|
||||
<p>'.get_string('loading', 'repository').'</p>
|
||||
<img src="'.$this->pix_url('i/loading_small').'" />
|
||||
</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2012061700;
|
||||
$plugin->version = 2012061701;
|
||||
$plugin->requires = 2012061700; // Requires this Moodle version
|
||||
$plugin->component= 'filter_glossary';
|
||||
|
||||
|
||||
+1
-1
@@ -130,4 +130,4 @@ YUI.add('moodle-filter_glossary-autolinker', function(Y) {
|
||||
return new AUTOLINKER(config);
|
||||
}
|
||||
|
||||
}, '@VERSION@', {requires:['base','node','event-delegate','overlay','moodle-enrol-notification']});
|
||||
}, '@VERSION@', {requires:['base','node','io-base','json-parse','event-delegate','overlay','moodle-enrol-notification']});
|
||||
|
||||
@@ -54,5 +54,9 @@ function xmldb_filter_mediaplugin_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, 2011121200, 'filter', 'mediaplugin');
|
||||
}
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -33,5 +33,9 @@ function xmldb_filter_tex_upgrade($oldversion) {
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ M.gradingform_guide = {};
|
||||
* This function is called for each guide on page.
|
||||
*/
|
||||
M.gradingform_guide.init = function(Y, options) {
|
||||
var currentfocus = null;
|
||||
var currentfocus = Y.one('.markingguideremark');
|
||||
|
||||
Y.all('.markingguideremark').on('blur', function(e) {
|
||||
currentfocus = e.currentTarget;
|
||||
|
||||
@@ -38,5 +38,9 @@ function xmldb_gradingform_rubric_upgrade($oldversion) {
|
||||
// Moodle v2.2.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
// Moodle v2.3.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -411,6 +411,9 @@ class grade_report_grader extends grade_report {
|
||||
case 'firstname':
|
||||
$sort = "u.firstname $this->sortorder, u.lastname $this->sortorder";
|
||||
break;
|
||||
case 'email':
|
||||
$sort = "u.email $this->sortorder";
|
||||
break;
|
||||
case 'idnumber':
|
||||
default:
|
||||
$sort = "u.idnumber $this->sortorder";
|
||||
|
||||
@@ -185,7 +185,7 @@ margin-right:10px;
|
||||
}
|
||||
|
||||
table#user-grades .quickfeedback {
|
||||
border:#000 1px dashed;
|
||||
border:1px dashed #000;
|
||||
}
|
||||
|
||||
.path-grade-report-grader #siteconfiglink {
|
||||
@@ -262,7 +262,7 @@ border-width:0 1px 1px;
|
||||
}
|
||||
|
||||
.path-grade-report-grader table td.topleft {
|
||||
border-bottom:none;
|
||||
border-bottom:0;
|
||||
}
|
||||
|
||||
table#user-grades td.topleft {
|
||||
@@ -325,12 +325,12 @@ margin: 10px 10px 0px 10px;
|
||||
}
|
||||
|
||||
.path-grade-report-grader table#quick_edit td.fullname {
|
||||
border-left:none;
|
||||
border-left:0;
|
||||
padding-left:5px;
|
||||
}
|
||||
|
||||
.path-grade-report-grader table#quick_edit td.picture {
|
||||
border-right:none;
|
||||
border-right:0;
|
||||
}
|
||||
|
||||
.path-grade-report-grader table#quick_edit td.finalgrade input {
|
||||
|
||||
@@ -53,7 +53,7 @@ class core_group_external extends external_api {
|
||||
'name' => new external_value(PARAM_TEXT, 'multilang compatible name, course unique'),
|
||||
'description' => new external_value(PARAM_RAW, 'group description text'),
|
||||
'descriptionformat' => new external_format_value('description', VALUE_DEFAULT),
|
||||
'enrolmentkey' => new external_value(PARAM_RAW, 'group enrol secret phrase'),
|
||||
'enrolmentkey' => new external_value(PARAM_RAW, 'group enrol secret phrase', VALUE_OPTIONAL),
|
||||
)
|
||||
), 'List of group object. A group has a courseid, a name, a description and an enrolment key.'
|
||||
)
|
||||
@@ -105,6 +105,9 @@ class core_group_external extends external_api {
|
||||
|
||||
// finally create the group
|
||||
$group->id = groups_create_group($group, false);
|
||||
if (!isset($group->enrolmentkey)) {
|
||||
$group->enrolmentkey = '';
|
||||
}
|
||||
$groups[] = (array)$group;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -410,21 +410,21 @@ if ($config->stage == INSTALL_DATABASE) {
|
||||
|
||||
$disabled = empty($distro->dbhost) ? '' : 'disabled="disabled';
|
||||
echo '<div class="formrow"><label for="id_dbhost" class="formlabel">'.$strdbhost.'</label>';
|
||||
echo '<input id="id_dbhost" name="dbhost" '.$disabled.' type="text" value="'.s($config->dbhost).'" size="30" class="forminput" />';
|
||||
echo '<input id="id_dbhost" name="dbhost" '.$disabled.' type="text" value="'.s($config->dbhost).'" size="50" class="forminput" />';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="formrow"><label for="id_dbname" class="formlabel">'.$strdbname.'</label>';
|
||||
echo '<input id="id_dbname" name="dbname" type="text" value="'.s($config->dbname).'" size="30" class="forminput" />';
|
||||
echo '<input id="id_dbname" name="dbname" type="text" value="'.s($config->dbname).'" size="50" class="forminput" />';
|
||||
echo '</div>';
|
||||
|
||||
$disabled = empty($distro->dbuser) ? '' : 'disabled="disabled';
|
||||
echo '<div class="formrow"><label for="id_dbuser" class="formlabel">'.$strdbuser.'</label>';
|
||||
echo '<input id="id_dbuser" name="dbuser" '.$disabled.' type="text" value="'.s($config->dbuser).'" size="30" class="forminput" />';
|
||||
echo '<input id="id_dbuser" name="dbuser" '.$disabled.' type="text" value="'.s($config->dbuser).'" size="50" class="forminput" />';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="formrow"><label for="id_dbpass" class="formlabel">'.$strdbpass.'</label>';
|
||||
// no password field here, the password may be visible in config.php if we can not write it to disk
|
||||
echo '<input id="id_dbpass" name="dbpass" type="text" value="'.s($config->dbpass).'" size="30" class="forminput" />';
|
||||
echo '<input id="id_dbpass" name="dbpass" type="text" value="'.s($config->dbpass).'" size="50" class="forminput" />';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="formrow"><label for="id_prefix" class="formlabel">'.$strprefix.'</label>';
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ h2 {
|
||||
.formrow label.formlabel {
|
||||
display:block;
|
||||
float:left;
|
||||
width: 260px;
|
||||
width: 160px;
|
||||
margin-right:5px;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -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['cannotsavemd5file'] = 'No s\'ha pogut alçar el fitxer md5';
|
||||
$string['cannotsavezipfile'] = 'No s\'ha pogut alçar el fitxer zip';
|
||||
@@ -0,0 +1,55 @@
|
||||
<?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['langdownloaderror'] = 'Dissortadament l\'idioma "{$a}" no està instal·lat. La instal·lació prosseguirà en anglés.';
|
||||
$string['memorylimithelp'] = '<p>El límit de memòria del PHP del vostre servidor actualment està definit en {$a}.</p>
|
||||
|
||||
<p>Això pot causar que Moodle tinga problemes de memòria més avant, especialment si teniu molts mòduls habilitats i/o molts usuaris.</p>
|
||||
|
||||
<p>És recomanable que configureu el PHP amb un límit superior, com ara 40 MB, sempre que siga possible. Hi ha diverses maneres de fer això:</p>
|
||||
<ol>
|
||||
<li>Si podeu, recompileu el PHP amb <i>--enable-memory-limit</i>. Això permetrà que Moodle definisca el límit de memòria per si mateix.</li>
|
||||
<li>Si teniu accés al fitxer php.ini, podeu canviar el paràmetre <b>memory_limit</b> a 40 MB. Si no hi teniu accés podeu demanar al vostre administrador que ho faça ell.</li>
|
||||
<li>En alguns servidors PHP podeu crear un fitxer .htaccess dins del directori de Moodle amb esta línia:
|
||||
<p><blockquote>php_value memory_limit 40M</blockquote></p>
|
||||
<p>Tanmateix, en alguns servidors això farà que no funcioni <b>cap</b> pàgina PHP (es visualitzaran errors) en el qual cas hauríeu de suprimir el fitxer .htaccess.</p></li>
|
||||
</ol>';
|
||||
$string['pathssubdataroot'] = 'Necessiteu un espai on Moodle puga alçar els fitxers penjats. Este directori hauria de tindre permisos de lectura I ESCRIPTURA per a l\'usuari del servidor web (normalment \'nobody\' o \'apache\'), però no cal que siga accessible directament via web. L\'instal·lador provarà de crear-lo si no existeix.';
|
||||
$string['phpversionhelp'] = '<p>Moodle necessita la versió de PHP 4.1.0 o posterior.</p>
|
||||
<p>A hores d\'ara esteu utilitzant la versió {$a}.</p>
|
||||
<p>Vos caldrà actualitzar el PHP o traslladar Moodle a un ordinador amb una versió de PHP més recent.</p>';
|
||||
$string['welcomep20'] = 'Esteu veient esta pàgina perquè heu instal·lat amb èxit i heu executat el paquet <strong>{$a->packname} {$a->packversion}</strong>. Felicitacions!';
|
||||
$string['welcomep30'] = 'Esta versió de <strong>{$a->installername}</strong> inclou les aplicacions necessàries per crear un entorn en el qual funcioni <strong>Moodle</strong>:';
|
||||
$string['welcomep50'] = 'L\'ús de totes les aplicacions d\'este paquet és governat per les seues llicències respectives. El paquet <strong>{$a->installername}</strong> complet és
|
||||
<a href="http://www.opensource.org/docs/definition_plain.html">codi font obert</a> i es distribueix
|
||||
sota llicència <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.';
|
||||
$string['welcomep60'] = 'Les pàgines següents vos guiaran per una sèrie de passos fàcils de seguir per configurar <strong>Moodle</strong> en el vostre ordinador. Podeu acceptar els paràmetres per defecte o, opcionalment, modificar-los perquè s\'ajusten a les vostres necessitats.';
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Automatically generated strings for Moodle 2.3beta installer
|
||||
* 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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user