Compare commits

..

30 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 8ec057ca45 Moodle release 2.4.9 2014-03-07 18:51:34 +01:00
AMOS bot fbc50fb699 Merge branch 'MOODLE_24_STABLE' into install_24_STABLE 2014-03-07 00:54:52 +00:00
AMOS bot b0ec2d8cb5 Automatically generated installer lang files 2014-03-05 00:54:50 +00:00
Dan Poltawski eee61675f0 MDL-43146 enrol_imsenterprise: missing sesskey protection 2014-03-04 12:28:11 +08:00
Frederic Massart 4bc5dd3217 MDL-29409 repository_alfresco: Drop support for URL/link
The current solution has two major issues. Firstly, it is using the
session key in the file URL, allowing anyone with the link to steal
the identify of the poster. Secondly, the links are not presistent
and become broken as soon as the server is restarted. Let's not
support this any more until a proper solution is found in MDL-26454.
2014-03-04 11:35:03 +08:00
Marina Glancy d9596365e5 MDL-39990 wiki: more detailed validation of view/edit access 2014-03-03 14:45:17 +08:00
Andrew Davis 7748e17207 MDL-44082 mod_chat: added a security check for users already in the chat activity 2014-03-03 12:16:54 +08:00
Tomasz Muras aea324963d MDL-43656 mod_feedback: availablity date logic incorrect 2014-03-03 11:24:44 +08:00
Tim Hunt fd4b7f5739 MDL-43690 quiz_question_tostring missing s().
This meant that the edit quiz page sometimes had invalid HTML.
2014-03-03 11:00:33 +08:00
Maria Torres ae0ec61180 MDL-43916 - Email addresses incorrectly displayed
When capabilities and settings do not allow it.
2014-03-03 10:37:29 +08:00
Dan Poltawski b97e5658ea Merge branch 'w06_MDL-43344_m24_flow' of https://github.com/skodak/moodle into MOODLE_24_STABLE 2014-03-03 10:07:30 +08:00
AMOS bot c3083344ec Automatically generated installer lang files 2014-03-01 00:56:08 +00:00
AMOS bot b186033382 Automatically generated installer lang files 2014-02-21 00:45:34 +00:00
Eloy Lafuente (stronk7) a3edb5252a weekly release 2.4.8+ 2014-02-20 12:43:14 +01:00
Eloy Lafuente (stronk7) b268d4a05c Merge branch 'install_24_STABLE' of git://git.moodle.org/moodle-install into MOODLE_24_STABLE 2014-02-20 12:43:10 +01:00
Damyon Wiese e50a4e2386 Merge branch 'MDL-44018_24' of git://github.com/timhunt/moodle into MOODLE_24_STABLE 2014-02-19 10:25:00 +08:00
Tim Hunt 9b19a46099 MDL-44118 new environment check are all quiz attempts upgraded.
In Moodle 2.1, there was a major DB upgrade relating to questions, and
it was possible to delay some of that upgrade. Now, those DB tables are
changing again, and the time has come to insist that all the updata has
been upgraded (or deleted).
2014-02-18 12:06:15 +00:00
AMOS bot 77f8c68f44 Automatically generated installer lang files 2014-02-15 00:43:55 +00:00
AMOS bot 798b7b04af Automatically generated installer lang files 2014-02-12 00:42:56 +00:00
AMOS bot 88c96fd2f3 Automatically generated installer lang files 2014-02-11 00:42:15 +00:00
Tim Hunt 16ae4b809d MDL-44018 quesiton variant was not backed up or restored. 2014-02-06 09:53:45 +00:00
AMOS bot 35f6017d21 Automatically generated installer lang files 2014-02-02 00:42:21 +00:00
AMOS bot 085abbb371 Automatically generated installer lang files 2014-01-31 00:43:06 +00:00
Petr Skoda c3cd5e1db9 MDL-43344 upgrade to latest Flowplayer 2014-01-30 10:33:40 +08:00
AMOS bot 1f771e4103 Automatically generated installer lang files 2014-01-22 00:55:32 +00:00
AMOS bot cc18262792 Automatically generated installer lang files 2014-01-21 00:41:41 +00:00
AMOS bot ba7340108e Automatically generated installer lang files 2014-01-20 00:41:25 +00:00
AMOS bot 9dadea2557 Automatically generated installer lang files 2014-01-19 00:41:59 +00:00
AMOS bot 832d5b682d Automatically generated installer lang files 2014-01-16 00:43:20 +00:00
AMOS bot a2c9045867 Automatically generated installer lang files 2014-01-14 00:45:42 +00:00
66 changed files with 1449 additions and 107 deletions
+7
View File
@@ -1122,5 +1122,12 @@
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+1 -1
View File
@@ -210,7 +210,7 @@ abstract class backup_questions_activity_structure_step extends backup_activity_
$qas = new backup_nested_element($nameprefix . 'question_attempts');
$qa = new backup_nested_element($nameprefix . 'question_attempt', array('id'), array(
'slot', 'behaviour', 'questionid', 'maxmark', 'minfraction',
'slot', 'behaviour', 'questionid', 'variant', 'maxmark', 'minfraction',
'flagged', 'questionsummary', 'rightanswer', 'responsesummary',
'timemodified'));
+3
View File
@@ -3837,6 +3837,9 @@ abstract class restore_questions_activity_structure_step extends restore_activit
$data->questionusageid = $this->get_new_parentid($nameprefix . 'question_usage');
$data->questionid = $question->newitemid;
if (!property_exists($data, 'variant')) {
$data->variant = 1;
}
$data->timemodified = $this->apply_date_offset($data->timemodified);
$newitemid = $DB->insert_record('question_attempts', $data);
+1
View File
@@ -2,6 +2,7 @@
require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
require_login(0, false);
require_capability('moodle/site:config', context_system::instance());
require_sesskey();
$site = get_site();
+3 -1
View File
@@ -83,6 +83,8 @@ if ($ADMIN->fulltree) {
$settings->add(new admin_setting_configcheckbox('enrol_imsenterprise/imscapitafix', get_string('usecapitafix', 'enrol_imsenterprise'), get_string('usecapitafix_desc', 'enrol_imsenterprise'), 0));
$importnowstring = get_string('aftersaving...', 'enrol_imsenterprise').' <a href="../enrol/imsenterprise/importnow.php">'.get_string('doitnow', 'enrol_imsenterprise').'</a>';
$importurl = new moodle_url('/enrol/imsenterprise/importnow.php', array('sesskey' => sesskey()));
$importnowstring = get_string('aftersaving...', 'enrol_imsenterprise').' '.
html_writer::link($importurl, get_string('doitnow', 'enrol_imsenterprise'));
$settings->add(new admin_setting_heading('enrol_imsenterprise_doitnowmessage', '', $importnowstring));
}
+1
View File
@@ -32,4 +32,5 @@ defined('MOODLE_INTERNAL') || die();
$string['language'] = 'زمان';
$string['next'] = 'دواتر';
$string['previous'] = 'پێشوو';
$string['reload'] = 'بارکردنەوە';
+4
View File
@@ -30,6 +30,9 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p>Nelze vytvořit databázi.</p>
<p>Určená databáze neexistuje a uživatel nemá oprávnění k vytvoření databáze. </p>
<p>Správce stránek by měl ověřit konfiguraci databáze.</p>';
$string['cannotcreatelangdir'] = 'Nelze vytvořit adresář pro jazykové soubory';
$string['cannotcreatetempdir'] = 'Nelze vytvořit dočasný adresář';
$string['cannotdownloadcomponents'] = 'Nelze stáhnout komponenty';
@@ -39,6 +42,7 @@ $string['cannotsavemd5file'] = 'Nelze uložit soubor MD5';
$string['cannotsavezipfile'] = 'Nelze uložit soubor ZIP';
$string['cannotunzipfile'] = 'Nelze dekomprimovat soubor';
$string['componentisuptodate'] = 'Komponenta je aktuální';
$string['dmlexceptiononinstall'] = '<p>Došlo k chybě databáze [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'Selhala kontrola staženého souboru';
$string['invalidmd5'] = 'Ověření selhalo - zkuste to znovu';
$string['missingrequiredfield'] = 'Chybí některé z povinných polí';
+2
View File
@@ -30,6 +30,7 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = 'གཞི་གྲངས་མཛོད་<p>བཟོ་མི་བཏུབ། བཀོད་མི་གཞི་གྲངས་མཛོད་</p> <p>དེ་མེད་པའི་ཁར་ ལག་ལེན་པ་ལུ་ གཞི་གྲངས་མཛོད་བཟོ་ནི་གི་གནང་བ་མེད།གནས་ཁོངས་བདག་སྐྱོང་པ་ </p> <p>་གིས་གཞི་གྲངས་མཛོད་དེ་གི་སྡེབ་སྒྲིག་</p>གཏན་འབེབས་འབད་དགོ';
$string['cannotcreatelangdir'] = 'སྐད་ཡིག་སྣོད་ཐོ་ གསར་བསྐྲུན་འབད་མི་བཏུབ།';
$string['cannotcreatetempdir'] = 'གནས་སྐབས་ཀྱི་སྣོད་ཐོ་ གསར་བསྐྲུན་འབད་མི་བཏུབ།';
$string['cannotdownloadcomponents'] = 'ཆ་ཤས་ཚུ་ཕབ་ལེན་འབད་མི་བཏུབ།';
@@ -39,6 +40,7 @@ $string['cannotsavemd5file'] = 'md5 ཡིག་སྣོད་ སྲུངས
$string['cannotsavezipfile'] = 'ZIP ཡིག་སྣོད་ སྲུངས་མི་བཏུབ།';
$string['cannotunzipfile'] = 'ཡིག་སྣོད་ unzip འབད་མི་བཏུབ།';
$string['componentisuptodate'] = 'ཆ་ཤས་འདི་ དུས་མཐུན་སྦེ་ཡོད།';
$string['dmlexceptiononinstall'] = 'p>གཞི་གྲངས་མཛོད་ཀྱི་འཛོལ་བཅིག་འཐོན་ནུག [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'ཕབ་ལེན་འབད་ཡོད་པའི་ཡིག་སྣོད་ཞིབ་དཔྱད་འཐུས་ཤོར་བྱུང་ཡོདཔ།';
$string['invalidmd5'] = 'check འགྱུར་ཅནའདི་ཕྱི་འགྱུར་ཨིན་མས་ - ལོག་འབད་གནང་།';
$string['missingrequiredfield'] = 'དགོ་པའི་ས་སྒོ་འདི་མིན་འདུག';
+2
View File
@@ -30,6 +30,7 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p> No se puede crear la base de datos. </p><p> La base de datos especificada no existe y el usuario indicado no tiene permiso para crear la base de datos. </p><p> El administrador del sitio debe comprobar la configuración de base de datos. </p>';
$string['cannotcreatelangdir'] = 'No se puede crear el directorio de idioma.';
$string['cannotcreatetempdir'] = 'No se puede crear el directorio temp.';
$string['cannotdownloadcomponents'] = 'No se puede descargar componentes';
@@ -39,6 +40,7 @@ $string['cannotsavemd5file'] = 'No se puede guardar el archivo md5';
$string['cannotsavezipfile'] = 'No se puede guardar el archivo ZIP';
$string['cannotunzipfile'] = 'No se puede descomprimir el archivo';
$string['componentisuptodate'] = 'El componente está actualizado';
$string['dmlexceptiononinstall'] = '<p>Se ha producido un error de base de datos [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'Ha fallado la comprobación del archivo descargado';
$string['invalidmd5'] = 'La variable de verificación MD5 es incorrecta no es valida - trate nuevamente';
$string['missingrequiredfield'] = 'Falta algún campo necesario';
+2
View File
@@ -30,6 +30,7 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p>No puede crearse la BasedeDatos.</p> <p>La BasedeDatos especificada no existe y el usuario dado no tiene permiso para crear la BasedeDatos.</p> <p>El administrador del sitio debería verificar la configuración de la BasedeDatos.</p>';
$string['cannotcreatelangdir'] = 'No se puede crear el directorio de idioma.';
$string['cannotcreatetempdir'] = 'No se puede crear el directorio temp.';
$string['cannotdownloadcomponents'] = 'No se puede descargar componentes';
@@ -39,6 +40,7 @@ $string['cannotsavemd5file'] = 'No se puede guardar el archivo md5';
$string['cannotsavezipfile'] = 'No se puede guardar el archivo ZIP';
$string['cannotunzipfile'] = 'No se puede descomprimir el archivo';
$string['componentisuptodate'] = 'El componente está actualizado';
$string['dmlexceptiononinstall'] = '<p>Ocurrió un error en la BasedeDatos[{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'Ha fallado la comprobación del archivo descargado';
$string['invalidmd5'] = 'La variable de verificación MD5 es incorrecta no es valida - trate nuevamente';
$string['missingrequiredfield'] = 'Falta algún campo necesario';
+4
View File
@@ -30,6 +30,9 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p>Impossible de créer la base de données.</p>
<p>La base de données indiquées n\'existe pas et l\'utilisateur spécifié n\'a pas les autorisations permettant de créer une base de données.</p>.
<p>L\'administrateur du site doit revoir la configuration de la base de données.</p>';
$string['cannotcreatelangdir'] = 'Création du dossier lang impossible';
$string['cannotcreatetempdir'] = 'Création du dossier temp impossible';
$string['cannotdownloadcomponents'] = 'Téléchargement des composants impossible';
@@ -39,6 +42,7 @@ $string['cannotsavemd5file'] = 'Enregistrement du fichier md5 impossible';
$string['cannotsavezipfile'] = 'Enregistrement du fichier ZIP impossible';
$string['cannotunzipfile'] = 'Décompression du fichier ZIP impossible';
$string['componentisuptodate'] = 'Le composant est à jour';
$string['dmlexceptiononinstall'] = '<p>Une erreur de base de données est survenue [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'La vérification du fichier téléchargé à échoué';
$string['invalidmd5'] = 'Le code de contrôle md5 n\'est pas valide';
$string['missingrequiredfield'] = 'Un champ obligatoire n\'est pas renseigné';
+2
View File
@@ -30,6 +30,7 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p>Az adatbázis nem hozható létre.</p> <p>A megadott adatbázis nem létezik, a felhasználó pedig nem jogosult létrehozni egyet.</p> <p>A portál rendszergazdájának ellenőrizni kell az adatbázis-beállításokat.</p>';
$string['cannotcreatelangdir'] = 'Nem hozható létre a lang könyvtár.';
$string['cannotcreatetempdir'] = 'Nem hozható létre a temp könyvtár.';
$string['cannotdownloadcomponents'] = 'Az összetevőket nem lehet letölteni.';
@@ -39,6 +40,7 @@ $string['cannotsavemd5file'] = 'Az md5 állományt nem lehet elmenteni.';
$string['cannotsavezipfile'] = 'A tömörített állományt nem lehet elmenteni.';
$string['cannotunzipfile'] = 'A tömörített állományt nem lehet kicsomagolni.';
$string['componentisuptodate'] = 'Az összetevő a legújabb.';
$string['dmlexceptiononinstall'] = '<p>Adatbázishiba történt [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'A letöltött állomány ellenőrzése nem sikerült.';
$string['invalidmd5'] = 'Az ellenőrző változó hibás volt próbálkozzék ismét';
$string['missingrequiredfield'] = 'Egy szükséges mező hiányzik.';
+5 -1
View File
@@ -30,6 +30,9 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p>データベースを作成できません。</p>
<p>指定されたデータベースは存在しません。また、ユーザにはデータベースを作成するパーミッションがありません。</p>
<p>サイト管理者はデータベース設定を確認してください。</p>';
$string['cannotcreatelangdir'] = 'langディレクトリを作成できません。';
$string['cannotcreatetempdir'] = 'tempディレクトリを作成できません。';
$string['cannotdownloadcomponents'] = 'コンポーネットをダウンロードできません。';
@@ -39,10 +42,11 @@ $string['cannotsavemd5file'] = 'mp5ファイルを保存できません。';
$string['cannotsavezipfile'] = 'ZIPファイルを保存できません。';
$string['cannotunzipfile'] = 'ZIPファイルを解凍できません。';
$string['componentisuptodate'] = 'コンポーネントは最新です。';
$string['dmlexceptiononinstall'] = '<p>データベースエラーが発生しました: [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'ダウンロードファイルのチェックに失敗しました。';
$string['invalidmd5'] = 'チェック変数が正しくありません - 再度お試しください。';
$string['missingrequiredfield'] = 'いくつかの必須入力フィールドが入力されていません。';
$string['remotedownloaderror'] = 'あなたのサーバへのコンポーネントのダウンロードに失敗しました。プロクシ設定を確認してください。PHP cURL拡張モジュールの使用を強くお勧めします。<br /><br /><a href="{$a->url}">{$a->url}</a>ファイルを手動でダウンロードした後、あなたのサーバの「{$a->dest}」にコピーおよび解凍してください。';
$string['wrongdestpath'] = '宛先パスが正しくありません。';
$string['wrongsourcebase'] = 'ソースURIベースが正しくありません。';
$string['wrongsourcebase'] = 'ソースURLベースが正しくありません。';
$string['wrongzipfilename'] = 'ZIPファイル名が正しくありません。';
+2 -2
View File
@@ -66,10 +66,10 @@ $string['pathserrcreatedataroot'] = 'データディレクトリ ({$a->dataroot}
$string['pathshead'] = 'パスを確認する';
$string['pathsrodataroot'] = 'datarootディレクトリに書き込み権がありません。';
$string['pathsroparentdataroot'] = '親ディレクトリ ({$a->parent}) に書き込み権がありません。データディレクトリ ({$a->dataroot}) は、インストーラーで作成できません。';
$string['pathssubadmindir'] = '極わずかですが、あなたがコントロールパネル等にアクセスするため、特別なURIとして/adminを使用するウェブホストがあります。残念なことに、これはMoodle管理ページの標準的なローケーションと競合してしまいます。ここに新しいディレクトリ名を入力することで、あなたのMoodleのadminディレクトリを修正することができます。例えば、<em>moodleadmin</em>です。これにより、Moodleのadminリンクが修正されます。';
$string['pathssubadmindir'] = '極わずかですが、あなたがコントロールパネル等にアクセスするため、特別なURLとして/adminを使用するウェブホストがあります。残念なことに、これはMoodle管理ページの標準的なローケーションと競合してしまいます。ここに新しいディレクトリ名を入力することで、あなたのMoodleのadminディレクトリを修正することができます。例えば、<em>moodleadmin</em>です。これにより、Moodleのadminリンクが修正されます。';
$string['pathssubdataroot'] = 'あなたには、Moodleがファイルをアップロードすることのできる場所が必要です。このディレクトリは、ウェブサーバユーザ (通常「nobody」または「apache」) から読み込みおよび「書き込み」できる必要があります。しかし、ウェブからは直接アクセスできないようにしてください。データディレクトリがない場合、インストーラーは作成を試みます。';
$string['pathssubdirroot'] = 'Moodleインストールに関するフルディレクトリパスです。';
$string['pathssubwwwroot'] = 'Moodleにアクセスすることのできるフルウェブアドレスです。複数アドレスを使用して、Moodleにアクセスすることはできません。あなたのサイトに複数のパブリックアドレスがある場合、このアドレスを除く、すべてのアドレスにパーマネントリダイレクトを設定してください。あなたのサイトにイントラネットおよびインターネットからアクセスできる場合、ここにはパブリックアドレスを入力してください。また、イントラネットユーザもパブリックアドレスを利用できるよう、DNSを設定してください。アドレスが正しくない場合、あなたのブラウザのURIを変更して、異なる値でインストールを再開してください。';
$string['pathssubwwwroot'] = 'Moodleにアクセスすることのできるフルウェブアドレスです。複数アドレスを使用して、Moodleにアクセスすることはできません。あなたのサイトに複数のパブリックアドレスがある場合、このアドレスを除く、すべてのアドレスにパーマネントリダイレクトを設定してください。あなたのサイトにイントラネットおよびインターネットからアクセスできる場合、ここにはパブリックアドレスを入力してください。また、イントラネットユーザもパブリックアドレスを利用できるよう、DNSを設定してください。アドレスが正しくない場合、あなたのブラウザのURLを変更して、異なる値でインストールを再開してください。';
$string['pathsunsecuredataroot'] = 'dirrootロケーションが安全ではありません。';
$string['pathswrongadmindir'] = 'adminディレクトリがありません。';
$string['phpextension'] = '{$a} PHP拡張モジュール';
+4
View File
@@ -30,6 +30,9 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p>Kan databank niet maken.</p>
<p>De opgegeven databank bestaat niet en de opgegeven gebruiker heeft onvoldoende rechten om de databank te maken.</p>
<p>De site-beheerder moet de databankconfiguratie controleren.</p>';
$string['cannotcreatelangdir'] = 'Kan lang map niet maken';
$string['cannotcreatetempdir'] = 'Kan tijdelijke map niet maken.';
$string['cannotdownloadcomponents'] = 'Kan componenten niet downloaden.';
@@ -39,6 +42,7 @@ $string['cannotsavemd5file'] = 'Kan md5-bestand niet bewaren.';
$string['cannotsavezipfile'] = 'Kan ZIP-bestand niet bewaren.';
$string['cannotunzipfile'] = 'Kon bestand niet unzippen';
$string['componentisuptodate'] = 'Component is up-to-date';
$string['dmlexceptiononinstall'] = '<p>Databankfout [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'Controle van het gedownloade bestand mislukt';
$string['invalidmd5'] = 'De controlevariable was fout - probeer nog eens';
$string['missingrequiredfield'] = 'Vereist veld ontbreekt';
+1 -1
View File
@@ -30,6 +30,6 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'Arved språk';
$string['parentlanguage'] = '';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Norsk - bokmål';
+2
View File
@@ -30,6 +30,7 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p> Não é possível criar a base de dados. </p><p> A base de dados especificada não existe e o utilizador em questão não tem permissão para criar a base de dados. </p><p> O administrador do site deve verificar a configuração da base de dados. </p>';
$string['cannotcreatelangdir'] = 'Não é possível criar a pasta de pacotes linguísticos';
$string['cannotcreatetempdir'] = 'Não é possível criar a pasta de ficheiros temporários';
$string['cannotdownloadcomponents'] = 'Não é possível descarregar os componentes.';
@@ -39,6 +40,7 @@ $string['cannotsavemd5file'] = 'Não é possível gravar o ficheiro md5';
$string['cannotsavezipfile'] = 'Não é possível gravar o ficheiro ZIP';
$string['cannotunzipfile'] = 'Não é possível descompactar o ficheiro ZIP';
$string['componentisuptodate'] = 'O componente está atualizado.';
$string['dmlexceptiononinstall'] = '<p>Ocorreu um erro de base de dados [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'A verificação do ficheiro descarregado falhou.';
$string['invalidmd5'] = 'A variável de verificação está errada - tente novamente.';
$string['missingrequiredfield'] = 'Um dos campos obrigatórios está em falta';
+2
View File
@@ -30,6 +30,7 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p> Невозможно создать базу данных. </p><p> Указанная база данных не существует, и данный пользователь не имеет разрешения на создание базы данных. </p><p> Администратор сайта должен проверить конфигурацию базы данных. </p>';
$string['cannotcreatelangdir'] = 'Не удается создать каталог языка';
$string['cannotcreatetempdir'] = 'Не удается создать временный каталог';
$string['cannotdownloadcomponents'] = 'Невозможно загрузить компоненты.';
@@ -39,6 +40,7 @@ $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'] = 'Отсутствуют некоторые обязательные поля';
+4
View File
@@ -30,6 +30,9 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p>Није могуће креирати базу података.</p>
<p>Специфицирана база не постоји и дати корисник нема права да је креира.</p>
<p>Администратор сајта би требао да провери подешавања базе.</p>';
$string['cannotcreatelangdir'] = 'Није могуће креирати директоријум језика';
$string['cannotcreatetempdir'] = 'Није могуће креирати привремени директоријум';
$string['cannotdownloadcomponents'] = 'Није могуће преузети компоненте.';
@@ -39,6 +42,7 @@ $string['cannotsavemd5file'] = 'Није могуће сачувати md5 да
$string['cannotsavezipfile'] = 'Није могуће сачувти ZIP архиву.';
$string['cannotunzipfile'] = 'Није могуће распаковати ZIP датотеку.';
$string['componentisuptodate'] = 'Компонента је доступна у својој најновијој верзији';
$string['dmlexceptiononinstall'] = '<p>Дошло је до грешке везане за базу података [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'Није успела провера преузете датотеке';
$string['invalidmd5'] = 'Неисправна md5 датотека';
$string['missingrequiredfield'] = 'Недостаје неко обавезно поље';
+4
View File
@@ -30,6 +30,9 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p>Nije moguće kreirati bazu podataka.</p>
<p>Specificirana baza ne postoji i dati korisnik nema prava da je kreira.</p>
<p>Administrator sajta bi trebao da proveri podešavanja baze.</p>';
$string['cannotcreatelangdir'] = 'Nije moguće kreirati direktorijum jezika';
$string['cannotcreatetempdir'] = 'Nije moguće kreirati privremeni direktorijum';
$string['cannotdownloadcomponents'] = 'Nije moguće preuzeti komponente.';
@@ -39,6 +42,7 @@ $string['cannotsavemd5file'] = 'Nije moguće sačuvati md5 datoteku.';
$string['cannotsavezipfile'] = 'Nije moguće sačuvti ZIP arhivu.';
$string['cannotunzipfile'] = 'Nije moguće raspakovati ZIP datoteku.';
$string['componentisuptodate'] = 'Komponenta je dostupna u svojoj najnovijoj verziji';
$string['dmlexceptiononinstall'] = '<p>Došlo je do greške vezane za bazu podataka [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'Nije uspela provera preuzete datoteke';
$string['invalidmd5'] = 'Neispravna md5 datoteka';
$string['missingrequiredfield'] = 'Nedostaje neko obavezno polje';
+1
View File
@@ -856,6 +856,7 @@ $string['questioncwqpfscheck'] = 'One or more \'random\' questions in a quiz are
$string['questioncwqpfsok'] = 'Good. There are no \'random\' questions in your quizzes that are set up to select questions from a mixture of shared and unshared question categories.';
$string['questiontype'] = 'Question type';
$string['questiontypes'] = 'Question types';
$string['quizattemptsupgradedmessage'] = 'In Moodle 2.1 there was a major upgrade to questions. It was possible to delay parts of the database upgrade to be run later. Before upgrading to Moodle 2.7, this upgrade must be completed.';
$string['recaptchaprivatekey'] = 'ReCAPTCHA private key';
$string['recaptchapublickey'] = 'ReCAPTCHA public key';
$string['register'] = 'Register your site';
+4 -3
View File
@@ -15,15 +15,16 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This is a one-line short description of the file
* This is a place to put custom environment checks, if there is not a better place.
*
* This library contains a collection of functions able to perform
* some custom checks executed by environmental tests (automatically
* executed on install & upgrade and under petition in the admin block).
*
* Any function in this library must return:
* Any function in this library gets a environment_results object passed in.
* It must return:
* - null: if the test isn't relevant and must not be showed (ignored)
* - environment_results object with the status set to:
* - the environment_results object that was passed in, with the status set to:
* - true: if passed
* - false: if failed
*
+6 -6
View File
@@ -1108,7 +1108,7 @@ class environment_results {
*/
var $part;
/**
* @var bool
* @var bool true means the test passed and all is OK. false means it failed.
*/
var $status;
/**
@@ -1165,11 +1165,11 @@ class environment_results {
/**
* Set the status
*
* @param boolean $status the status (true/false)
* @param bool $testpassed true means the test passed and all is OK. false means it failed.
*/
function setStatus($status) {
$this->status=$status;
if ($status) {
function setStatus($testpassed) {
$this->status = $testpassed;
if ($testpassed) {
$this->setErrorCode(NO_ERROR);
}
}
@@ -1259,7 +1259,7 @@ class environment_results {
/**
* Get the status
*
* @return boolean result
* @return bool true means the test passed and all is OK. false means it failed.
*/
function getStatus() {
return $this->status;
+55
View File
@@ -1,8 +1,63 @@
Version history:
3.2.17
------
- #75 set the child display list different when a gradient is set.
- The clip property 'bufferLength' now accepts decimal values, for example bufferLength: 0.2
- #121 XSS fix: Only load plugins and external config from the same domain as the player swf is loaded from
- Made it possible to tab out of the player and into the HTML page using the keyboard alone.
- Change links in the context menu and in the logos to point to http://flash.flowplayer.org
- Pausing a live stream now leaves the video frame visible #81
- Audio plugin is not loaded nor used when the the provider is set excplicitly in the clip to a non-audio value, for
example to 'http'
- Allow playing another instream clip while already playing one. Issue #131
- Fixed memory leaks related to repeatedly starting playback with the play() API method. #163
3.2.16
------
- new clip event onMetadataChange, dispatched for example when switching bitrate
Fixes:
- Shows logo in accelerated mode #20
- mid-rolls freeze if multiple providers are used #42
- onFire fired twice on replay #52
- rtmp + hw accel + instream clips lose video, or aspect ratio #44
- URL name parts containing semi-colons (;) should pass validation through linkUrl usage #53
- cuepoints fired multiple times with the bitrateselect plugin #50
- fix for dispatching onBegin in certain situations
- if onStart has been dispatched already prevent dispatching many onBegin events
3.2.15
------
- #15 fixes for #627, handle the display init on startup.
- #615 dispatch begin if in paused mode too early.
- #629 if start has been dispatched already prevent dispatching many begin events.
- #20 for the free player swap the logo with the stage video mask to display underneath not on top.
- #42 pass in stream clips through and close the stream before returning to the parent clip.
- #52 when replaying flag start has dispatched on the current clip.
- #44 fixes for #627 check if the stagevideo dimensions and positioning has changed to update the stage video mask with.
- unbinding and binding stage video events caused issues with instream playlists therefore has to be kept binded.
- unbinded stage video events during seeking to prevent the mask repositioning.
- #53 update url filter to accomodate for pretty urls with semi colons.
- #50 if we have metadata already set it is being updated during seeks and switching, dispatch metadata change events instead.
3.2.14
------
- #614 when the clip ends if the next clip in the provider has a different provider close the provider stream.
- #627 only detach / attach the display on start events which causes issues in buffering events after a seek in stagevideo.
- #627 re-enable stagevideo state change listeners if stagevideo is available or detach the fullscreen events on first call.
- #9 when replaying from stopping, connection does not receive callbacks anymore.
3.2.13
------
- Updated to automatically load the latest controls and audio plugins
- #612 add some logging for the stagevideo render state to determine what mode the hardware acceleration is in for various systems.
- #628 opera browsers do not return filesize correctly for latest flash players so require to use load completion instead which may help with gzipped files also.
3.2.12
------
+1
View File
@@ -7,6 +7,7 @@ Version history:
- #582 fixes for metadata events dispatching in playlists and when replaying same audio item, cleanup duration updating once download has completed,
fixes for clearing the previous cover image display.
- #611 close the channel and sound on stream not found errors.
- #614 fixes for auto buffering issues where a sound channel may not be active yet.
3.2.9
-----
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+6 -6
View File
@@ -1908,9 +1908,9 @@ M.util.load_flowplayer = function() {
for(var i=0; i<M.util.video_players.length; i++) {
var video = M.util.video_players[i];
if (video.width > 0 && video.height > 0) {
var src = {src: M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.14.swf', width: video.width, height: video.height};
var src = {src: M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.18.swf', width: video.width, height: video.height};
} else {
var src = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.14.swf';
var src = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.18.swf';
}
flowplayer(video.id, src, {
plugins: {controls: controls},
@@ -2010,17 +2010,17 @@ M.util.load_flowplayer = function() {
controls.height = 25;
controls.time = true;
}
flowplayer(audio.id, M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.14.swf', {
plugins: {controls: controls, audio: {url: M.cfg.wwwroot + '/lib/flowplayer/flowplayer.audio-3.2.10.swf'}},
flowplayer(audio.id, M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.18.swf', {
plugins: {controls: controls, audio: {url: M.cfg.wwwroot + '/lib/flowplayer/flowplayer.audio-3.2.11.swf'}},
clip: {url: audio.fileurl, provider: "audio", autoPlay: false}
});
}
}
if (M.cfg.jsrev == -1) {
var jsurl = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.11.js';
var jsurl = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.13.js';
} else {
var jsurl = M.cfg.wwwroot + '/lib/javascript.php?jsfile=/lib/flowplayer/flowplayer-3.2.11.min.js&rev=' + M.cfg.jsrev;
var jsurl = M.cfg.wwwroot + '/lib/javascript.php?jsfile=/lib/flowplayer/flowplayer-3.2.13.min.js&rev=' + M.cfg.jsrev;
}
var fileref = document.createElement('script');
fileref.setAttribute('type','text/javascript');
+1 -1
View File
@@ -88,7 +88,7 @@
<location>flowplayer</location>
<name>Flowplayer</name>
<license>GPL</license>
<version>3.2.14</version>
<version>3.2.18</version>
<licenseversion>3</licenseversion>
</library>
<library>
+5
View File
@@ -52,6 +52,11 @@ if (!isloggedin()) {
$PAGE->set_cm($cm, $course, $chat);
$PAGE->set_url('/mod/chat/chat_ajax.php', array('chat_sid'=>$chat_sid));
require_login($course, false, $cm);
$context = context_module::instance($cm->id);
require_capability('mod/chat:chat', $context);
ob_start();
header('Expires: Sun, 28 Dec 1997 09:32:45 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
+2 -2
View File
@@ -176,8 +176,8 @@ if ((empty($cm->visible) AND
//check, if the feedback is open (timeopen, timeclose)
$checktime = time();
$feedback_is_closed = ($feedback->timeopen > $checktime) OR
($feedback->timeclose < $checktime AND
$feedback_is_closed = ($feedback->timeopen > $checktime) ||
($feedback->timeclose < $checktime &&
$feedback->timeclose > 0);
if ($feedback_is_closed) {
+2 -2
View File
@@ -177,8 +177,8 @@ if ((empty($cm->visible) AND
//check, if the feedback is open (timeopen, timeclose)
$checktime = time();
$feedback_is_closed = ($feedback->timeopen > $checktime) OR
($feedback->timeclose < $checktime AND
$feedback_is_closed = ($feedback->timeopen > $checktime) ||
($feedback->timeclose < $checktime &&
$feedback->timeclose > 0);
if ($feedback_is_closed) {
+10 -1
View File
@@ -83,9 +83,14 @@ class mod_forum_renderer extends plugin_renderer_base {
*/
public function subscriber_overview($users, $forum , $course) {
$output = '';
$modinfo = get_fast_modinfo($course);
if (!$users || !is_array($users) || count($users)===0) {
$output .= $this->output->heading(get_string("nosubscribers", "forum"));
} else if (!isset($modinfo->instances['forum'][$forum->id])) {
$output .= $this->output->heading(get_string("invalidmodule", "error"));
} else {
$cm = $modinfo->instances['forum'][$forum->id];
$canviewemail = in_array('email', get_extra_user_fields(context_module::instance($cm->id)));
$output .= $this->output->heading(get_string("subscribersto","forum", "'".format_string($forum->name)."'"));
$table = new html_table();
$table->cellpadding = 5;
@@ -93,7 +98,11 @@ class mod_forum_renderer extends plugin_renderer_base {
$table->tablealign = 'center';
$table->data = array();
foreach ($users as $user) {
$table->data[] = array($this->output->user_picture($user, array('courseid'=>$course->id)), fullname($user), $user->email);
$info = array($this->output->user_picture($user, array('courseid'=>$course->id)), fullname($user));
if ($canviewemail) {
array_push($info, $user->email);
}
$table->data[] = $info;
}
$output .= html_writer::table($table);
}
+1 -1
View File
@@ -1018,7 +1018,7 @@ function quiz_question_tostring($question, $showicon = false,
$questiontext = shorten_text($questiontext, 200);
$result .= '<span class="questiontext">';
if (!empty($questiontext)) {
$result .= $questiontext;
$result .= s($questiontext);
} else {
$result .= '<span class="error">';
$result .= get_string('questiontextisempty', 'quiz');
+6 -1
View File
@@ -157,10 +157,15 @@ class quiz_override_form extends moodleform {
}
$userchoices = array();
$canviewemail = in_array('email', get_extra_user_fields($this->context));
foreach ($users as $id => $user) {
if (empty($invalidusers[$id]) || (!empty($override) &&
$id == $override->userid)) {
$userchoices[$id] = fullname($user) . ', ' . $user->email;
if ($canviewemail) {
$userchoices[$id] = fullname($user) . ', ' . $user->email;
} else {
$userchoices[$id] = fullname($user);
}
}
}
unset($users);
+12
View File
@@ -82,4 +82,16 @@ class mod_quiz_editlib_testcase extends basic_testcase {
$this->assertEquals(quiz_add_page_break_at('1,2,0', 2), '1,2,0,0');
$this->assertEquals(quiz_add_page_break_at('1,2,0', 3), '1,2,0');
}
public function test_quiz_question_tostring() {
$question = new stdClass();
$question->qtype = 'multichoice';
$question->name = 'The question name';
$question->questiontext = '<p>What sort of <b>inequality</b> is x &lt; y<img alt="?" src="..."></p>';
$question->questiontextformat = FORMAT_HTML;
$summary = quiz_question_tostring($question);
$this->assertEquals('<span class="questionname">The question name</span>' .
'<span class="questiontext">What sort of INEQUALITY is x &lt; y[?]</span>', $summary);
}
}
+3
View File
@@ -55,6 +55,9 @@ if (!$wiki = wiki_get_wiki($subwiki->wikiid)) {
require_login($course, true, $cm);
if (!wiki_user_can_view($subwiki, $wiki)) {
print_error('cannotviewpage', 'wiki');
}
$context = context_module::instance($cm->id);
require_capability('mod/wiki:managewiki', $context);
+4
View File
@@ -59,6 +59,10 @@ $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST)
require_login($course, true, $cm);
if (!wiki_user_can_view($subwiki, $wiki)) {
print_error('cannotviewpage', 'wiki');
}
add_to_log($course->id, 'wiki', 'comments', "comments.php?pageid=".$pageid, $pageid, $cm->id);
/// Print the page header
+1
View File
@@ -77,6 +77,7 @@ class mod_wiki_create_form extends moodleform {
$groupname = $groupinfo[$groupid];
$mform->addElement('static', 'groupdesciption', get_string('group'), $groupname);
$mform->addElement('hidden', 'groupinfo', $groupid);
$mform->setType('groupinfo', PARAM_INT);
}
}
+4
View File
@@ -68,6 +68,10 @@ if ($compare >= $comparewith) {
require_login($course, true, $cm);
if (!wiki_user_can_view($subwiki, $wiki)) {
print_error('cannotviewpage', 'wiki');
}
$wikipage = new page_wiki_diff($wiki, $subwiki, $cm);
$wikipage->set_page($page);
+4 -1
View File
@@ -75,7 +75,10 @@ if (!empty($section) && !$sectioncontent = wiki_get_section_page($page, $section
require_login($course, true, $cm);
$context = context_module::instance($cm->id);
require_capability('mod/wiki:editpage', $context);
if (!wiki_user_can_edit($subwiki)) {
print_error('cannoteditpage', 'wiki');
}
if ($option == get_string('save', 'wiki')) {
if (!confirm_sesskey()) {
+4
View File
@@ -54,6 +54,10 @@ if (!$wiki = wiki_get_wiki($subwiki->wikiid)) {
}
require_login($course, true, $cm);
if (!wiki_user_can_view($subwiki, $wiki)) {
print_error('cannotviewpage', 'wiki');
}
$editcomments = new page_wiki_editcomment($wiki, $subwiki, $cm);
$comment = new stdClass();
if ($action == 'edit') {
+7 -7
View File
@@ -78,7 +78,11 @@ $context = context_module::instance($cm->id);
$PAGE->set_url('/mod/wiki/files.php', array('pageid'=>$pageid));
require_login($course, true, $cm);
$PAGE->set_context($context);
if (!wiki_user_can_view($subwiki, $wiki)) {
print_error('cannotviewfiles', 'wiki');
}
$PAGE->set_title(get_string('wikifiles', 'wiki'));
$PAGE->set_heading(get_string('wikifiles', 'wiki'));
$PAGE->navbar->add(format_string(get_string('wikifiles', 'wiki')));
@@ -93,12 +97,8 @@ echo $renderer->tabs($page, $tabitems, $options);
echo $OUTPUT->box_start('generalbox');
if (has_capability('mod/wiki:viewpage', $context)) {
echo $renderer->wiki_print_subwiki_selector($PAGE->activityrecord, $subwiki, $page, 'files');
echo $renderer->wiki_files_tree($context, $subwiki);
} else {
echo $OUTPUT->notification(get_string('cannotviewfiles', 'wiki'));
}
echo $renderer->wiki_print_subwiki_selector($PAGE->activityrecord, $subwiki, $page, 'files');
echo $renderer->wiki_files_tree($context, $subwiki);
echo $OUTPUT->box_end();
if (has_capability('mod/wiki:managefiles', $context)) {
+4
View File
@@ -53,6 +53,10 @@ $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST)
$context = context_module::instance($cm->id);
require_login($course, true, $cm);
if (!wiki_user_can_view($subwiki, $wiki)) {
print_error('cannotviewpage', 'wiki');
}
require_capability('mod/wiki:managefiles', $context);
if (empty($returnurl)) {
+5 -2
View File
@@ -59,8 +59,11 @@ if (!$cm = get_coursemodule_from_instance('wiki', $wiki->id)) {
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
require_login($course, true, $cm);
$context = context_module::instance($cm->id);
require_capability('mod/wiki:viewpage', $context);
if (!wiki_user_can_view($subwiki, $wiki)) {
print_error('cannotviewpage', 'wiki');
}
add_to_log($course->id, 'wiki', 'history', "history.php?pageid=".$pageid, $pageid, $cm->id);
/// Print the page header
+11 -34
View File
@@ -279,7 +279,7 @@ function wiki_supports($feature) {
function wiki_print_recent_activity($course, $viewfullnames, $timestart) {
global $CFG, $DB, $OUTPUT;
$sql = "SELECT p.*, w.id as wikiid, sw.groupid
$sql = "SELECT p.id, p.timemodified, p.subwikiid, sw.wikiid, w.wikimode, sw.userid, sw.groupid
FROM {wiki_pages} p
JOIN {wiki_subwikis} sw ON sw.id = p.subwikiid
JOIN {wiki} w ON w.id = sw.wikiid
@@ -288,48 +288,25 @@ function wiki_print_recent_activity($course, $viewfullnames, $timestart) {
if (!$pages = $DB->get_records_sql($sql, array($timestart, $course->id))) {
return false;
}
$modinfo = get_fast_modinfo($course);
require_once($CFG->dirroot . "/mod/wiki/locallib.php");
$wikis = array();
$modinfo = get_fast_modinfo($course);
$subwikivisible = array();
foreach ($pages as $page) {
if (!isset($modinfo->instances['wiki'][$page->wikiid])) {
// not visible
continue;
if (!isset($subwikivisible[$page->subwikiid])) {
$subwiki = (object)array('id' => $page->subwikiid, 'wikiid' => $page->wikiid,
'groupid' => $page->groupid, 'userid' => $page->userid);
$wiki = (object)array('id' => $page->wikiid, 'course' => $course->id, 'wikimode' => $page->wikimode);
$subwikivisible[$page->subwikiid] = wiki_user_can_view($subwiki, $wiki);
}
$cm = $modinfo->instances['wiki'][$page->wikiid];
if (!$cm->uservisible) {
continue;
if ($subwikivisible[$page->subwikiid]) {
$wikis[] = $page;
}
$context = context_module::instance($cm->id);
if (!has_capability('mod/wiki:viewpage', $context)) {
continue;
}
$groupmode = groups_get_activity_groupmode($cm, $course);
if ($groupmode) {
if ($groupmode == SEPARATEGROUPS and !has_capability('mod/wiki:managewiki', $context)) {
// separate mode
if (isguestuser()) {
// shortcut
continue;
}
if (is_null($modinfo->groups)) {
$modinfo->groups = groups_get_user_groups($course->id); // load all my groups and cache it in modinfo
}
if (!in_array($page->groupid, $modinfo->groups[0])) {
continue;
}
}
}
$wikis[] = $page;
}
unset($subwikivisible);
unset($pages);
if (!$wikis) {
+19 -5
View File
@@ -719,13 +719,27 @@ function wiki_parser_get_token($markup, $name) {
/**
* Checks if current user can view a subwiki
*
* @param $subwiki
* @param stdClass $subwiki usually record from {wiki_subwikis}. Must contain fields 'wikiid', 'groupid', 'userid'.
* If it also contains fields 'course' and 'groupmode' from table {wiki} it will save extra DB query.
* @param stdClass $wiki optional wiki object if known
* @return bool
*/
function wiki_user_can_view($subwiki) {
function wiki_user_can_view($subwiki, $wiki = null) {
global $USER;
$wiki = wiki_get_wiki($subwiki->wikiid);
$cm = get_coursemodule_from_instance('wiki', $wiki->id);
if (empty($wiki) || $wiki->id != $subwiki->wikiid) {
$wiki = wiki_get_wiki($subwiki->wikiid);
}
$modinfo = get_fast_modinfo($wiki->course);
if (!isset($modinfo->instances['wiki'][$subwiki->wikiid])) {
// Module does not exist.
return false;
}
$cm = $modinfo->instances['wiki'][$subwiki->wikiid];
if (!$cm->uservisible) {
// The whole module is not visible to the current user.
return false;
}
$context = context_module::instance($cm->id);
// Working depending on activity groupmode
@@ -767,7 +781,7 @@ function wiki_user_can_view($subwiki) {
// Each person owns a wiki.
if ($wiki->wikimode == 'collaborative' || $wiki->wikimode == 'individual') {
// Only members of subwiki group could view that wiki
if (groups_is_member($subwiki->groupid)) {
if (in_array($subwiki->groupid, $modinfo->get_groups($cm->groupingid))) {
// Only view capability needed
return has_capability('mod/wiki:viewpage', $context);
+3 -2
View File
@@ -68,8 +68,9 @@ if (!empty($section) && !$sectioncontent = wiki_get_section_page($page, $section
require_login($course, false, $cm);
$context = context_module::instance($cm->id);
require_capability('mod/wiki:editpage', $context);
if (!wiki_user_can_edit($subwiki)) {
print_error('cannoteditpage', 'wiki');
}
$wikipage = new page_wiki_lock($wiki, $subwiki, $cm);
$wikipage->set_page($page);
+4 -2
View File
@@ -54,8 +54,10 @@ if (!$wiki = wiki_get_wiki($subwiki->wikiid)) {
}
require_login($course, true, $cm);
$context = context_module::instance($cm->id);
require_capability('mod/wiki:viewpage', $context);
if (!wiki_user_can_view($subwiki, $wiki)) {
print_error('cannotviewpage', 'wiki');
}
$wikipage = new page_wiki_map($wiki, $subwiki, $cm);
add_to_log($course->id, "wiki", "map", "map.php?pageid=".$pageid, $pageid, $cm->id);
+5 -4
View File
@@ -64,13 +64,14 @@ if (!empty($section) && !$sectioncontent = wiki_get_section_page($page, $section
require_login($course, true, $cm);
require_sesskey();
if (!wiki_user_can_view($subwiki, $wiki)) {
print_error('cannotviewpage', 'wiki');
}
$context = context_module::instance($cm->id);
require_capability('mod/wiki:overridelock', $context);
if (!confirm_sesskey()) {
print_error(get_string('invalidsesskey', 'wiki'));
}
$wikipage = new page_wiki_overridelocks($wiki, $subwiki, $cm);
$wikipage->set_page($page);
+3 -2
View File
@@ -53,8 +53,9 @@ if (!$wiki = wiki_get_wiki($subwiki->wikiid)) {
require_login($course, true, $cm);
$context = context_module::instance($cm->id);
require_capability('mod/wiki:viewpage', $context);
if (!wiki_user_can_view($subwiki, $wiki)) {
print_error('cannotviewpage', 'wiki');
}
$wikipage = new page_wiki_prettyview($wiki, $subwiki, $cm);
+4
View File
@@ -60,6 +60,10 @@ $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST)
require_login($course, true, $cm);
if (!wiki_user_can_view($subwiki)) {
print_error('cannotviewpage', 'wiki');
}
if ($confirm) {
if (!confirm_sesskey()) {
print_error(get_string('invalidsesskey', 'wiki'));
+5 -1
View File
@@ -45,12 +45,16 @@ if (!$gid = groups_get_activity_group($cm)) {
$gid = 0;
}
if (!$subwiki = wiki_get_subwiki_by_group($cm->instance, $gid)) {
return false;
print_error('incorrectsubwikiid', 'wiki');
}
if (!$wiki = wiki_get_wiki($subwiki->wikiid)) {
print_error('incorrectwikiid', 'wiki');
}
if (!wiki_user_can_view($subwiki, $wiki)) {
print_error('cannotviewfiles', 'wiki');
}
$wikipage = new page_wiki_search($wiki, $subwiki, $cm);
$wikipage->set_search_string($search, $searchcontent);
+4 -2
View File
@@ -271,8 +271,9 @@ if ($id) {
print_error('incorrectparameters');
}
$context = context_module::instance($cm->id);
require_capability('mod/wiki:viewpage', $context);
if (!wiki_user_can_view($subwiki, $wiki)) {
print_error('cannotviewpage', 'wiki');
}
// Update 'viewed' state if required by completion system
require_once($CFG->libdir . '/completionlib.php');
@@ -297,6 +298,7 @@ if ($id) {
$wikipage->set_gid($currentgroup);
$wikipage->set_page($page);
$context = context_module::instance($cm->id);
if($pageid) {
add_to_log($course->id, 'wiki', 'view', "view.php?pageid=".$pageid, $pageid, $cm->id);
} else if($id) {
+4
View File
@@ -60,6 +60,10 @@ $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST)
require_login($course, true, $cm);
if (!wiki_user_can_view($subwiki, $wiki)) {
print_error('cannotviewpage', 'wiki');
}
$wikipage = new page_wiki_viewversion($wiki, $subwiki, $cm);
$wikipage->set_page($page);
+29
View File
@@ -621,3 +621,32 @@ class question_deleted_question_attempt_updater extends question_qtype_attempt_u
$data['upgradedfromdeletedquestion'] = $state->answer;
}
}
/**
* This check verifies that all quiz attempts were upgraded since following
* the question engine upgrade in Moodle 2.1.
*
* @param environment_results object to update, if relevant.
* @return environment_results updated results object, or null if this test is not relevant.
*/
function quiz_attempts_upgraded(environment_results $result) {
global $DB;
$dbman = $DB->get_manager();
$table = new xmldb_table('quiz_attempts');
$field = new xmldb_field('needsupgradetonewqe');
if (!$dbman->table_exists($table) || !$dbman->field_exists($table, $field)) {
// DB already upgraded. This test is no longer relevant.
return null;
}
if (!$DB->record_exists('quiz_attempts', array('needsupgradetonewqe' => 1))) {
// No 1s present in that column means there are no problems.
return null;
}
// Only display anything if the admins need to be aware of the problem.
$result->setStatus(false);
return $result;
}
+57
View File
@@ -0,0 +1,57 @@
<?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/>.
/**
* Upgrade.
*
* @package repository_alfresco
* @copyright 2014 Frédéric Massart
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Upgrade function.
*
* @param int $oldversion the version we are upgrading from.
* @return bool result
*/
function xmldb_repository_alfresco_upgrade($oldversion) {
global $CFG, $DB;
$dbman = $DB->get_manager();
if ($oldversion < 2014020301) {
require_once($CFG->dirroot . '/repository/lib.php');
require_once($CFG->dirroot . '/repository/alfresco/db/upgradelib.php');
$params = array();
$params['context'] = array();
$params['onlyvisible'] = false;
$params['type'] = 'alfresco';
$instances = repository::get_instances($params);
// Notify the admin about the migration process if they are using the repo.
if (!empty($instances)) {
repository_alfresco_admin_security_key_notice();
}
upgrade_plugin_savepoint(true, 2014020301, 'repository', 'alfresco');
}
return true;
}
+53
View File
@@ -0,0 +1,53 @@
<?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/>.
/**
* Locallib.
*
* @package repository_alfresco
* @copyright 2014 Frédéric Massart
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Send a message to the admin in regard with the APIv1 migration.
*
* @return void
*/
function repository_alfresco_admin_security_key_notice() {
$admins = get_admins();
if (empty($admins)) {
return;
}
foreach ($admins as $admin) {
$message = new stdClass();
$message->component = 'moodle';
$message->name = 'notices';
$message->userfrom = get_admin();
$message->userto = $admin;
$message->smallmessage = get_string('security_key_notice_message_small', 'repository_alfresco');
$message->subject = get_string('security_key_notice_message_subject', 'repository_alfresco');
$message->fullmessage = get_string('security_key_notice_message_content', 'repository_alfresco');
$message->fullmessagehtml = get_string('security_key_notice_message_content', 'repository_alfresco');
$message->fullmessageformat = FORMAT_PLAIN;
$message->notification = 1;
message_send($message);
}
}
@@ -31,6 +31,9 @@ $string['notitle'] = 'notitle';
$string['password'] = 'Password';
$string['pluginname_help'] = 'A plug-in for Alfresco CMS';
$string['pluginname'] = 'Alfresco repository';
$string['security_key_notice_message_small'] = 'Due to a recent security issue found in the Alfresco repository, we advice you to restart your Alfresco server.';
$string['security_key_notice_message_subject'] = 'Alfresco repository security notice';
$string['security_key_notice_message_content'] = 'A recent security issue was discovered when using external links to the Alfresco Moodle repository. Users were able to gain access to the accounts of other users on the Alfresco server through the use of information contained in these links (tokens). This feature has now been disabled, but it is possible that the tokens contained within these links still allow access to another user\'s account. For your own protection, it is important that you restart your Alfresco server in order to expire the tokens.';
$string['soapmustbeenabled'] = 'SOAP extension must be enabled for alfresco plugin';
$string['space'] = 'Space';
$string['username'] = 'User name';
+1 -13
View File
@@ -205,18 +205,6 @@ class repository_alfresco extends repository {
return parent::get_file($url, $file);
}
/**
* Return file URL
*
* @param string $url the url of file
* @return string
*/
public function get_link($uuid) {
$node = $this->user_session->getNode($this->store, $uuid);
$url = $this->get_url($node);
return $url;
}
public function print_search() {
$str = parent::print_search();
$str .= html_writer::label(get_string('space', 'repository_alfresco'), 'space', false, array('class' => 'accesshide'));
@@ -293,6 +281,6 @@ class repository_alfresco extends repository {
}
}
public function supported_returntypes() {
return (FILE_INTERNAL | FILE_EXTERNAL);
return FILE_INTERNAL;
}
}
+1 -1
View File
@@ -26,6 +26,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2012112900; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2014020301; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2012112900; // Requires this Moodle version
$plugin->component = 'repository_alfresco'; // Full name of the plugin (used for diagnostics)
+2 -2
View File
@@ -29,11 +29,11 @@
defined('MOODLE_INTERNAL') || die();
$version = 2012120308.00; // 20121203 = branching date YYYYMMDD - do not modify!
$version = 2012120309.00; // 20121203 = branching date YYYYMMDD - do not modify!
// RR = release increments - 00 in DEV branches
// .XX = incremental changes
$release = '2.4.8 (Build: 20140113)'; // Human-friendly version name
$release = '2.4.9 (Build: 20140310)'; // Human-friendly version name
$branch = '24'; // this version's branch
$maturity = MATURITY_STABLE; // this version's maturity level