Compare commits
55 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e8e92b0f1 | |||
| cd654c06a7 | |||
| b25f428173 | |||
| 535fd9678f | |||
| 627e723096 | |||
| 81f444886a | |||
| fe3db63c77 | |||
| 0b08576ea7 | |||
| 71d630fd59 | |||
| ae9a34b2d4 | |||
| e0db7da9e2 | |||
| 32ea431a2f | |||
| 56068f1aeb | |||
| bd696650b7 | |||
| 9157b95733 | |||
| 025ed8a332 | |||
| 397f50e376 | |||
| 4a702ed500 | |||
| b6e2489fd3 | |||
| fc542633e8 | |||
| f988f63bc6 | |||
| f0f739f4be | |||
| df2527eb4a | |||
| ade73d44bf | |||
| 0fae5133a0 | |||
| ff65861526 | |||
| 7920d1f08b | |||
| 6193543174 | |||
| 097fe73bab | |||
| b4f7f20a74 | |||
| 9856eadb1b | |||
| 027baac82e | |||
| 8102ded93a | |||
| 7cd705334e | |||
| 86eaf83174 | |||
| e8f0c133eb | |||
| 8535cc180e | |||
| e74ff55ff5 | |||
| 5d2e3c1b97 | |||
| 120b3ad637 | |||
| ed611437a6 | |||
| c1c1dc7a58 | |||
| 7511a99d0b | |||
| 3afbdcb211 | |||
| 4d47398bdc | |||
| f8c0d18110 | |||
| d84ddfda00 | |||
| c03882584d | |||
| d7b80c7dd4 | |||
| 992591e0e1 | |||
| efb26ed011 | |||
| 9486c3fe5c | |||
| 37ccc13b0f | |||
| cce2034d5e | |||
| 8ffc94ff69 |
@@ -1434,7 +1434,6 @@
|
||||
<VENDOR name="oracle" version="10.2" />
|
||||
</DATABASE>
|
||||
<PHP version="5.4.4" level="required">
|
||||
<RESTRICT function="restrict_php_version_7" message="unsupportedphpversion7" />
|
||||
</PHP>
|
||||
<PCREUNICODE level="optional">
|
||||
<FEEDBACK>
|
||||
|
||||
@@ -173,6 +173,8 @@ class core_calendar_external extends external_api {
|
||||
|
||||
// Let us findout courses that we can return events from.
|
||||
if (!$hassystemcap) {
|
||||
$courses = enrol_get_my_courses('id');
|
||||
$courses = array_keys($courses);
|
||||
foreach ($params['events']['courseids'] as $id) {
|
||||
try {
|
||||
$context = context_course::instance($id);
|
||||
@@ -185,7 +187,6 @@ class core_calendar_external extends external_api {
|
||||
'warningcode' => 'nopermissions',
|
||||
'message' => 'No access rights in course context '.$e->getMessage().$e->getTraceAsString()
|
||||
);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -363,6 +363,13 @@ class core_calendar_externallib_testcase extends externallib_advanced_testcase {
|
||||
$events = external_api::clean_returnvalue(core_calendar_external::get_calendar_events_returns(), $events);
|
||||
$this->assertEquals(1, count($events['events'])); // site.
|
||||
$this->assertEquals(0, count($events['warnings']));
|
||||
|
||||
// Try getting a course event by its id.
|
||||
$paramevents = array ('eventids' => array($courseevent->id));
|
||||
$events = core_calendar_external::get_calendar_events($paramevents, $options);
|
||||
$events = external_api::clean_returnvalue(core_calendar_external::get_calendar_events_returns(), $events);
|
||||
$this->assertEquals(1, count($events['events']));
|
||||
$this->assertEquals(0, count($events['warnings']));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -78,13 +78,8 @@ class core_calendar_lib_testcase extends advanced_testcase {
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/lib/cronlib.php');
|
||||
|
||||
// Moodle ICal URL (moodle.org events).
|
||||
$presetwhat = 'all';
|
||||
$presettime = 'recentupcoming';
|
||||
$userid = 1;
|
||||
$authtoken = 'a8bcfee2fb868a05357f650bd65dc0699b026524';
|
||||
$subscriptionurl = 'https://moodle.org/calendar/export_execute.php'
|
||||
. '?preset_what='.$presetwhat.'&preset_time='.$presettime.'&userid='.$userid.'&authtoken='.$authtoken;
|
||||
// ICal URL from external test repo.
|
||||
$subscriptionurl = $this->getExternalTestFileUrl('/ical.ics');
|
||||
|
||||
$subscription = new stdClass();
|
||||
$subscription->eventtype = 'site';
|
||||
|
||||
@@ -1130,7 +1130,7 @@ class core_course_management_renderer extends plugin_renderer_base {
|
||||
$totalpages = ceil($totalcourses / $perpage);
|
||||
if ($showtotals) {
|
||||
if ($totalpages == 0) {
|
||||
$str = get_string('nocoursesfound', 'moodle', $search);
|
||||
$str = get_string('nocoursesfound', 'moodle', s($search));
|
||||
} else if ($totalpages == 1) {
|
||||
$str = get_string('showingacourses', 'moodle', $totalcourses);
|
||||
} else {
|
||||
|
||||
+10
-3
@@ -603,14 +603,21 @@ class core_enrol_external extends external_api {
|
||||
*
|
||||
* @param int $courseid
|
||||
* @return array of course enrolment methods
|
||||
* @throws moodle_exception
|
||||
*/
|
||||
public static function get_course_enrolment_methods($courseid) {
|
||||
global $DB;
|
||||
|
||||
$params = self::validate_parameters(self::get_course_enrolment_methods_parameters(), array('courseid' => $courseid));
|
||||
|
||||
$coursecontext = context_course::instance($params['courseid']);
|
||||
$categorycontext = $coursecontext->get_parent_context();
|
||||
self::validate_context($categorycontext);
|
||||
// Note that we can't use validate_context because the user is not enrolled in the course.
|
||||
require_login(null, false, null, false, true);
|
||||
|
||||
$course = $DB->get_record('course', array('id' => $params['courseid']), '*', MUST_EXIST);
|
||||
$context = context_course::instance($course->id);
|
||||
if (!$course->visible and !has_capability('moodle/course:viewhiddencourses', $context)) {
|
||||
throw new moodle_exception('coursehidden');
|
||||
}
|
||||
|
||||
$result = array();
|
||||
$enrolinstances = enrol_get_instances($params['courseid'], true);
|
||||
|
||||
@@ -52,6 +52,7 @@ class enrol_self_external extends external_api {
|
||||
*
|
||||
* @param int $instanceid instance id of self enrolment plugin.
|
||||
* @return array instance information.
|
||||
* @throws moodle_exception
|
||||
*/
|
||||
public static function get_instance_info($instanceid) {
|
||||
global $DB, $CFG;
|
||||
@@ -66,10 +67,15 @@ class enrol_self_external extends external_api {
|
||||
throw new moodle_exception('invaliddata', 'error');
|
||||
}
|
||||
|
||||
// Note that we can't use validate_context because the user is not enrolled in the course.
|
||||
require_login(null, false, null, false, true);
|
||||
|
||||
$enrolinstance = $DB->get_record('enrol', array('id' => $params['instanceid']), '*', MUST_EXIST);
|
||||
$coursecontext = context_course::instance($enrolinstance->courseid);
|
||||
$categorycontext = $coursecontext->get_parent_context();
|
||||
self::validate_context($categorycontext);
|
||||
$course = $DB->get_record('course', array('id' => $enrolinstance->courseid), '*', MUST_EXIST);
|
||||
$context = context_course::instance($course->id);
|
||||
if (!$course->visible and !has_capability('moodle/course:viewhiddencourses', $context)) {
|
||||
throw new moodle_exception('coursehidden');
|
||||
}
|
||||
|
||||
$instanceinfo = (array) $enrolplugin->get_enrol_info($enrolinstance);
|
||||
if (isset($instanceinfo['requiredparam']->enrolpassword)) {
|
||||
|
||||
@@ -47,7 +47,9 @@ class enrol_self_external_testcase extends externallib_advanced_testcase {
|
||||
$studentrole = $DB->get_record('role', array('shortname'=>'student'));
|
||||
$this->assertNotEmpty($studentrole);
|
||||
|
||||
$course = self::getDataGenerator()->create_course();
|
||||
$coursedata = new stdClass();
|
||||
$coursedata->visible = 0;
|
||||
$course = self::getDataGenerator()->create_course($coursedata);
|
||||
|
||||
// Add enrolment methods for course.
|
||||
$instanceid1 = $selfplugin->add_instance($course, array('status' => ENROL_INSTANCE_ENABLED,
|
||||
@@ -68,6 +70,7 @@ class enrol_self_external_testcase extends externallib_advanced_testcase {
|
||||
$enrolmentmethods = $DB->get_records('enrol', array('courseid' => $course->id, 'status' => ENROL_INSTANCE_ENABLED));
|
||||
$this->assertCount(3, $enrolmentmethods);
|
||||
|
||||
$this->setAdminUser();
|
||||
$instanceinfo1 = enrol_self_external::get_instance_info($instanceid1);
|
||||
$instanceinfo1 = external_api::clean_returnvalue(enrol_self_external::get_instance_info_returns(), $instanceinfo1);
|
||||
|
||||
@@ -95,5 +98,14 @@ class enrol_self_external_testcase extends externallib_advanced_testcase {
|
||||
$this->assertEquals('Test instance 3', $instanceinfo3['name']);
|
||||
$this->assertTrue($instanceinfo3['status']);
|
||||
$this->assertEquals(get_string('password', 'enrol_self'), $instanceinfo3['enrolpassword']);
|
||||
|
||||
// Try to retrieve information using a normal user for a hidden course.
|
||||
$user = self::getDataGenerator()->create_user();
|
||||
$this->setUser($user);
|
||||
try {
|
||||
enrol_self_external::get_instance_info($instanceid3);
|
||||
} catch (moodle_exception $e) {
|
||||
$this->assertEquals('coursehidden', $e->errorcode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,7 +405,9 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
|
||||
$this->assertNotEmpty($studentrole);
|
||||
|
||||
$course1 = self::getDataGenerator()->create_course();
|
||||
$course2 = self::getDataGenerator()->create_course();
|
||||
$coursedata = new stdClass();
|
||||
$coursedata->visible = 0;
|
||||
$course2 = self::getDataGenerator()->create_course($coursedata);
|
||||
|
||||
// Add enrolment methods for course.
|
||||
$instanceid1 = $selfplugin->add_instance($course1, array('status' => ENROL_INSTANCE_ENABLED,
|
||||
@@ -422,6 +424,8 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
|
||||
$enrolmentmethods = $DB->get_records('enrol', array('courseid' => $course1->id, 'status' => ENROL_INSTANCE_ENABLED));
|
||||
$this->assertCount(2, $enrolmentmethods);
|
||||
|
||||
$this->setAdminUser();
|
||||
|
||||
// Check if information is returned.
|
||||
$enrolmentmethods = core_enrol_external::get_course_enrolment_methods($course1->id);
|
||||
$enrolmentmethods = external_api::clean_returnvalue(core_enrol_external::get_course_enrolment_methods_returns(),
|
||||
@@ -451,6 +455,15 @@ class core_enrol_externallib_testcase extends externallib_advanced_testcase {
|
||||
$this->assertEquals('self', $enrolmentmethod['type']);
|
||||
$this->assertTrue($enrolmentmethod['status']);
|
||||
$this->assertEquals('enrol_self_get_instance_info', $enrolmentmethod['wsfunction']);
|
||||
|
||||
// Try to retrieve information using a normal user for a hidden course.
|
||||
$user = self::getDataGenerator()->create_user();
|
||||
$this->setUser($user);
|
||||
try {
|
||||
core_enrol_external::get_course_enrolment_methods($course2->id);
|
||||
} catch (moodle_exception $e) {
|
||||
$this->assertEquals('coursehidden', $e->errorcode);
|
||||
}
|
||||
}
|
||||
|
||||
public function get_enrolled_users_setup($capability) {
|
||||
|
||||
@@ -35,6 +35,7 @@ $string['cliansweryes'] = 'Да';
|
||||
$string['cliincorrectvalueerror'] = 'Грешка, некоректна стойност "{$a->value}" за "{$a->option}"';
|
||||
$string['cliincorrectvalueretry'] = 'Неправилна стойност. Моля опитайте отново';
|
||||
$string['clitypevalue'] = 'Тип стойност';
|
||||
$string['clitypevaluedefault'] = 'въведете стойност, натиснете Enter за да се използва стойността по подразбиране ({$a})';
|
||||
$string['cliyesnoprompt'] = 'Въведете y (означава да) или n (означава не)';
|
||||
$string['environmentrequireinstall'] = 'Трябва да бъде инсталиран и разрешен';
|
||||
$string['environmentrequireversion'] = 'Необходима е версия {$a->needed} а Вие имате {$a->current}';
|
||||
|
||||
@@ -34,8 +34,8 @@ $string['admindirname'] = 'Adresář se soubory pro správu serveru';
|
||||
$string['availablelangs'] = 'Dostupné jazykové balíčky';
|
||||
$string['chooselanguagehead'] = 'Vyberte jazyk';
|
||||
$string['chooselanguagesub'] = 'Zvolte si jazyk tohoto průvodce instalací. Vybraný jazyk bude též nastaven jako výchozí jazyk stránek, ale to půjde případně později změnit.';
|
||||
$string['clialreadyconfigured'] = 'Soubor config.php již existuje. Spusťte admin/cli/install_database.php, pokud chcete provést instalaci databáze.';
|
||||
$string['clialreadyinstalled'] = 'Soubor config.php již existuje. Spusťte admin/cli/upgrade.php, pokud chcete provést upgrade vašich stránek.';
|
||||
$string['clialreadyconfigured'] = 'Konfigurační soubor config.php již existuje. Spusťte admin/cli/install_database.php, pokud chcete provést instalaci databáze.';
|
||||
$string['clialreadyinstalled'] = 'Konfigurační soubor config.php již existuje. Spusťte admin/cli/upgrade.php, pokud chcete provést upgrade vašich stránek.';
|
||||
$string['cliinstallheader'] = 'Moodle {$a} - průvodce instalací z příkazové řádky';
|
||||
$string['databasehost'] = 'Databázový server';
|
||||
$string['databasename'] = 'Název databáze';
|
||||
@@ -79,7 +79,7 @@ $string['phpversion'] = 'Verze PHP';
|
||||
$string['phpversionhelp'] = '<p>Moodle vyžaduje PHP alespoň verze 4.3.0 nebo 5.1.0 (PHP 5.0.x obsahuje množství chyb).</p>
|
||||
<p>Nyní používáte PHP verze {$a}.</p>
|
||||
<p>Musíte PHP upgradovat, nebo přejít k hostiteli s vyšší verzí!<br />
|
||||
(U PHP 5.0.x můžete také přejít na nižší verzi 4.4.x či 4.3.x.)</p>';
|
||||
(U PHP 5.0.x můžete také přejít na nižší verzi 4.4.x )</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Podařilo se vám úspěšně nainstalovat a spustit balíček <strong>{$a->packname} {$a->packversion}</strong>. Gratulujeme!';
|
||||
$string['welcomep30'] = '<strong>{$a->installername}</strong> obsahuje aplikace k vytvoření prostředí, ve kterém bude provozován váš <strong>Moodle</strong>. Jmenovitě se jedná o:';
|
||||
|
||||
@@ -36,7 +36,7 @@ $string['cliincorrectvalueerror'] = 'שגיאה: ערך לא תקין
|
||||
"{$a->value}" עבור "{$a->option}"';
|
||||
$string['cliincorrectvalueretry'] = 'ערך שגוי, נסה שנית';
|
||||
$string['clitypevalue'] = 'סוג הערך';
|
||||
$string['clitypevaluedefault'] = 'סוג הערך, הקש Enter לשימוש בערך ברירת מחדל ({$a})';
|
||||
$string['clitypevaluedefault'] = 'יש להזין ערך, או להקיש על כפתור Enter לשימוש בערך בררת־המחדל ({$a})';
|
||||
$string['cliunknowoption'] = 'אפשרויות לא מוכרות :
|
||||
{$a}
|
||||
אנא השתמש באפשרות העזרה.';
|
||||
|
||||
@@ -32,8 +32,8 @@ defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['admindirname'] = 'ספריית מנהל המערכת';
|
||||
$string['availablelangs'] = 'חבילות שפה זמינות';
|
||||
$string['chooselanguagehead'] = 'בחר שפה';
|
||||
$string['chooselanguagesub'] = 'אנא בחר שפה עבור ההתקנה בלבד. תוכל לבחור בשפה שונה לאתר ולמשתמש באחד מהמסכים הבאים.';
|
||||
$string['chooselanguagehead'] = 'בחירת שפה';
|
||||
$string['chooselanguagesub'] = 'יש לבחור שפה עבור ההתקנה בלבד. תוכל לבחור בשפה שונה לאתר ולמשתמש באחד מהמסכים הבאים.';
|
||||
$string['clialreadyconfigured'] = 'קובץ config.php כבר קיים, אנא השתמש ב
|
||||
admin/cli/install_database.php
|
||||
אם ברצונך להתקין את אתר זה.';
|
||||
@@ -42,7 +42,7 @@ $string['clialreadyinstalled'] = 'קובץ ה-config.php קיים כבר, אנא
|
||||
$string['cliinstallheader'] = 'תוכנית התקנת Moodle {$a} בשורת הפקודה';
|
||||
$string['databasehost'] = 'מסד הנתונים המארח (host)';
|
||||
$string['databasename'] = 'שם מסד הנתונים';
|
||||
$string['databasetypehead'] = 'בחר התקן מסד הנתונים';
|
||||
$string['databasetypehead'] = 'בחירת התקן מסד הנתונים';
|
||||
$string['dataroot'] = 'ספריית הנתונים';
|
||||
$string['datarootpermission'] = 'הרשאות תיקיות bתונים (data)';
|
||||
$string['dbprefix'] = 'Tables prefix';
|
||||
|
||||
@@ -39,4 +39,4 @@ $string['clitypevaluedefault'] = 'unesite vrijednost ili pritisnite Enter za kor
|
||||
$string['cliunknowoption'] = 'Nepoznate opcije: {$a} Molimo koristite --help opciju.';
|
||||
$string['cliyesnoprompt'] = 'unesite y (znači da) ili n (znači ne)';
|
||||
$string['environmentrequireinstall'] = 'je neophodno instalirati/omogućiti';
|
||||
$string['environmentrequireversion'] = 'neophodna inačica je {$a->needed}, a vi trenutno koristite inačicu {$a->current}';
|
||||
$string['environmentrequireversion'] = 'neophodna inačica je {$a->needed}, a vi trenutačno koristite inačicu {$a->current}';
|
||||
|
||||
@@ -41,7 +41,7 @@ $string['cannotunzipfile'] = 'Nije moguće otpakirati datoteku';
|
||||
$string['componentisuptodate'] = 'Komponenta je dostupna u svojoj najnovijoj inačici.';
|
||||
$string['downloadedfilecheckfailed'] = 'Došlo je do pogreške pri provjeri preuzete datoteke';
|
||||
$string['invalidmd5'] = 'Neispravna md5 datoteka';
|
||||
$string['missingrequiredfield'] = 'Nedostaje neko obvezno polje';
|
||||
$string['missingrequiredfield'] = 'Nedostaje neko obvezatno polje';
|
||||
$string['remotedownloaderror'] = 'Nije uspjelo preuzimanje komponente na poslužitelj, provjerite postavke proxyja. Preporuča se uporaba PHP cURL dodatka.<br /><br />Ručno preuzmite datoteku s <a href="{$a->url}">{$a->url}</a> iskopirajte ju u "{$a->dest}" na poslužitelju i raspakirajte.';
|
||||
$string['wrongdestpath'] = 'Pogrešna odredišna putanja.';
|
||||
$string['wrongsourcebase'] = 'Pogrešna baza izvornog URL-a';
|
||||
|
||||
@@ -45,12 +45,12 @@ $string['datarootpermission'] = 'Ovlasti nad mapom s podacima';
|
||||
$string['dbprefix'] = 'Prefiks tablice';
|
||||
$string['dirroot'] = 'Moodle mapa';
|
||||
$string['environmenthead'] = 'Provjera okruženja vašeg poslužitelja ...';
|
||||
$string['environmentsub2'] = 'Svaka inačica Moodle-a ima minimalne zahtjeve po pitanju odgovarajuće PHP inačice i nekoliko obveznih PHP ekstenzija.
|
||||
$string['environmentsub2'] = 'Svaka inačica Moodle-a ima minimalne zahtjeve po pitanju odgovarajuće PHP inačice i nekoliko obvezatnih PHP ekstenzija.
|
||||
Puna provjera okruženja se obavlja prije svake instalacije ili nadogradnje postojeće inačice. Ako ne znate kako instalirati novu inačicu ili omogućiti PHP ekstenzije, kontaktirajte administratora vašeg poslužitelja.';
|
||||
$string['errorsinenvironment'] = 'Pogreške u okruženju poslužitelja!';
|
||||
$string['installation'] = 'Instalacija';
|
||||
$string['langdownloaderror'] = 'Nažalost, jezik "{$a}" nije instaliran. Proces instalacije će biti nastavljen na engleskom jeziku.';
|
||||
$string['memorylimithelp'] = '<p>PHP ograničenje memorije na poslužitelju je trenutno podešeno na {$a}.</p>
|
||||
$string['memorylimithelp'] = '<p>PHP ograničenje memorije na poslužitelju je trenutačno podešeno na {$a}.</p>
|
||||
|
||||
<p>Ova postavka može kasnije rezultirati memorijskim problemima na vašem Moodle sustavu, posebno ako imate veći broj omogućenih modula i/ili veći broj korisnika.</p>
|
||||
|
||||
@@ -78,7 +78,7 @@ $string['pathsunsecuredataroot'] = 'Podatkovna (dataroot) mapa nije sigurna';
|
||||
$string['pathswrongadmindir'] = 'Admin mapa ne postoji';
|
||||
$string['phpextension'] = 'PHP ekstenzija {$a}';
|
||||
$string['phpversion'] = 'PHP inačica';
|
||||
$string['phpversionhelp'] = '<p>Moodle zahtijeva najmanje PHP inačicu 4.3.0 ili 5.1.0 (5.0.x funkcionira uz brojne uočene probleme).</p> <p>Trenutno imate inačicu {$a}</p> <p>Morate nadograditi PHP ili premestiti Moodle instalaciju na web poslužitelj s novijom inačicom PHP-a!</br> (U slučaju inačice 5.0.x bilo bi najbolje da je vratite na inačicu 4.4.x)</p>';
|
||||
$string['phpversionhelp'] = '<p>Moodle zahtijeva najmanje PHP inačicu 4.3.0 ili 5.1.0 (5.0.x funkcionira uz brojne uočene probleme).</p> <p>Trenutačno imate inačicu {$a}</p> <p>Morate nadograditi PHP ili premestiti Moodle instalaciju na web poslužitelj s novijom inačicom PHP-a!</br> (U slučaju inačice 5.0.x bilo bi najbolje da je vratite na inačicu 4.4.x)</p>';
|
||||
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
|
||||
$string['welcomep20'] = 'Prikazana vam je ova stranica jer ste uspješno instalirali i pokrenuli <strong>{$a->packname} {$a->packversion}</strong> paket na svom poslužitelju. Čestitamo!';
|
||||
$string['welcomep30'] = 'Ova inačica <strong>{$a->installername}</strong> uključuje aplikacije za stvaranje okruženja u kojem će sustav <strong>Moodle</strong> uspješno funkcionirati, konkretno:';
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['admindirname'] = 'Administratoriaus katalogas';
|
||||
$string['availablelangs'] = 'Galimų kalbų sąrašas';
|
||||
$string['availablelangs'] = 'Galimi kalbų paketai';
|
||||
$string['chooselanguagehead'] = 'Pasirinkite kalbą';
|
||||
$string['chooselanguagesub'] = 'Pasirinkite diegimo kalbą. Ši kalba bus naudojama ir kaip numatytoji svetainės kalba, nors vėliau ją bus galima pakeisti.';
|
||||
$string['clialreadyconfigured'] = 'Failas config.php jau yra, prašau naudoti admin/cli/install_database.php jei norite įrašyti šią svetainę.';
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['cannotcreatedboninstall'] = '<p>Nu se poate crea baza de date.</p>
|
||||
<p>Baza de date specificată nu există iar utilizatorul nu are permisiunea de a crea baza de date.</p>
|
||||
<p>Admistratorul site-ului trebuie să verfice configurarea bazei de date.</p>';
|
||||
$string['cannotcreatelangdir'] = 'Nu se poate crea un director lang';
|
||||
$string['cannotcreatetempdir'] = 'Nu se poate crea director temporar';
|
||||
$string['cannotdownloadcomponents'] = 'Nu se pot descărca componente';
|
||||
|
||||
@@ -39,10 +39,11 @@ $string['cannotsavemd5file'] = '无法保存 md5 文件';
|
||||
$string['cannotsavezipfile'] = '无法保存 ZIP 文件';
|
||||
$string['cannotunzipfile'] = '无法解压文件';
|
||||
$string['componentisuptodate'] = '组件已经是最新的了';
|
||||
$string['dmlexceptiononinstall'] = '<p>发生了一个数据库错误[{$a->errorcode}].<br />{$a->debuginfo}</p>';
|
||||
$string['downloadedfilecheckfailed'] = '下载文件检查失败';
|
||||
$string['invalidmd5'] = '无效的 md5';
|
||||
$string['missingrequiredfield'] = '缺少了必需的字段';
|
||||
$string['remotedownloaderror'] = '下载组件至服务器失败,请校验代理设置,推荐安装 PHP cURL 扩展。<br /><br />您必须手动下载下载<a href="{$a->url}">{$a->url}</a> ,拷贝至服务器上的“{$a->dest}”并解压至此。';
|
||||
$string['remotedownloaderror'] = '<p>下载组件至服务器失败,请校验代理设置,推荐安装 PHP cURL 扩展。</p> <p>您必须手动下载下载<a href="{$a->url}">{$a->url}</a> ,拷贝至服务器上的“{$a->dest}”并解压至此。</p>';
|
||||
$string['wrongdestpath'] = '错误的目标路径';
|
||||
$string['wrongsourcebase'] = '错误的源 URL 基地址。';
|
||||
$string['wrongzipfilename'] = '错误的 ZIP 文件名。';
|
||||
|
||||
@@ -36,7 +36,7 @@ function flowplayer_send_flash_content($filename) {
|
||||
// Note: Do not use any fancy APIs here, this must work in all supported versions.
|
||||
|
||||
// No url params.
|
||||
if (!empty($_GET) or !empty($_POST) or !empty($_REQUEST)) {
|
||||
if (!empty($_GET) or !empty($_POST)) {
|
||||
header("HTTP/1.1 404 Not Found");
|
||||
die;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ abstract class advanced_testcase extends PHPUnit_Framework_TestCase {
|
||||
$debugerror = phpunit_util::display_debugging_messages();
|
||||
$this->resetDebugging();
|
||||
if ($debugerror) {
|
||||
trigger_error('Unenxpected debugging() call detected.', E_USER_NOTICE);
|
||||
trigger_error('Unexpected debugging() call detected.', E_USER_NOTICE);
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
@@ -212,6 +212,10 @@ class assign_feedback_comments extends assign_feedback_plugin {
|
||||
*/
|
||||
public function get_settings(MoodleQuickForm $mform) {
|
||||
$default = $this->get_config('commentinline');
|
||||
if ($default === false) {
|
||||
// Apply the admin default if we don't have a value yet.
|
||||
$default = get_config('assignfeedback_comments', 'inline');
|
||||
}
|
||||
$mform->addElement('selectyesno',
|
||||
'assignfeedback_comments_commentinline',
|
||||
get_string('commentinline', 'assignfeedback_comments'));
|
||||
|
||||
@@ -406,8 +406,6 @@ class assign_grading_table extends table_sql implements renderable {
|
||||
foreach ($extrauserfields as $extrafield) {
|
||||
$this->column_class($extrafield, $extrafield);
|
||||
}
|
||||
// We require at least one unique column for the sort.
|
||||
$this->sortable(true, 'userid');
|
||||
$this->no_sorting('recordid');
|
||||
$this->no_sorting('finalgrade');
|
||||
$this->no_sorting('userid');
|
||||
@@ -1364,6 +1362,16 @@ class assign_grading_table extends table_sql implements renderable {
|
||||
has_capability('moodle/grade:viewall', $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Always return a valid sort - even if the userid column is missing.
|
||||
* @return array column name => SORT_... constant.
|
||||
*/
|
||||
public function get_sort_columns() {
|
||||
$result = parent::get_sort_columns();
|
||||
$result = array_merge($result, array('userid' => SORT_ASC));
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the table show_hide_link to not show for select column.
|
||||
*
|
||||
|
||||
@@ -2590,6 +2590,9 @@ class assign {
|
||||
// More efficient to load this here.
|
||||
require_once($CFG->libdir.'/filelib.php');
|
||||
|
||||
// Increase the server timeout to handle the creation and sending of large zip files.
|
||||
core_php_time_limit::raise();
|
||||
|
||||
$this->require_view_grades();
|
||||
|
||||
// Load all users with submit.
|
||||
@@ -5537,7 +5540,7 @@ class assign {
|
||||
require_once($CFG->dirroot . '/mod/assign/gradingoptionsform.php');
|
||||
|
||||
// Need submit permission to submit an assignment.
|
||||
require_capability('mod/assign:grade', $this->context);
|
||||
$this->require_view_grades();
|
||||
require_sesskey();
|
||||
|
||||
// Is advanced grading enabled?
|
||||
|
||||
@@ -169,7 +169,7 @@ if ($move > 0 and confirm_sesskey()) {
|
||||
forum_rss_delete_file($forum);
|
||||
forum_rss_delete_file($forumto);
|
||||
|
||||
redirect($return.'&moved=-1&sesskey='.sesskey());
|
||||
redirect($return.'&move=-1&sesskey='.sesskey());
|
||||
}
|
||||
|
||||
$params = array(
|
||||
@@ -355,7 +355,7 @@ if ($forum->type == 'qanda' && !has_capability('mod/forum:viewqandawithoutpostin
|
||||
}
|
||||
|
||||
if ($move == -1 and confirm_sesskey()) {
|
||||
echo $OUTPUT->notification(get_string('discussionmoved', 'forum', format_string($forum->name,true)));
|
||||
echo $OUTPUT->notification(get_string('discussionmoved', 'forum', format_string($forum->name,true)), 'notifysuccess');
|
||||
}
|
||||
|
||||
$canrate = has_capability('mod/forum:rate', $modcontext);
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
@mod @mod_forum
|
||||
Feature: A teacher can move discussions between forums
|
||||
In order to move a discussion
|
||||
As a teacher
|
||||
I need to use the move discussion selector
|
||||
|
||||
Background:
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
| student1 | Student | 1 | student1@example.com |
|
||||
And the following "courses" exist:
|
||||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
| student1 | C1 | student |
|
||||
|
||||
Scenario: A teacher can move discussions
|
||||
Given the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | groupmode |
|
||||
| forum | Test forum 1 | Test forum 2 | C1 | forum | 0 |
|
||||
| forum | Test forum 2 | Test forum 1 | C1 | forum | 0 |
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Test forum 1"
|
||||
And I add a new discussion to "Test forum 1" forum with:
|
||||
| Subject | Discussion 1 |
|
||||
| Message | Test post message |
|
||||
And I wait "1" seconds
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Test forum 1"
|
||||
And I follow "Discussion 1"
|
||||
When I set the field "jump" to "Test forum 2"
|
||||
And I press "Move"
|
||||
Then I should see "This discussion has been moved to 'Test forum 2'."
|
||||
+3
-3
@@ -46,20 +46,20 @@ if (!empty($swid)) {
|
||||
$subwiki = wiki_get_subwiki($swid);
|
||||
|
||||
if (!$wiki = wiki_get_wiki($subwiki->wikiid)) {
|
||||
print_error('invalidwikiid', 'wiki');
|
||||
print_error('incorrectwikiid', 'wiki');
|
||||
}
|
||||
|
||||
} else {
|
||||
$subwiki = wiki_get_subwiki_by_group($wid, $group, $uid);
|
||||
|
||||
if (!$wiki = wiki_get_wiki($wid)) {
|
||||
print_error('invalidwikiid', 'wiki');
|
||||
print_error('incorrectwikiid', 'wiki');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!$cm = get_coursemodule_from_instance('wiki', $wiki->id)) {
|
||||
print_error('invalidcoursemoduleid', 'wiki');
|
||||
print_error('invalidcoursemodule');
|
||||
}
|
||||
|
||||
$groups = new stdClass();
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ if (!$cm = get_coursemodule_from_instance('wiki', $wiki->id)) {
|
||||
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
|
||||
|
||||
if ($compare >= $comparewith) {
|
||||
print_error("A page version can only be compared with an older version.");
|
||||
print_error('cannotcomparenewerversion', 'wiki');
|
||||
}
|
||||
|
||||
require_login($course, true, $cm);
|
||||
|
||||
@@ -22,6 +22,7 @@ $string['backoldversion'] = 'Back to old version';
|
||||
$string['backpage'] = 'Back to page';
|
||||
$string['backtomapmenu'] = 'Back to map menu';
|
||||
$string['changerate'] = 'Do you wish to change it?';
|
||||
$string['cannotcomparenewerversion'] = 'A page version can only be compared with an older version.';
|
||||
$string['cannoteditpage'] = 'You can not edit this page.';
|
||||
$string['cannotmanagefiles'] = 'You don\'t have permission to manage the wiki files.';
|
||||
$string['cannotviewfiles'] = 'You don\'t have permission to view the wiki files.';
|
||||
@@ -102,6 +103,9 @@ $string['history'] = 'History';
|
||||
$string['history_help'] = 'The history lists links to previous versions of the page.';
|
||||
$string['html'] = 'HTML';
|
||||
$string['incorrectdeleteversions'] = "Page versions provided for deletion are incorrect.";
|
||||
$string['incorrectpageid'] = 'Page ID is incorrect.';
|
||||
$string['incorrectsubwikiid'] = 'Subwiki ID is incorrect.';
|
||||
$string['incorrectwikiid'] = 'Wiki ID is incorrect.';
|
||||
$string['insertcomment'] = 'Insert comment';
|
||||
$string['insertimage'] = 'Insert an image...';
|
||||
$string['insertimage_help'] = 'This drop-down list will insert an image to the wiki editor. If you need to add more images to the wiki, please use "Files" tab.';
|
||||
|
||||
+1
-1
@@ -268,7 +268,7 @@ if ($id) {
|
||||
// * Error. No more options
|
||||
// */
|
||||
} else {
|
||||
print_error('incorrectparameters');
|
||||
print_error('invalidparameters', 'wiki');
|
||||
}
|
||||
|
||||
if (!wiki_user_can_view($subwiki, $wiki)) {
|
||||
|
||||
@@ -112,8 +112,13 @@ class report_log_table_log extends table_sql {
|
||||
* @return string HTML for the time column
|
||||
*/
|
||||
public function col_time($event) {
|
||||
$recenttimestr = get_string('strftimerecent', 'core_langconfig');
|
||||
return userdate($event->timecreated, $recenttimestr);
|
||||
|
||||
if (empty($this->download)) {
|
||||
$dateformat = get_string('strftimerecent', 'core_langconfig');
|
||||
} else {
|
||||
$dateformat = get_string('strftimedatetimeshort', 'core_langconfig');
|
||||
}
|
||||
return userdate($event->timecreated, $dateformat);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -105,7 +105,7 @@ $params = $param->params;
|
||||
|
||||
$param->table = 'user_'.$param->table;
|
||||
|
||||
$sql = 'SELECT timeend,'.$param->fields.' FROM {stats_'.$param->table.'} WHERE '
|
||||
$sql = 'SELECT id, timeend,'.$param->fields.' FROM {stats_'.$param->table.'} WHERE '
|
||||
.(($course->id == SITEID) ? '' : ' courseid = '.$course->id.' AND ')
|
||||
.' userid = '.$user->id.' AND timeend >= '.$param->timeafter .$param->extras
|
||||
.' ORDER BY timeend DESC';
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ class user_edit_form extends moodleform {
|
||||
if (!$mform->elementExists($formfield)) {
|
||||
continue;
|
||||
}
|
||||
$value = $mform->getElementValue($formfield);
|
||||
$value = $mform->getElement($formfield)->exportValue($mform->getElementValue($formfield)) ?: '';
|
||||
$configvariable = 'field_lock_' . $field;
|
||||
if (isset($authplugin->config->{$configvariable})) {
|
||||
if ($authplugin->config->{$configvariable} === 'locked') {
|
||||
|
||||
@@ -272,7 +272,7 @@ class user_editadvanced_form extends moodleform {
|
||||
}
|
||||
}
|
||||
|
||||
if (!$user or $user->email !== $usernew->email) {
|
||||
if (!$user or (isset($usernew->email) && $user->email !== $usernew->email)) {
|
||||
if (!validate_email($usernew->email)) {
|
||||
$err['email'] = get_string('invalidemail');
|
||||
} else if ($DB->record_exists('user', array('email' => $usernew->email, 'mnethostid' => $CFG->mnet_localhost_id))) {
|
||||
|
||||
+3
-1
@@ -230,7 +230,9 @@ if ($mycourses = enrol_get_my_courses()) {
|
||||
$controlstable->data[0]->cells[] = $OUTPUT->render($select);
|
||||
}
|
||||
|
||||
$controlstable->data[0]->cells[] = groups_print_course_menu($course, $baseurl->out(), true);
|
||||
if ($groupmenu = groups_print_course_menu($course, $baseurl->out(), true)) {
|
||||
$controlstable->data[0]->cells[] = $groupmenu;
|
||||
}
|
||||
|
||||
if (!isset($hiddenfields['lastaccess'])) {
|
||||
// Get minimum lastaccess for this course and display a dropbox to filter by lastaccess going back this far.
|
||||
|
||||
+2
-2
@@ -29,11 +29,11 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$version = 2014111009.00; // 20141110 = branching date YYYYMMDD - do not modify!
|
||||
$version = 2014111010.00; // 20141110 = branching date YYYYMMDD - do not modify!
|
||||
// RR = release increments - 00 in DEV branches.
|
||||
// .XX = incremental changes.
|
||||
|
||||
$release = '2.8.9 (Build: 20151109)'; // Human-friendly version name
|
||||
$release = '2.8.10 (Build: 20160111)'; // Human-friendly version name
|
||||
|
||||
$branch = '28'; // This version's branch.
|
||||
$maturity = MATURITY_STABLE; // This version's maturity level.
|
||||
|
||||
Reference in New Issue
Block a user