Compare commits

..

69 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) c92478291f Moodle release 2.7.10 2015-09-12 02:02:53 +02:00
Eloy Lafuente (stronk7) d430445562 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-09-12 02:02:47 +02:00
Marina Glancy 936facab28 MDL-50744 enrol_meta: fix incorrect role assign (#2) 2015-09-11 08:14:15 +08:00
rajesh Taneja 2ad7733c07 MDL-50516 behat: Back/next button reloads page
When next/back button is pressed in phantomjs/browserkit
it reload page, so adding a bug_phantomjs, so that we can
test the lesson re-attempt scenario
2015-09-10 14:53:17 +08:00
Andrew Nicols c3757ed868 Merge branch 'MDL-50852-27' of git://github.com/junpataleta/moodle into MOODLE_27_STABLE 2015-09-09 15:42:36 +08:00
Jun Pataleta f91ea3f848 MDL-50852 formslib: Fixed client-side form validation problem.
This patch fixes the problem of client validation being broken when
shortforms is not enabled. This issue is caused by moodle-core-event
module not being loaded and the broadcast parameter in the
Y.Global.publish set to 2 instead of true.
2015-09-09 15:40:39 +08:00
Mark Nelson 748d8a982b MDL-50516 mod_lesson: changes to existing behat tests 2015-09-09 15:33:05 +08:00
Mark Nelson 1d017fb8cd MDL-50516 mod_lesson: added behat tests 2015-09-09 15:33:05 +08:00
Mark Nelson b22e3e6170 MDL-50516 core_behat: added ability to go back, forward and reload the browser 2015-09-09 15:33:04 +08:00
Mark Nelson ca74203efd MDL-50516 mod_lesson: fixed issue with grade not using minquestions
It's possible to reach the end of the lesson, get your result,
click back until you get to the last question, answer it correctly
and then be awarded a result of 100%. This was because the grade
calculation would only include the questions answered, rather than
all of them in the lesson. However, you can not fix this by always
grading by the amount of questions in the lesson as some lessons
bypass certain questions depending on the answer to previous ones.
The minquestion setting can now successfully be used to prevent this
behaviour by rewording the misleading string and adding logic.
2015-09-09 15:33:04 +08:00
Mark Nelson e7288eaabe MDL-50516 mod_lesson: prevented deletion of previous attempts
The 'startlastseen' flag was removing any previous attempts
the user had from the DB. This meant that the user could
simply re-answer the question, regardless of the number
of attempts allowed.
2015-09-09 15:33:04 +08:00
Mark Nelson 3071f08591 MDL-50516 mod_lesson: prevented user from repeating question
It was possible in the lesson module for a user to
answer a question, get the result, then click back
in the browser and re-answer it, even if they exceeded
the number of attempts allowed per question.
2015-09-09 15:33:04 +08:00
Ankit Agarwal 4015226623 MDL-50173 ratings: Use proper checks to ensure ratings are viewable.
Mainly to verify groups visibility this new callback has been created.

Note this was originally 2 commits but for amending purposes they have
been squashed.
2015-09-09 04:53:35 +02:00
Andrew Nicols 0bbeac0d0d MDL-50576 mod_forum: Correct use of movedicussions cap when posting This is a partial backport of the logic added on MDL-50714 to post.php to prevent users to post to a forum without permission.
The ability to view the group dropdown was too closely related to the
movediscussions capability when posting, or editing a forum post.

The movedicussions capability should only be considered for some parts of
this logic. Users should be able to select the group to post to when
writing message, as long as they have access to that group.
2015-09-08 16:43:21 +02:00
Simey Lameze 7824b2f6d9 MDL-50576 mod_forum: prevent posting to a non-member group
Thanks Fred for the help on the issue.
2015-09-08 16:43:21 +02:00
John Okely 45f3b5302d MDL-50709 groups: Prevent XSS in grouping description 2015-09-08 12:50:12 +02:00
Petr Skoda 6e8224365f MDL-50860 core: improve creation of random strings 2015-09-08 01:09:28 +02:00
Eloy Lafuente (stronk7) a178221dcc MDL-42670 mod_assign: include missing assign/localib.php 2015-09-07 22:56:55 +02:00
Tim Lock acefd2e24f MDL-42670 mod_assign: Fix recent activity block when blind marking is on 2015-09-07 22:45:15 +02:00
Marina Glancy dff6cdc883 MDL-50744 enrol_meta: fix incorrect role assign 2015-09-07 10:29:12 +01:00
Adrian Greeve 78de2e86e8 MDL-48371 editors: Option for removing managefiles
We want to remove the managefiles button from the
editors in the wiki so that students don't delete
each others files.
2015-09-07 09:59:29 +01:00
AMOS bot e9cb74ea3c Automatically generated installer lang files 2015-09-04 00:04:17 +08:00
AMOS bot e0e0a2346a Automatically generated installer lang files 2015-09-02 00:05:38 +08:00
Marina Glancy ddd6ae29fb MDL-51131 tags: remove instances when course is deleted 2015-08-25 13:16:24 +08:00
Eloy Lafuente (stronk7) 7e5fc27be9 weekly release 2.7.9+ 2015-08-13 12:16:44 +02:00
Eloy Lafuente (stronk7) 68d9b2583a Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-08-13 12:16:39 +02:00
AMOS bot 029bb76641 Automatically generated installer lang files 2015-08-13 00:04:33 +08:00
AMOS bot b227a2c771 Automatically generated installer lang files 2015-08-13 00:04:33 +08:00
John Okely 826c79f4b2 MDL-51050 admin: Stop browsers from autofilling passwords incorrectly
Backport of MDL-45772.
2015-08-09 19:26:45 +02:00
AMOS bot 3f58ec1385 Automatically generated installer lang files 2015-08-07 00:04:12 +08:00
Andrew Nicols c66e940849 weekly release 2.7.9+ 2015-08-06 12:11:15 +08:00
Andrew Nicols 1bd23e0728 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-08-06 12:11:09 +08:00
AMOS bot ca0366e03f Automatically generated installer lang files 2015-08-06 00:04:20 +08:00
AMOS bot d0ef635c4e Automatically generated installer lang files 2015-08-06 00:04:20 +08:00
Eloy Lafuente (stronk7) 2faa6cee53 Merge branch 'MDL-50416-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2015-08-04 19:56:37 +02:00
Simey Lameze 578f992731 MDL-50416 environment: remove slasharguments warning from install 2015-08-04 09:53:05 +08:00
Ryan Wyllie 81d961ba3a MDL-50624 environment: add PHP7 as unsupported version
Added PHP7 as an unsupported version for Moodle 2.7, 2.8 and 2.9
in the environment checks
2015-08-04 01:36:33 +00:00
AMOS bot 2ef21fc1de Automatically generated installer lang files 2015-08-04 00:04:29 +08:00
AMOS bot 0b777c448a Automatically generated installer lang files 2015-07-26 00:04:10 +08:00
AMOS bot 76a37f3a42 Automatically generated installer lang files 2015-07-24 00:04:27 +08:00
AMOS bot e1a7d6b0c3 Automatically generated installer lang files 2015-07-21 00:04:43 +08:00
AMOS bot b9facf0b41 Automatically generated installer lang files 2015-07-20 00:05:16 +08:00
AMOS bot 447e895db9 Automatically generated installer lang files 2015-07-18 00:05:26 +08:00
AMOS bot 3dcc3440d1 Automatically generated installer lang files 2015-07-17 00:05:14 +08:00
Eloy Lafuente (stronk7) fa54db9c03 Moodle release 2.7.9 2015-07-03 13:38:11 +02:00
Eloy Lafuente (stronk7) a7c5b8b2c7 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-07-03 13:38:05 +02:00
Juan Leyva ffe5c78488 MDL-50130 users: Filter profile fields data in external functions 2015-06-30 19:50:48 +02:00
AMOS bot 6ac71df086 Automatically generated installer lang files 2015-07-01 00:05:08 +08:00
Dan Marsden f3e7afedb9 MDL-50614 mod_scorm: Improve validation on currentorg 2015-06-30 10:14:56 +08:00
Eloy Lafuente (stronk7) 630b8fdaea MDL-50688 lib: small cleanup + http/https coverage. 2015-06-29 17:50:23 +02:00
Petr Skoda 5673aae914 MDL-50688 lib: fix local url validation bug
Change-Id: I350bb8c9ace5cc0403f083f728c100097be7aa7e
Reviewed-on: https://review.totaralms.com/8101
Tested-by: Jenkins Automation <jenkins@totaralms.com>
Reviewed-by: Sam Hemelryk <sam.hemelryk@totaralms.com>
Reviewed-by: Alastair Munro <alastair.munro@totaralms.com>
2015-06-29 17:50:16 +02:00
AMOS bot 5b25b33fa7 Automatically generated installer lang files 2015-06-19 00:04:18 +08:00
Dan Poltawski c8a1646ab8 weekly release 2.7.8+ 2015-06-18 16:11:43 +01:00
Dan Poltawski 76cd16e6e4 Merge branch 'install_27_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_27_STABLE 2015-06-18 16:11:41 +01:00
AMOS bot f886f76e7f Automatically generated installer lang files 2015-06-17 00:04:15 +08:00
AMOS bot 2d6c0ecd0d Automatically generated installer lang files 2015-06-17 00:04:14 +08:00
Andrew Nicols 920d2d9585 Merge branch 'MDL-50380-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2015-06-16 07:59:12 +08:00
Simey Lameze 2bd8a55dfd MDL-50380 mod_wiki: fix missing parameter on wiki edit files page
Also fixing a typo on the $referer variable.
2015-06-03 16:49:55 +08:00
AMOS bot 2f6c18c88c Automatically generated installer lang files 2015-06-02 00:04:22 +08:00
AMOS bot baa9517b57 Automatically generated installer lang files 2015-05-30 00:04:15 +08:00
AMOS bot 5330c5c2d4 Automatically generated installer lang files 2015-05-29 00:04:08 +08:00
AMOS bot 30aeabb79e Automatically generated installer lang files 2015-05-27 00:03:57 +08:00
AMOS bot 2f63a6883f Automatically generated installer lang files 2015-05-23 00:04:11 +08:00
AMOS bot ebb8f60603 Automatically generated installer lang files 2015-05-22 00:03:58 +08:00
Eloy Lafuente (stronk7) 37fd0a3d81 weekly release 2.7.8+ 2015-05-21 12:37:12 +02:00
Eloy Lafuente (stronk7) 547932e130 Merge branch 'MDL-50275-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2015-05-19 17:45:33 +02:00
Dan Poltawski ee612f1ed2 MDL-50275 quiz: version bump for MDL-49941
Otherwise the new capability risk does not get loaded
2015-05-19 15:47:13 +01:00
Dan Poltawski 67ac2b0cee Merge branch 'MDL-50177_27' of git://github.com/dmonllao/moodle into MOODLE_27_STABLE 2015-05-18 13:05:02 +01:00
David Monllao a5155586fe MDL-50177 completion: Also accepting cm integer strings 2015-05-12 12:22:07 +08:00
76 changed files with 1487 additions and 220 deletions
+3
View File
@@ -1027,6 +1027,7 @@
<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>
@@ -1160,6 +1161,7 @@
<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>
@@ -1293,6 +1295,7 @@
<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>
+2
View File
@@ -46,6 +46,8 @@ $resultshtml = admin_search_settings_html($query); // case insensitive search on
echo '<form action="' . $PAGE->url->out(true) . '" method="post" id="adminsettings">';
echo '<div>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
echo prevent_form_autofill_password();
echo '</div>';
echo '<fieldset>';
echo '<div class="clearer"><!-- --></div>';
+4
View File
@@ -77,6 +77,8 @@ if (empty($SITE->fullname)) {
echo html_writer::input_hidden_params($PAGE->url);
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="return" value="'.$return.'" />';
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
echo prevent_form_autofill_password();
echo $settingspage->output_html();
@@ -119,6 +121,8 @@ if (empty($SITE->fullname)) {
echo html_writer::input_hidden_params($PAGE->url);
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="return" value="'.$return.'" />';
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
echo prevent_form_autofill_password();
echo $OUTPUT->heading($settingspage->visiblename);
echo $settingspage->output_html();
+2
View File
@@ -63,6 +63,8 @@ echo '<form action="upgradesettings.php" method="post" id="adminsettings">';
echo '<div>';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<input type="hidden" name="return" value="'.$return.'" />';
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
echo prevent_form_autofill_password();
echo '<fieldset>';
echo '<div class="clearer"><!-- --></div>';
echo $newsettingshtml;
@@ -53,8 +53,8 @@ class condition extends \core_availability\condition {
*/
public function __construct($structure) {
// Get cmid.
if (isset($structure->cm) && is_int($structure->cm)) {
$this->cmid = $structure->cm;
if (isset($structure->cm) && is_number($structure->cm)) {
$this->cmid = (int)$structure->cm;
} else {
throw new \coding_exception('Missing or invalid ->cm for completion condition');
}
+1 -1
View File
@@ -309,7 +309,7 @@ function enrol_meta_sync($courseid = NULL, $verbose = false) {
}
}
$meta->enrol_user($instance, $ue->userid, $ue->status);
$meta->enrol_user($instance, $ue->userid, null, 0, 0, $ue->status);
if ($verbose) {
mtrace(" enrolling: $ue->userid ==> $instance->courseid");
}
-1
View File
@@ -206,7 +206,6 @@ foreach ($members as $gpgid=>$groupdata) {
echo $OUTPUT->heading($groupings[$gpgid]->formattedname, 3);
$description = file_rewrite_pluginfile_urls($groupings[$gpgid]->description, 'pluginfile.php', $context->id, 'grouping', 'description', $gpgid);
$options = new stdClass;
$options->noclean = true;
$options->overflowdiv = true;
echo $OUTPUT->box(format_text($description, $groupings[$gpgid]->descriptionformat, $options), 'generalbox boxwidthnarrow boxaligncenter');
}
+2
View File
@@ -32,7 +32,9 @@ defined('MOODLE_INTERNAL') || die();
$string['clianswerno'] = 'Не';
$string['cliansweryes'] = 'Да';
$string['cliincorrectvalueerror'] = 'Грешка, некоректна стойност "{$a->value}" за "{$a->option}"';
$string['cliincorrectvalueretry'] = 'Неправилна стойност. Моля опитайте отново';
$string['clitypevalue'] = 'Тип стойност';
$string['cliyesnoprompt'] = 'Въведете y (означава да) или n (означава не)';
$string['environmentrequireinstall'] = 'Трябва да бъде инсталиран и разрешен';
$string['environmentrequireversion'] = 'Необходима е версия {$a->needed} а Вие имате {$a->current}';
+9
View File
@@ -30,6 +30,15 @@
defined('MOODLE_INTERNAL') || die();
$string['clianswerno'] = 'ο';
$string['cliansweryes'] = 'ν';
$string['cliincorrectvalueerror'] = 'Σφάλμα, λανθασμένη τιμή "{$a->value}" για το "{$a->option}"';
$string['cliincorrectvalueretry'] = 'Λανθασμένη τιμή, παρακαλώ προσπαθήστε ξανά';
$string['clitypevalue'] = 'δώσε μία τιμή';
$string['clitypevaluedefault'] = 'δώσε μία τιμή, πάτησε Enter για να χρησιμοποιήσεις τη προκαθορισμένη τιμή ({$a})';
$string['cliunknowoption'] = 'Μη αναγνωρίσιμες επιλογές:
{$a}
Παρακαλώ χρησιμοποιείστε την επιλογή --βοήθεια';
$string['cliyesnoprompt'] = 'πατώντας ν (σημαίνει ναι) αλλιώς πατώντας ο (σημαίνει όχι)';
$string['environmentrequireinstall'] = 'απαιτείται να εγκατασταθεί/ ενεργοποιηθεί';
$string['environmentrequireversion'] = 'απαιτείται η έκδοση {$a->needed} ενώ εσείς έχετε την {$a->current}';
+2 -2
View File
@@ -31,7 +31,7 @@
defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Directorio Admin';
$string['availablelangs'] = 'Lista de idiomas disponibles';
$string['availablelangs'] = 'Packs de idiomas disponibles';
$string['chooselanguagehead'] = 'Seleccionar idioma';
$string['chooselanguagesub'] = 'Por favor, seleccione un idioma para el proceso de instalación. Este idioma se usará también como idioma por defecto del sitio, si bien puede cambiarse más adelante.';
$string['clialreadyconfigured'] = 'El archivo de configuración config.php ya existe. Por favor, utilice admin/cli/install_database.php para instalar Moodle en este sitio.';
@@ -74,7 +74,7 @@ $string['pathsroparentdataroot'] = 'El directorio padre ({$a->parent}) no tiene
$string['pathssubadmindir'] = 'Muy pocos servidores web usan /admin como un URL especial para acceder a un
panel de control o algo similar. Lamentablemente, esto entra en conflicto con la ubicación estándar para las páginas de administración de Moodle. Usted puede solucionar este problema, renombrando el directorio admin en su instalación Moodle, poniendo un nuevo nombre aquí. Por ejemplo: <em> moodleadmin </em>. Esto solucionará los enlaces de administración en instalación Moodle.';
$string['pathssubdataroot'] = 'Usted necesita un espacio donde Moodle puede guardar los archivos subidos. En este directorio debe poder LEER y ESCRIBIR el usuario del servidor web (por lo general \'nobody\', \'apache\' o \'www-data\'), pero no debe poderse acceder a esta carpeta directamente a través de la web. El instalador tratará de crearla si no existe.';
$string['pathssubdirroot'] = 'Ruta completa del directorio de instalación de Moodle.';
$string['pathssubdirroot'] = '<p>Ruta completa del directorio que contiene el código de Moodle.</p>';
$string['pathssubwwwroot'] = 'Dirección web completa para acceder a Moodle. No es posible acceder a Moodle utilizando múltiples direcciones. Si su sitio tiene varias direcciones públicas debe configurar redirecciones permanentes en todas ellas, excepto en ésta. Si su sitio web es accesible tanto desde una intranet como desde Internet, escriba aquí la dirección pública y configure su DNS para que los usuarios de su intranet puedan también utilizar la dirección pública.';
$string['pathsunsecuredataroot'] = 'La ubicación de dataroot no es segura';
$string['pathswrongadmindir'] = 'El directorio admin no existe';
+1 -1
View File
@@ -45,7 +45,7 @@ $string['downloadedfilecheckfailed'] = 'Ha fallado la comprobación del archivo
$string['invalidmd5'] = 'La variable de verificación MD5 es incorrecta no es valida - trate nuevamente';
$string['missingrequiredfield'] = 'Falta algún campo necesario';
$string['remotedownloaderror'] = '<p>Falló la descarga del componente a su servidor. Se recomienda ampliamente verificar los ajustes del proxy, extensión PHP cURL.</p>
<p>Debe descargar el<a href="{$a->url}">{$a->url}</a> archivo manualmente, copiarlo en "{$a->dest}" en su servidor y descomprimirlo allí..</p>';
<p>Debe descargar el<a href="{$a->url}">{$a->url}</a> archivo manualmente, copiarlo en "{$a->dest}" en su servidor y descomprimirlo allí.</p>';
$string['wrongdestpath'] = 'Ruta de destino errónea.';
$string['wrongsourcebase'] = 'Base de fuente de URL errónea.';
$string['wrongzipfilename'] = 'Nombre de archivo ZIP erróneo.';
+1 -1
View File
@@ -31,5 +31,5 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = '';
$string['thisdirection'] = 'ltr';
$string['thisdirection'] = 'izq-a-der';
$string['thislanguage'] = 'Español - México';
-10
View File
@@ -30,17 +30,7 @@
defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Dossier d\'administration';
$string['dataroot'] = 'Dossier de données';
$string['dbprefix'] = 'Préfixe des tables';
$string['dirroot'] = 'Dossier Moodle';
$string['installation'] = 'Installation';
$string['memorylimithelp'] = '<p>La limite de mémoire de PHP sur votre serveur est actuellement de {$a}.</p> <p>Cette valeur très faible risque de générer des problèmes de manque de mémoire pour Moodle, notamment si vous utilisez beaucoup de modules et/ou si vous avez un grand nombre d\'utilisateurs.</p> <p>Il est recommandé de configurer PHP avec une limite de mémoire aussi élevée que possible, par exemple 16 Mo. Vous pouvez obtenir cela de différentes façons :
<ol>
<li>si vous en avez la possibilité, recompilez PHP avec l\'option <i>--enable-memory-limit</i>. Cela permettra à Moodle de fixer lui-même sa limite de mémoire ;</li>
<li>si vous avez accès à votre fichier « php.ini », vous pouvez attribuer au paramètre <b>memory_limit</b> une valeur comme 40M. Si vous n\'y avez pas accès, demandez à l\'administrateur de le faire pour vous ;</li>
<li>sur certains serveur, vous pouvez créer dans le dossier principal de Moodle un fichier « .htaccess » contenant cette ligne : <p><blockquote>php_value memory_limit 40M</blockquote></p> <p>Cependant, sur certains serveur, cela empêchera le fonctionnement correcte de <b>tous</b> les fichiers PHP (vous verrez s\'afficher des erreurs lors de la consultation de pages). Dans ce cas, vous devrez supprimer le fichier « .htaccess ».</li>
</ol>';
$string['phpversion'] = 'Version de PHP';
$string['phpversionhelp'] = '<p>Moodle nécessite au minimum la version 4.1.0 de PHP.</p> <p>Vous utilisez actuellement la version {$a}.</p> <p>Pour que Moodle fonctionne, vous devez mettre à jour PHP ou aller chez un hébergeur ayant une version récente de PHP.</p>';
$string['wwwroot'] = 'Adresse web';
+6
View File
@@ -30,6 +30,9 @@
defined('MOODLE_INTERNAL') || die();
$string['cannotcreatedboninstall'] = '<p>Non é posíbel crear a base de datos.</p>
<p>A base de datos especificada non existe e o usuario indicado non ten permiso para crear a base de datos.</p>
<p>O administrador do sitio debería verificar a configuración da base de datos.</p>';
$string['cannotcreatelangdir'] = 'Non se pode crear o directorio de idioma';
$string['cannotcreatetempdir'] = 'Non se pode crear un directorio temporal';
$string['cannotdownloadcomponents'] = 'Non foi posíbel descargar compoñentes';
@@ -39,9 +42,12 @@ $string['cannotsavemd5file'] = 'Non é posíbel gardar o ficheiro md5';
$string['cannotsavezipfile'] = 'Non é posíbel gardar o ficheiro ZIP';
$string['cannotunzipfile'] = 'Non é posíbel descomprimir o ficheiro';
$string['componentisuptodate'] = 'O compoñente está actualizado';
$string['dmlexceptiononinstall'] = '<p>Produciuse un erro na base de datos [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'A comprobación do ficheiro descargado non foi satisfactoria';
$string['invalidmd5'] = 'md5 non válido';
$string['missingrequiredfield'] = 'Falta algún campo obrigatorio';
$string['remotedownloaderror'] = '<p>Fallo a descarga do compoñente cara o seu servidor. Recomendase encarecidamente que verifiqoe os axustes do proxy, extensión PHP cURL.</p>
<p>Debe descargar o ficheiro <a href="{$a->url}">{$a->url}</a> manualmente, copialo en «{$a->dest}» no seu servidor e descomprimilo alí.</p>';
$string['wrongdestpath'] = 'Camiño de destino errado.';
$string['wrongsourcebase'] = 'URL da fonte errado.';
$string['wrongzipfilename'] = 'Nome de ficheiro ZIP errado.';
+1 -1
View File
@@ -35,7 +35,7 @@ $string['cannotcreatedboninstall'] = '<p>データベースを作成できませ
<p>サイト管理者はデータベース設定を確認してください。</p>';
$string['cannotcreatelangdir'] = 'langディレクトリを作成できません。';
$string['cannotcreatetempdir'] = 'tempディレクトリを作成できません。';
$string['cannotdownloadcomponents'] = 'コンポーネトをダウンロードできません。';
$string['cannotdownloadcomponents'] = 'コンポーネトをダウンロードできません。';
$string['cannotdownloadzipfile'] = 'ZIPファイルをダウンロードできません。';
$string['cannotfindcomponent'] = 'コンポーネントを見つけることができません。';
$string['cannotsavemd5file'] = 'mp5ファイルを保存できません。';
+32 -21
View File
@@ -33,10 +33,10 @@ defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Adminディレクトリ';
$string['availablelangs'] = '利用可能な言語パック';
$string['chooselanguagehead'] = '言語を選択してください。';
$string['chooselanguagesub'] = 'インストールのみに使用する言語を選択してください。この言語はサイトのデフォルト言語としても使用されます。サイト言語は、後で変更することが可能です。';
$string['clialreadyconfigured'] = '設定ファイルconfig.phpはすでに登録されています。このサイトをインストールしたい場合、admin/cli/install_database.phpを使用してください。';
$string['clialreadyinstalled'] = '設定ファイルconfig.phpは、すでに登録されています。あなたのサイトをアップグレードしたい場合、admin/cli/upgrade.phpを使用してください。';
$string['cliinstallheader'] = 'Moodle {$a} コマンドラインインストールプログラム';
$string['chooselanguagesub'] = 'インストールのみに使用する言語を選択してください。この言語はサイトのデフォルト言語としても使用されます。後でサイト言語変更することができます。';
$string['clialreadyconfigured'] = '設定ファイルconfig.phpはすでに登録されています。このサイトをインストールする場合、admin/cli/install_database.phpを使用してください。';
$string['clialreadyinstalled'] = '設定ファイルconfig.phpは、すでに登録されています。のサイトをアップグレードする場合、admin/cli/upgrade.phpを使用してください。';
$string['cliinstallheader'] = 'Moodle {$a} コマンドラインインストールプログラム';
$string['databasehost'] = 'データベースホスト :';
$string['databasename'] = 'データベース名 :';
$string['databasetypehead'] = 'データベースドライバを選択する';
@@ -45,44 +45,55 @@ $string['datarootpermission'] = 'データディレクトリパーミッショ
$string['dbprefix'] = 'テーブル接頭辞';
$string['dirroot'] = 'Moodleディレクトリ';
$string['environmenthead'] = 'あなたの環境を確認しています ...';
$string['environmentsub2'] = 'それぞれのMoodleリリースにはPHPバージョンの最小必要条件および多くの必須PHP拡張モジュールがあります。完全な環境チェックはインストールおよびアップグレードごとに実行されます。新しいPHPバージョンのインストールまたはPHP拡張モジュールの有効化に関して分からない場合、あなたのサーバ管理者に連絡してください。';
$string['environmentsub2'] = 'それぞれのMoodleリリースにはPHPバージョンの最小必要条件および多くの必須PHP拡張モジュールがあります。完全な環境チェックはインストールおよびアップグレードごとに実行されます。新しいPHPバージョンのインストールまたはPHP拡張モジュールの有効化に関して分からない場合、あなたのサーバ管理者に連絡ください。';
$string['errorsinenvironment'] = '環境チェックが失敗しました!';
$string['installation'] = 'インストレーション';
$string['langdownloaderror'] = '残念ですが、言語「 {$a} 」がインストールされていません。インストール処理は英語で継続されます。';
$string['memorylimithelp'] = '<p>現在、サーバのPHPメモリ制限が {$a} に設定されています。</p>
$string['langdownloaderror'] = '残念ですが、言語「 {$a} 」をダウンロードできませんでした。インストール処理は英語で継続されます。';
$string['memorylimithelp'] = '<p>現在、サーバのPHPメモリ制限が {$a} に設定されています。</p>
<p>この設定ではMoodleのメモリに関わるトラブルが発生する可能性があります。 特に多くのモジュールを使用したり、多くのユーザがMoodleを使用する場合にトラブルが発生します。</p>
<p>この設定ではMoodleのメモリに関わるトラブルが発生する可能性があります。 特に多くのモジュールを使用したり、多くのユーザがMoodleを使用する場合にトラブルが発生します。</p>
<p>可能でしたら、PHPのメモリ制限上限を40M以上に設定されることをお勧めします。この設定を実現するために、いくつかの方法があります:
<p>可能でしたら、PHPのメモリ制限上限を40M以上に設定されることをお勧めします。この設定を実現するために、いくつかの方法があります:
<ol>
<li>あなたがリコンパイル可能な場合、PHPを<i>--enable-memory-limit</i>オプションでコンパイルしてください。これにより、Moodle自身がメモリ制限を設定することが可能になります。</li>
<li>あなたがリコンパイル可能な場合、PHPを<i>--enable-memory-limit</i>オプションでコンパイルしてください。これにより、Moodle自身がメモリ制限を設定することが可能になります。</li>
<li>あなたがphp.iniファイルにアクセスできる場合、<b>memory_limit</b>設定を40Mのように変更することができます。php.iniファイルにアクセスできない場合、管理者に変更を依頼してください。</li>
<li>いくつかのPHPサーバでは、下記の行を含む.htaccessファイルをMoodleディレクトリに作成することができます:
<blockquote><div>php_value memory_limit 40M</div></blockquote>
<p>しかし、この設定が<b>すべての</b>PHPページの動作を妨げる場合もあります。ページ閲覧中にエラーが表示される場合、.htaccessファイルを削除してください。</p></li>
</ol>';
$string['paths'] = 'パス';
$string['pathserrcreatedataroot'] = 'データディレクトリ ({$a->dataroot}) はインストーラーで作成できません。';
$string['pathserrcreatedataroot'] = 'データディレクトリ ({$a->dataroot}) はインストーラーで作成できません。';
$string['pathshead'] = 'パスを確認する';
$string['pathsrodataroot'] = 'datarootディレクトリに書き込み権がありません。';
$string['pathsroparentdataroot'] = '親ディレクトリ ({$a->parent}) に書き込み権がありません。データディレクトリ ({$a->dataroot}) はインストーラーで作成できません。';
$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を設定してください。アドレスが正しくない場合、あなたのブラウザのURLを変更して、異なる値でインストールを再開してください。';
$string['pathsunsecuredataroot'] = 'dirrootロケーションが安全ではありません。';
$string['pathsroparentdataroot'] = '親ディレクトリ ({$a->parent}) に書き込み権がありません。データディレクトリ ({$a->dataroot}) はインストーラーで作成できません。';
$string['pathssubadmindir'] = 'まれに、コントロールパネルまたはその他の管理ツールにアクセスするためURLとして/adminディレクトリを使用しているウェブホストがあります。残念ですが、これはMoodle管理ページの標準的なロケーションと衝突します。あなたはインストール時にadminディレクトリをリネームすることができます。ここに新しいディレクトリ名を入力してください。例: <br /> <br /><b>moodleadmin</b><br /> <br />
これによりMoodleでのadminへのリンクを変更します。';
$string['pathssubdataroot'] = '<p>ユーザによってアップロードされたファイルコンテンツすべてをMoodleが保存するディレクトリです。</p>
<p>このディレクトリはウェブサーバユーザ (通常「nobody」または「apache」) から読み込みおよび書き込みできる必要があります。</p>
<p>ウェブからは直接アクセスできないようにしてください。</p>
<p>現在ディレクトリが存在しない場合、インストレーションプロセスは作成を試みます。</p';
$string['pathssubdirroot'] = '<p>Moodleコードを含むディレクトリに関するフルパスです。</p>';
$string['pathssubwwwroot'] = '<p>Moodleにアクセスすることのできるフルウェブアドレスです。例えば、ユーザがブラウザのアドレスバーに入力してMoodleにアクセスするためのアドレスです。</p>
<p>複数アドレスを使用してMoodleにアクセスすることはできません。あなたのサイトに複数アドレスからアクセスできる場合、最も簡単なアドレスを選択して、すべてのアドレスにパーマネントリダイレクトを設定してください。</p>
<p>あなたのサイトにインターネットおよび内部ネットワーク (イントラネットと呼ばれます) からアクセスできる場合、ここではパブリックアドレスを使用してください。</p>
<p>現在のアドレスが正しくない場合、あなたのブラウザのURLを変更して、異なる値でインストレーションを再開してください。</p>';
$string['pathsunsecuredataroot'] = 'dataroot ロケーションが安全ではありません。';
$string['pathswrongadmindir'] = 'adminディレクトリがありません。';
$string['phpextension'] = '{$a} PHP拡張モジュール';
$string['phpversion'] = 'PHPバージョン';
$string['phpversionhelp'] = '<p>Moodleには少なくとも 4.3.0 または 5.1.0 のPHPバージョンが必要です (5.0.x には既知の多数の問題があります)。</p>
$string['phpversionhelp'] = '<p>Moodleには少なくとも4.3.0または5.1.0のPHPバージョンが必要です (5.0.x には既知の多数の問題があります)。</p>
<p>現在、バージョン {$a} が動作しています。</p>
<p>PHPをアップグレードするか、新しいバージョンがインストールされているホストに移動してください!<br />
(5.0.x の場合、バージョン 4.4.x にダウングレードすることもできます。)</p>';
(5.0.x の場合、anataha
バージョン 4.4.x にダウングレードすることもできます。)</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'インストールが正常に完了して、あなたのコンピュータで <strong>{$a->packname} {$a->packversion}</strong> パッケージが起動されたため、このページが表示されています。おめでとうございます!';
$string['welcomep30'] = 'このリリース <strong>{$a->installername}</strong> には<strong>Moodle</strong>で環境を作成するアプリケーションが含まれています。すなわち:';
$string['welcomep40'] = 'パッケージには <strong>Moodle {$a->moodlerelease} ({$a->moodleversion})</strong> も含まれています。';
$string['welcomep50'] = 'このパッケージ内のすべてのアプリケーションの使用は個々のライセンスによって規定されています。全体の <strong>{$a->installername}</strong> パッケージは <a href="http://www.opensource.org/docs/definition_plain.html">オープンソース</a> であり、<a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>ライセンスの下で配布されています。';
$string['welcomep60'] = '次からのページはあなたのコンピュータに<strong>Moodle</strong>を簡単に設定およびセットアップする手順にしたがって進みます。あなたはデフォルトの設定を使用することも、必要に応じて任意で設定を変更することもできます。';
$string['welcomep50'] = 'このパッケージ内のすべてのアプリケーションの使用は個々のライセンスによって規定されています。全体の<strong>{$a->installername}</strong>パッケージは<a href="http://www.opensource.org/docs/definition_plain.html">オープンソース</a>であり、<a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>ライセンスの下で配布されています。';
$string['welcomep60'] = '次からのページはあなたのコンピュータに<strong>Moodle</strong>を簡単に設定およびセットアップする手順にしたがって進みます。あなたはデフォルトの設定を使用することも、必要に応じて任意で設定を変更することもできます。';
$string['welcomep70'] = '<strong>Moodle</strong>のセットアップを続けるには「次へ」ボタンをクリックしてください。';
$string['wwwroot'] = 'ウェブアドレス';
+8
View File
@@ -34,7 +34,14 @@ $string['admindirname'] = 'Директориум аdmin';
$string['availablelangs'] = 'Достапни јазични пакети';
$string['chooselanguagehead'] = 'Изберете јазик';
$string['chooselanguagesub'] = 'Изберете јазик САМО за инсталацијата. Подоцна ќе можете да изберете јазик за страницата и за корисниците.';
$string['clialreadyconfigured'] = 'Конфигурациската датотека config.php веќе постои. Ве молиме користете ја admin/cli/install_database.php за да го инсталирате Moodle на овој сајт.';
$string['clialreadyinstalled'] = 'Конфигурациската датотека config.php веќе постои. Ве молиме користете ја admin/cli/install_database.php за да го надградите Moodle за овој сајт.';
$string['cliinstallheader'] = 'Програма за инсталирање на Moodle {$a} командна линија';
$string['databasehost'] = 'Домаќин на базата на податоци';
$string['databasename'] = 'Име на базата на податоци';
$string['databasetypehead'] = 'Одбери го двигателот на базата за податоци';
$string['dataroot'] = 'Директориум';
$string['datarootpermission'] = 'Дозвола за директориумот за податоци';
$string['dbprefix'] = 'Префикс на табели';
$string['dirroot'] = 'Moodle директориум';
$string['environmenthead'] = 'Ја проверувам околината...';
@@ -58,6 +65,7 @@ $string['memorylimithelp'] = '<p>Прагот на меморијата кај P
<p><blockquote>php_value memory_limit 40M</blockquote></p>
<p>Како и да е, на некои компјутери, ова може да ги спречи <b>сите </b> PHP страници да работат (ќе забележите грешки на страниците) па ќе треба да ја преместите датотеката .htaccess.</p></li>
</ol>';
$string['pathswrongadmindir'] = 'Администраторскиот директориум не постои';
$string['phpversion'] = 'Верзија на PHP';
$string['phpversionhelp'] = '<p>На Moodle му е потребна верзија на PHP, и тоа најмалку 4.1.0. </p>
<p>Моментално работите на верзијата {$a} </p>
+44
View File
@@ -0,0 +1,44 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['clianswerno'] = 'n';
$string['cliansweryes'] = 'y';
$string['cliincorrectvalueerror'] = 'Error, valor incorrècta « {$a->value} » peu paramètre « {$a->option} »';
$string['cliincorrectvalueretry'] = 'Valor incorrècta, tornatz ensajar';
$string['clitypevalue'] = 'tipe valor';
$string['clitypevaluedefault'] = 'tipe valor, sasitz Entrada per utilizar la valor per defaut ({$a})';
$string['cliunknowoption'] = 'Opcions pas reconegudas :
{$a}.
Utilizatz l\'opcion --help.';
$string['cliyesnoprompt'] = 'Picatz y (per òc) o n (per non)';
$string['environmentrequireinstall'] = 'deu èster installat e activat';
$string['environmentrequireversion'] = 'la version {$a->needed} qu\'ei requerida ; utilizatz actuaument la version {$a->current}';
+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/>.
/**
* 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['cannotcreatedboninstall'] = '<p>Impossible de crear la banca de dadas.</p>
<p>La banca de dadas indicada n\'existeish pas e l\'utilizaire especificat a pas las autorizacions que permeton de crear ua banca de dadas.</p>.
<p>L\'administrator deu site deu repassar la configuracion de la banca de dadas.</p>';
$string['cannotcreatelangdir'] = 'Creacion deu dossièr lang impossible';
$string['cannotcreatetempdir'] = 'Creacion deu dossièr temp impossibla';
$string['cannotdownloadcomponents'] = 'Telecargament deus components impossible';
$string['cannotdownloadzipfile'] = 'Telecargament deu fichèr ZIP impossible';
$string['cannotfindcomponent'] = 'Component introbable';
$string['cannotsavemd5file'] = 'Enregistrament deu fichèr md5 impossible';
$string['cannotsavezipfile'] = 'Enregistrament deu fichèr ZIP impossible';
$string['cannotunzipfile'] = 'Descompression deu fichèr ZIP impossibla';
$string['componentisuptodate'] = 'Lo component qu\'ei a dia';
$string['dmlexceptiononinstall'] = '<p>Ua error de banca de dadas que s\'ei produsida [{$a->errorcode}].<br />{$a->debuginfo}</p>';
$string['downloadedfilecheckfailed'] = 'La verificacion deu fichèr telecargat s\'i ei mauescadut';
$string['invalidmd5'] = 'Lo còde de contraròtle md5 n\'ei pas valid';
$string['missingrequiredfield'] = 'Un camp obligatòri n\'ei pas completat';
$string['remotedownloaderror'] = '<p>Lo telecargament deu component suu vòste servidor s\'i ei mauescadut. Verificatz los reglatges de proxy. L\'extension cURL de PHP qu\'ei bravament recomandada.</p>
<p>Que\'vs cau telecargar manuaument lo fichèr <a href="{$a->url}">{$a->url}</a>, lo copiar suu vòste servidor a l\'emplaçament « {$a->dest} » e lo descompressar a aqueste endret.</p>';
$string['wrongdestpath'] = 'Camin de destinacion incorrècte';
$string['wrongsourcebase'] = 'Adreça URL de basa de la hont incorrècta';
$string['wrongzipfilename'] = 'Nom de fichèr ZIP incorrècte';
+55
View File
@@ -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['admindirname'] = 'Dossièr d\'administracion';
$string['availablelangs'] = 'Paquetatges de lenga disponibles';
$string['chooselanguagehead'] = 'Causitz ua lenga';
$string['cliinstallheader'] = 'Programa d\'installacion de Moodle {$a} en linha de comanda';
$string['databasehost'] = 'Servidor de banca de dadas';
$string['databasename'] = 'Nom de la banca de dadas';
$string['databasetypehead'] = 'Seleccionar un pilòt de banca de dadas';
$string['dataroot'] = 'Dossièr de dadas';
$string['dbprefix'] = 'Prefix de las taulas';
$string['dirroot'] = 'Dossièr Moodle';
$string['environmenthead'] = 'Verificacion de l\'environament...';
$string['errorsinenvironment'] = 'Mauescaduda de la verificacion de l\'environament !';
$string['installation'] = 'Installacion';
$string['paths'] = 'Camins';
$string['pathserrcreatedataroot'] = 'Lo dossièr de dadas ({$a->dataroot}) ne pòt pas èster creat per l\'installador.';
$string['pathshead'] = 'Confirmar los camins d\'accès';
$string['pathsrodataroot'] = 'Lo dossièr de dadas n\'ei pas accessible en escritura.';
$string['pathsunsecuredataroot'] = 'L\'emplaçament deu dossièr de dadas n\'ei pas segur';
$string['pathswrongadmindir'] = 'Lo dossièr d\'administracion n\'existeish pas';
$string['phpextension'] = 'Extension PHP {$a}';
$string['phpversion'] = 'Version de PHP';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['wwwroot'] = 'Adreça web';
@@ -30,5 +30,6 @@
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = '';
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Српски';
$string['thislanguage'] = 'Gascon';
+36
View File
@@ -0,0 +1,36 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Lenga';
$string['next'] = 'Seguent';
$string['previous'] = 'Precedent';
$string['reload'] = 'Actualizar';
+1 -1
View File
@@ -30,7 +30,7 @@
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Langue';
$string['language'] = 'Lenga';
$string['next'] = 'Seguent';
$string['previous'] = 'Precedent';
$string['reload'] = 'Actualizar';
+2 -2
View File
@@ -34,8 +34,8 @@ $string['clianswerno'] = 'n';
$string['cliansweryes'] = 's';
$string['cliincorrectvalueerror'] = 'Erro: o valor "{$a->value}" não é permitido para a opção "{$a->option}"';
$string['cliincorrectvalueretry'] = 'Valor incorreto, por favor tente novamente';
$string['clitypevalue'] = 'valor do tipo';
$string['clitypevaluedefault'] = 'valor do tipo, pressione a tecla Enter para usar o valor predefinido ({$a})';
$string['clitypevalue'] = 'introduza valor';
$string['clitypevaluedefault'] = 'introduza valor, pressione a tecla Enter para usar o valor predefinido ({$a})';
$string['cliunknowoption'] = 'Opções desconhecidas: {$a} Por favor use a opção --help';
$string['cliyesnoprompt'] = 'digite s (para sim) ou n (para não)';
$string['environmentrequireinstall'] = 'deve estar instalada e ativa';
+1 -1
View File
@@ -46,7 +46,7 @@ $string['dmlexceptiononinstall'] = '<p> Ocorreu um erro no banco de dados [{$a->
$string['downloadedfilecheckfailed'] = 'A verificação do arquivo baixado falhou';
$string['invalidmd5'] = 'A variável de verificação estava errada - tente novamente';
$string['missingrequiredfield'] = 'Faltam informações obrigatórias';
$string['remotedownloaderror'] = 'O download do componente falhou, por favor verifique as configurações do proxy. A extensão cURL do PHP é altamente recomendada.<br /><br />Você precisar baixar o <a href="{$a->url}">arquivo</a> manualmente, copiar para "{$a->dest}" e descompactar lá.';
$string['remotedownloaderror'] = '<p>O download do componente falhou, por favor verifique as configurações do proxy. A extensão cURL do PHP é altamente recomendada.<p/><p>Você precisar baixar o <a href="{$a->url}">arquivo</a> manualmente, copiar para "{$a->dest}" e descompactar lá.<p/>';
$string['wrongdestpath'] = 'Caminho do destino errado';
$string['wrongsourcebase'] = 'URL do recurso errada';
$string['wrongzipfilename'] = 'Nome do arquivo ZIP errado';
+12 -8
View File
@@ -31,11 +31,11 @@
defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Diretório admin';
$string['availablelangs'] = 'Lista de idiomas disponíveis';
$string['availablelangs'] = 'Pacotes de idioma disponíveis';
$string['chooselanguagehead'] = 'Escolha um idioma';
$string['chooselanguagesub'] = 'Por favor, escolha o idioma para a instalação.Este idioma também será utilizado como idioma padrão do site, embora você possa mudar mais tarde.';
$string['clialreadyconfigured'] = 'Arquivo config.php já existente. Por favor use admin/cli/install_database.php se você quer instalar este site';
$string['clialreadyinstalled'] = 'O arquivo config.php já existe, por favor use admin/cli/upgrade.php, se você quiser atualizar este site.';
$string['clialreadyconfigured'] = 'Arquivo config.php já existe. Por favor, use admin/cli/install_database.php para instalar o Moodle neste site.';
$string['clialreadyinstalled'] = 'Arquivo config.php já existe. Por favor use admin/cli/install_database.php para atualizar o Moodle neste site.';
$string['cliinstallheader'] = 'Programa de instalação por linha de comando do Moodle {$a}';
$string['databasehost'] = 'Host da base de dados';
$string['databasename'] = 'Nome da base de dados';
@@ -69,11 +69,15 @@ $string['pathshead'] = 'Confirme os caminhos';
$string['pathsrodataroot'] = 'O diretório de dados raiz não pode ser acessado para escrita.';
$string['pathsroparentdataroot'] = 'O diretório pai ({$a->parent}) não pode ser escrito. O diretório de dados ({$a->dataroot}) não pode ser criado pelo instalador.';
$string['pathssubadmindir'] = 'Alguns poucos webhosts usam /admin como um URL especial para acesso ao painel de controle ou outras coisas. Infelizmente isto conflita com a localizaçao padrão das páginas do administrador Moodle. Você pode corrigir isso renomeando a pasta admin na sua instalação, e colocando esse novo nome aqui. Por exemplo: <em>moodleadmin</em>. Isto irá corrigir os links das páginas do administrador Moodle.';
$string['pathssubdataroot'] = 'Você precisa de um local onde o Moodle possa salvar arquivos enviados. Este diretório deve possuir permissões de leitura e escrita pelo usuário do servidor web
(geralmente \'nobody\' ou \'apache \'), mas não deve ser acessível diretamente através da web. O instalador irá tentar criá-lo se ele não existir.';
$string['pathssubdirroot'] = 'Caminho completo do diretório para instalação do Moddle.';
$string['pathssubwwwroot'] = 'Endereço web completo onde o Moodle será acessado.
Não é possível acessar o Moodle usando múltiplos endereços. Se seu site tem múltiplos endereços públicos você deve configurar redirecionamentos permantentes em todos eles exceto esse. Se seu site é acessado tanto da Intranet como Internet, use o endereço público aqui e configure o DNS para que os usuários da Intranet possam usar o endereço público também. Se o endereço não estiver correto, por favo mude a URL no seu navegador para reiniciar a instalação com um valor diferente.';
$string['pathssubdataroot'] = '<p>Um diretório em que Moodle pode armazenar todo o conteúdo de arquivos enviados pelos usuários. </p>
<p>Este diretório deve ser legível e gravável tanto pelo usuário do servidor web (geralmente "www-data \',\' nobody \', ou\' apache\'). </p>
<p>Não deve ser diretamente acessível através da web. </p>
<p>Se o diretório não existir atualmente, o processo de instalação irá tentar criá-la. </p>';
$string['pathssubdirroot'] = '<p>Caminho completo do diretório para instalação do Moddle.</p>';
$string['pathssubwwwroot'] = '<p>O endereço completo em que Moodle pode ser acessado ou seja, o endereço que os usuários vão digitar na barra de endereços do seu navegador para acessar Moodle. </p>
<p>Não é possível acessar Moodle usando múltiplos endereços. Se o seu site é acessível através de múltiplos endereços, em seguida, escolher o mais fácil e configurar um redirecionamento permanente para cada um dos outros endereços. </p>
<p>Se o seu site é acessível tanto a partir da Internet e, a partir de uma rede interna (às vezes chamado de Intranet), em seguida, use o endereço público aqui. </p>
<p>Se o endereço atual não está correto, por favor, mude o URL na barra de endereços do navegador e reiniciar a instalação. </p>';
$string['pathsunsecuredataroot'] = 'A localização da pasta de dados não é segura.';
$string['pathswrongadmindir'] = 'Diretório Admin não existe';
$string['phpextension'] = 'Extensão PHP {$a}';
+34
View File
@@ -0,0 +1,34 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'no';
$string['thislanguage'] = 'Sørsamisk';
+34
View File
@@ -0,0 +1,34 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['parentlanguage'] = 'no';
$string['thislanguage'] = 'Lulesamisk';
+8 -8
View File
@@ -67,15 +67,15 @@ $string['pathshead'] = 'Потврди путање';
$string['pathsrodataroot'] = 'У директоријум за податке није могућ упис';
$string['pathsroparentdataroot'] = 'Није могућ упис у надређени директоријум ({$a->parent}). Инсталациони програм не може да креира директоријум за податке ({$a->dataroot}).';
$string['pathssubadmindir'] = 'Врло мали број веб сервера користи /admin као специјални URL за приступ разним подешавањима (контролни панел и сл.). Нажалост, то доводи до конфликта са стандардном локацијом за администраторске странице у Moodleu. Овај проблем можете решити тако што ћете променити име администраторског директоријума у вашој инсталацији, и овде уписати то ново име. На пример <em>moodleadmin</em>. Ово подешавање ће преправити администраторске линкове у Moodle систему.';
$string['pathssubdataroot'] = '<p>Директоријум у којем ћe Moodle чувати садржај свих датотека које су корисници поставили на сервер.</p>
<p>Овај директоријум мора да има одобрена овлашћења за читање и уписивање од стране корисника веб сервера (обично \'www-data\', \'nobody\', или \'apache\').</p>
<p>Директоријум не сме да буде директно доступан преко интернета.</p>
<p>Ако директоријум тренутно не постоји процес за инсталацију ће покушати да га креира.</p>';
$string['pathssubdataroot'] = '<p>Директоријум где ће Moodle чувати датотеке и садржај који су поставили корисници. </p>
<p>Овај директоријум треба да буде подешен тако да корисник веб сервера (обично \'nobody\' или \'apache\') може да га чита и у њега уписује.</p>
<p>Директоријум не сме бити доступан директно преко веба. </p>
<p>Уколико овај директоријум не постоји процес инсталације ће покушати да га креира.</p>';
$string['pathssubdirroot'] = '<p>Пуна путања до директоријума који садржи код Moodlea.</p>';
$string['pathssubwwwroot'] = '<p> Пуна интернет адреса путем које ће се приступати Moodleu тј. адреса коју ће корисници унети у поље за веб адресу својих читача како би приступили сајту.</p>
<p> Није могуће приступати Moodleu коришћењем више адреса. Ако се вашем сајту може приступити преко више адреса онда изаберите најлакшу и подесите перманентну редирекцију за све преостале адресе.</p>
<p>Ако је ваш сајт доступан и преко интернета и унутар локалне мреже (интранет), онда овде унесите јавну адресу.</p>
<p>Ако тренутна адреса није исправна, молимо вас промените URL у пољу за адресу вашег читача и поново покрените инсталацију.</p>';
$string['pathssubwwwroot'] = '<p>Пуна адреса путем које ће се приступати Moodleu, тј. адреса коју ће корисници унети у адресну траку својих веб читача како би приступили Moodleu.</p>
<p>Није могуће приступати Moodleu коришћењем више адреса Ако се вашем сајту може приступити са више адреса, онда изаберите најлакшу, а за све остале адресе подесите перманентну редирекцију.</p>
<p>Ако се вашем сајту може приступити са интернета али и са унутрашње мреже (која се понекад назив интранет), онда овде употребите јавну адресу.</p>
<p>Ако је текућа адреса нетачна, молимо вас, промените URL адресу у адресној траци свог веб читача и поново покрените инсталацију.</p>';
$string['pathsunsecuredataroot'] = 'Dataroot локација није безбедна';
$string['pathswrongadmindir'] = 'Админ директоријум не постоји';
$string['phpextension'] = '{$a} PHP екстензија';
+8 -8
View File
@@ -67,15 +67,15 @@ $string['pathshead'] = 'Potvrdi putanje';
$string['pathsrodataroot'] = 'U direktorijum za podatke nije moguć upis';
$string['pathsroparentdataroot'] = 'Nije moguć upis u nadređeni direktorijum ({$a->parent}). Instalacioni program ne može da kreira direktorijum za podatke ({$a->dataroot}).';
$string['pathssubadmindir'] = 'Vrlo mali broj veb servera koristi /admin kao specijalni URL za pristup raznim podešavanjima (kontrolni panel i sl.). Nažalost, to dovodi do konflikta sa standardnom lokacijom za administratorske stranice u Moodleu. Ovaj problem možete rešiti tako što ćete promeniti ime administratorskog direktorijuma u vašoj instalaciji, i ovde upisati to novo ime. Na primer <em>moodleadmin</em>. Ovo podešavanje će prepraviti administratorske linkove u Moodle sistemu.';
$string['pathssubdataroot'] = '<p>Direktorijum u kojem će Moodle čuvati sadržaj svih datoteka koje su korisnici postavili na server.</p>
<p>Ovaj direktorijum mora da ima odobrena ovlašćenja za čitanje i upisivanje od strane korisnika veb servera (obično \'www-data\', \'nobody\', ili \'apache\').</p>
<p>Direktorijum ne sme da bude direktno dostupan preko interneta.</p>
<p>Ako direktorijum trenutno ne postoji proces za instalaciju će pokušati da ga kreira.</p>';
$string['pathssubdataroot'] = '<p>Direktorijum gde će Moodle čuvati datoteke i sadržaj koji su postavili korisnici. </p>
<p>Ovaj direktorijum treba da bude podešen tako da korisnik veb servera (obično \'nobody\' ili \'apache\') može da ga čita i u njega upisuje.</p>
<p>Direktorijum ne sme biti dostupan direktno preko veba. </p>
<p>Ukoliko ovaj direktorijum ne postoji proces instalacije će pokušati da ga kreira.</p>';
$string['pathssubdirroot'] = '<p>Puna putanja do direktorijuma koji sadrži kod Moodlea.</p>';
$string['pathssubwwwroot'] = '<p> Puna internet adresa putem koje će se pristupati Moodleu tj. adresa koju će korisnici uneti u polje za veb adresu svojih čitača kako bi pristupili sajtu.</p>
<p> Nije moguće pristupati Moodleu korišćenjem više adresa. Ako se vašem sajtu može pristupiti preko više adresa onda izaberite najlakšu i podesite permanentnu redirekciju za sve preostale adrese.</p>
<p>Ako je vaš sajt dostupan i preko interneta i unutar lokalne mreže (intranet), onda ovde unesite javnu adresu.</p>
<p>Ako trenutna adresa nije ispravna, molimo vas promenite URL u polju za adresu vašeg čitača i ponovo pokrenite instalaciju.</p>';
$string['pathssubwwwroot'] = '<p>Puna adresa putem koje će se pristupati Moodleu, tj. adresa koju će korisnici uneti u adresnu traku svojih veb čitača kako bi pristupili Moodleu.</p>
<p>Nije moguće pristupati Moodleu korišćenjem više adresa Ako se vašem sajtu može pristupiti sa više adresa, onda izaberite najlakšu, a za sve ostale adrese podesite permanentnu redirekciju.</p>
<p>Ako se vašem sajtu može pristupiti sa interneta ali i sa unutrašnje mreže (koja se ponekad naziv intranet), onda ovde upotrebite javnu adresu.</p>
<p>Ako je tekuća adresa netačna, molimo vas, promenite URL adresu u adresnoj traci svog veb čitača i ponovo pokrenite instalaciju.</p>';
$string['pathsunsecuredataroot'] = 'Dataroot lokacija nije bezbedna';
$string['pathswrongadmindir'] = 'Admin direktorijum ne postoji';
$string['phpextension'] = '{$a} PHP ekstenѕija';
@@ -31,4 +31,4 @@
defined('MOODLE_INTERNAL') || die();
$string['thisdirection'] = 'ltr';
$string['thislanguage'] = 'Српски';
$string['thislanguage'] = 'Setswana';
+33
View File
@@ -0,0 +1,33 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Automatically generated strings for Moodle installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['thislanguage'] = 'བོད་ཡིག';
+11 -8
View File
@@ -50,15 +50,18 @@ $string['environmentsub2'] = '每一個Moodle版本都有一些PHP版本的最
$string['errorsinenvironment'] = '環境檢查失敗!';
$string['installation'] = '安裝';
$string['langdownloaderror'] = '很不幸地,語言“{$a}”無法下載安裝。此安裝過程將以英文繼續進行。';
$string['memorylimithelp'] = '<p>PHP記憶體上限目前設定為{$a}。</p>
<p>稍後它可能會造成Moodle記憶體的問題,尤其您啟動了很多的模組及大量的使用者後。
<p>建議您儘可能將PHP的上限設得高一點,比如16M。
以下有幾種方式您可以試試:
$string['memorylimithelp'] = '<p>你的伺服器的PHP記憶體上限目前設定為{$a}。</p>
<p>稍後它可能會造成Moodle記憶體的問題,尤其您啟動了很多的模組以及有大量的用戶之後。</p>
<p>若可能,建議您將PHP的上限設得高一點,比如40M。
以下有幾種方式您可以試試</p>
<ol>
<li>如果可以的話,用<i>--enable-memory-limit</i>重新編譯PHP。讓Moodle自己設定記憶體上限.
<li>如果您要使用php.ini檔, 您可以改變<b>memory_limit</b>這個設定值,例如到16M。如果您無法使用這個檔,您可以請的管理者幫您做
<li>在一些PHP伺服器上,您可以在Moodle目錄下,建立.htaccess檔,包含這行:<p><blockquote>php_value memory_limit 16M</blockquote></p>
<p>然而,在一些伺服器上,這將造成<b>所有的</b> PHP 網頁無法運作(當您看這些網頁時,您就會看到錯誤) 因此,您就必須將 .htaccess 檔案移除。
<li>如果可以的話,用<i>--enable-memory-limit</i>重新編譯PHP。讓Moodle自己設定記憶體上限
<li>如果您可以更改 php.ini 檔,就改變<b>memory_limit</b> 這個設定值,例如,改到40M。如果您無法更改這個檔,您可以請寄存主機的管理者幫您做。</li>
<li>在一些PHP伺服器上,您可以在Moodle目錄下,建立.htaccess檔,包含這行:
<blockquote>php_value memory_limit 40M</blockquote>
<p>然而,在某些伺服器上,這可能造成<b>所有的</b> PHP 網頁無法運作(當您查看這些網頁時,您就會看到錯誤訊息) 因此,您就必須將 .htaccess 檔案移除。</li>
</ol>';
$string['paths'] = '路徑';
$string['pathserrcreatedataroot'] = '資料目錄 ({$a->dataroot})無法由這安裝程式建立';
+1
View File
@@ -1055,6 +1055,7 @@ $string['unsettheme'] = 'Unset theme';
$string['unsupported'] = 'Unsupported';
$string['unsupporteddbstorageengine'] = 'The database storage engine being used is no longer supported.';
$string['unsupporteddbtablerowformat'] = 'Your database has tables using Antelope as the file format. You are recommended to convert the tables to the Barracuda file format. See the documentation <a href="https://docs.moodle.org/en/cli">Administration via command line</a> for details of a tool for converting InnoDB tables to Barracuda.';
$string['unsupportedphpversion7'] = 'PHP version 7 is not supported.';
$string['unsuspenduser'] = 'Activate user account';
$string['updateaccounts'] = 'Update existing accounts';
$string['updatecomponent'] = 'Update component';
+5
View File
@@ -103,6 +103,11 @@ class atto_texteditor extends texteditor {
continue;
}
// Remove manage files if requested.
if ($plugin == 'managefiles' && isset($options['enable_filemanagement']) && !$options['enable_filemanagement']) {
continue;
}
$jsplugin = array();
$jsplugin['name'] = $plugin;
$jsplugin['params'] = array();
+7
View File
@@ -108,6 +108,13 @@ class tinymce_texteditor extends texteditor {
$config->disabledsubplugins = '';
}
// Remove the manage files button if requested.
if (isset($options['enable_filemanagement']) && !$options['enable_filemanagement']) {
if (!strpos($config->disabledsubplugins, 'managefiles')) {
$config->disabledsubplugins .= ',managefiles';
}
}
$fontselectlist = empty($config->fontselectlist) ? '' : $config->fontselectlist;
$langrev = -1;
+34
View File
@@ -1513,3 +1513,37 @@ function process_environment_result($element, &$result) {
/// Process restrict, modifying $result if needed.
process_environment_restrict($element, $result);
}
/**
* Check if the current PHP version is greater than or equal to
* PHP version 7.
*
* @param object $result an environment_results instance
* @return bool result of version check
*/
function restrict_php_version_7(&$result) {
return restrict_php_version($result, '7');
}
/**
* Check if the current PHP version is greater than or equal to an
* unsupported version.
*
* @param object $result an environment_results instance
* @param string $version the version of PHP that can't be used
* @return bool result of version check
*/
function restrict_php_version(&$result, $version) {
// Get the current PHP version.
$currentversion = normalize_version(phpversion());
// Confirm we're using a supported PHP version.
if (version_compare($currentversion, $version, '<')) {
// Everything is ok, the restriction doesn't apply.
return false;
} else {
// We're using an unsupported PHP version, apply restriction.
return true;
}
}
+1 -1
View File
@@ -53,7 +53,7 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element {
/** @var array options provided to initalize filepicker */
protected $_options = array('subdirs' => 0, 'maxbytes' => 0, 'maxfiles' => 0, 'changeformat' => 0,
'areamaxbytes' => FILE_AREA_MAX_BYTES_UNLIMITED, 'context' => null, 'noclean' => 0, 'trusttext' => 0,
'return_types' => 7);
'return_types' => 7, 'enable_filemanagement' => true);
// $_options['return_types'] = FILE_INTERNAL | FILE_EXTERNAL | FILE_REFERENCE
/** @var array values for editor */
+9 -3
View File
@@ -188,6 +188,10 @@ abstract class moodleform {
$this->_form->hardFreeze();
}
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
$element = $this->_form->addElement('hidden');
$element->setType('password');
$this->definition();
$this->_form->addElement('hidden', 'sesskey', null); // automatic sesskey protection
@@ -2229,9 +2233,11 @@ function validate_' . $this->_formName . '_' . $escapedElementName . '(element)
ret = validate_' . $this->_formName . '_' . $escapedElementName.'(frm.elements[\''.$elementName.'\']) && ret;
if (!ret && !first_focus) {
first_focus = true;
Y.Global.fire(M.core.globalEvents.FORM_ERROR, {formid: \''. $this->_attributes['id'] .'\',
elementid: \'id_error_'.$elementName.'\'});
document.getElementById(\'id_error_'.$elementName.'\').focus();
Y.use(\'moodle-core-event\', function() {
Y.Global.fire(M.core.globalEvents.FORM_ERROR, {formid: \''. $this->_attributes['id'] .'\',
elementid: \'id_error_'.$elementName.'\'});
document.getElementById(\'id_error_'.$elementName.'\').focus();
});
}
';
+55 -6
View File
@@ -1033,11 +1033,15 @@ function clean_param($param, $type) {
// Simulate the HTTPS version of the site.
$httpswwwroot = str_replace('http://', 'https://', $CFG->wwwroot);
if (preg_match(':^/:', $param)) {
if ($param === $CFG->wwwroot) {
// Exact match;
} else if (!empty($CFG->loginhttps) && $param === $httpswwwroot) {
// Exact match;
} else if (preg_match(':^/:', $param)) {
// Root-relative, ok!
} else if (preg_match('/^' . preg_quote($CFG->wwwroot, '/') . '/i', $param)) {
} else if (preg_match('/^' . preg_quote($CFG->wwwroot . '/', '/') . '/i', $param)) {
// Absolute, and matches our wwwroot.
} else if (!empty($CFG->loginhttps) && preg_match('/^' . preg_quote($httpswwwroot, '/') . '/i', $param)) {
} else if (!empty($CFG->loginhttps) && preg_match('/^' . preg_quote($httpswwwroot . '/', '/') . '/i', $param)) {
// Absolute, and matches our httpswwwroot.
} else {
// Relative - let's make sure there are no tricks.
@@ -7783,14 +7787,16 @@ function count_letters($string) {
* @param int $length The length of the string to be created.
* @return string
*/
function random_string ($length=15) {
function random_string($length=15) {
$randombytes = random_bytes_emulate($length);
$pool = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$pool .= 'abcdefghijklmnopqrstuvwxyz';
$pool .= '0123456789';
$poollen = strlen($pool);
$string = '';
for ($i = 0; $i < $length; $i++) {
$string .= substr($pool, (mt_rand()%($poollen)), 1);
$rand = ord($randombytes[$i]);
$string .= substr($pool, ($rand%($poollen)), 1);
}
return $string;
}
@@ -7811,13 +7817,56 @@ function complex_random_string($length=null) {
if ($length===null) {
$length = floor(rand(24, 32));
}
$randombytes = random_bytes_emulate($length);
$string = '';
for ($i = 0; $i < $length; $i++) {
$string .= $pool[(mt_rand()%$poollen)];
$rand = ord($randombytes[$i]);
$string .= $pool[($rand%$poollen)];
}
return $string;
}
/**
* Try to generates cryptographically secure pseudo-random bytes.
*
* Note this is achieved by fallbacking between:
* - PHP 7 random_bytes().
* - OpenSSL openssl_random_pseudo_bytes().
* - In house random generator getting its entropy from various, hard to guess, pseudo-random sources.
*
* @param int $length requested length in bytes
* @return string binary data
*/
function random_bytes_emulate($length) {
global $CFG;
if ($length <= 0) {
debugging('Invalid random bytes length', DEBUG_DEVELOPER);
return '';
}
if (function_exists('random_bytes')) {
// Use PHP 7 goodness.
$hash = @random_bytes($length);
if ($hash !== false) {
return $hash;
}
}
if (function_exists('openssl_random_pseudo_bytes')) {
// For PHP 5.3 and later with openssl extension.
$hash = openssl_random_pseudo_bytes($length);
if ($hash !== false) {
return $hash;
}
}
// Bad luck, there is no reliable random generator, let's just hash some unique stuff that is hard to guess.
$hash = sha1(serialize($CFG) . serialize($_SERVER) . microtime(true) . uniqid('', true), true);
// NOTE: the last param in sha1() is true, this means we are getting 20 bytes, not 40 chars as usual.
if ($length <= 20) {
return substr($hash, 0, $length);
}
return $hash . random_bytes_emulate($length - 20);
}
/**
* Given some text (which may contain HTML) and an ideal length,
* this function truncates the text neatly on a word boundary if possible
+22
View File
@@ -1405,4 +1405,26 @@ class behat_general extends behat_base {
fwrite(STDOUT, "\033[2A\033[u\033[2B");
}
}
/**
* Presses a given button in the browser.
* NOTE: Phantomjs and goutte driver reloads page while navigating back and forward.
*
* @Then /^I press the "(back|forward|reload)" button in the browser$/
* @param string $button the button to press.
* @throws ExpectationException
*/
public function i_press_in_the_browser($button) {
$session = $this->getSession();
if ($button == 'back') {
$session->back();
} else if ($button == 'forward') {
$session->forward();
} else if ($button == 'reload') {
$session->reload();
} else {
throw new ExpectationException('Unknown browser button.', $session);
}
}
}
+65
View File
@@ -53,4 +53,69 @@ class core_environment_testcase extends advanced_testcase {
$this->assertTrue($environment_result->getStatus(), "Problem detected in environment ($environment_result->part:$environment_result->info), fix all warnings and errors!");
}
}
/**
* Test the restrict_php_version() function returns true if the current
* PHP version is greater than the restricted version
*/
public function test_restrict_php_version_greater_than_restricted_version() {
global $CFG;
require_once($CFG->libdir.'/environmentlib.php');
$result = new environment_results('php');
$delimiter = '.';
// Get the current PHP version.
$currentversion = explode($delimiter, normalize_version(phpversion()));
// Lets drop back one major version to ensure we trip the restriction.
$currentversion[0]--;
$restrictedversion = implode($delimiter, $currentversion);
// Make sure the status is true before the test to see it flip to false.
$result->setStatus(true);
$this->assertTrue(restrict_php_version($result, $restrictedversion),
'restrict_php_version returns true if the current version exceeds the restricted version');
}
/**
* Test the restrict_php_version() function returns true if the current
* PHP version is equal to the restricted version
*/
public function test_restrict_php_version_equal_to_restricted_version() {
global $CFG;
require_once($CFG->libdir.'/environmentlib.php');
$result = new environment_results('php');
// Get the current PHP version.
$currentversion = normalize_version(phpversion());
// Make sure the status is true before the test to see it flip to false.
$result->setStatus(true);
$this->assertTrue(restrict_php_version($result, $currentversion),
'restrict_php_version returns true if the current version is equal to the restricted version');
}
/**
* Test the restrict_php_version() function returns false if the current
* PHP version is less than the restricted version
*/
public function test_restrict_php_version_less_than_restricted_version() {
global $CFG;
require_once($CFG->libdir.'/environmentlib.php');
$result = new environment_results('php');
$delimiter = '.';
// Get the current PHP version.
$currentversion = explode($delimiter, normalize_version(phpversion()));
// Lets increase the major version to ensure don't trip the restriction.
$currentversion[0]++;
$restrictedversion = implode($delimiter, $currentversion);
// Make sure the status is true before the test to see it flip to false.
$result->setStatus(true);
$this->assertFalse(restrict_php_version($result, $restrictedversion),
'restrict_php_version returns false if the current version is less than the restricted version');
}
}
+106 -2
View File
@@ -583,6 +583,9 @@ class core_moodlelib_testcase extends advanced_testcase {
public function test_clean_param_localurl() {
global $CFG;
$this->resetAfterTest();
// External, invalid.
$this->assertSame('', clean_param('funny:thing', PARAM_LOCALURL));
$this->assertSame('', clean_param('http://google.com/', PARAM_LOCALURL));
@@ -600,7 +603,6 @@ class core_moodlelib_testcase extends advanced_testcase {
// Local absolute HTTPS.
$httpsroot = str_replace('http:', 'https:', $CFG->wwwroot);
$initialloginhttps = $CFG->loginhttps;
$CFG->loginhttps = false;
$this->assertSame('', clean_param($httpsroot, PARAM_LOCALURL));
$this->assertSame('', clean_param($httpsroot . '/with/something?else=true', PARAM_LOCALURL));
@@ -608,7 +610,13 @@ class core_moodlelib_testcase extends advanced_testcase {
$this->assertSame($httpsroot, clean_param($httpsroot, PARAM_LOCALURL));
$this->assertSame($httpsroot . '/with/something?else=true',
clean_param($httpsroot . '/with/something?else=true', PARAM_LOCALURL));
$CFG->loginhttps = $initialloginhttps;
// Test open redirects are not possible.
$CFG->loginhttps = false;
$CFG->wwwroot = 'http://www.example.com';
$this->assertSame('', clean_param('http://www.example.com.evil.net/hack.php', PARAM_LOCALURL));
$CFG->loginhttps = true;
$this->assertSame('', clean_param('https://www.example.com.evil.net/hack.php', PARAM_LOCALURL));
}
public function test_clean_param_file() {
@@ -2845,4 +2853,100 @@ class core_moodlelib_testcase extends advanced_testcase {
$_SERVER['HTTP_X_FORWARDED_FOR'] = $xforwardedfor;
}
/*
* Test emulation of random_bytes() function.
*/
public function test_random_bytes_emulate() {
$result = random_bytes_emulate(10);
$this->assertSame(10, strlen($result));
$this->assertnotSame($result, random_bytes_emulate(10));
$result = random_bytes_emulate(21);
$this->assertSame(21, strlen($result));
$this->assertnotSame($result, random_bytes_emulate(21));
$result = random_bytes_emulate(666);
$this->assertSame(666, strlen($result));
$this->assertDebuggingNotCalled();
$result = random_bytes_emulate(0);
$this->assertSame('', $result);
$this->assertDebuggingCalled();
$result = random_bytes_emulate(-1);
$this->assertSame('', $result);
$this->assertDebuggingCalled();
}
/**
* Test function for creation of random strings.
*/
public function test_random_string() {
$pool = 'a-zA-Z0-9';
$result = random_string(10);
$this->assertSame(10, strlen($result));
$this->assertRegExp('/^[' . $pool . ']+$/', $result);
$this->assertNotSame($result, random_string(10));
$result = random_string(21);
$this->assertSame(21, strlen($result));
$this->assertRegExp('/^[' . $pool . ']+$/', $result);
$this->assertNotSame($result, random_string(21));
$result = random_string(666);
$this->assertSame(666, strlen($result));
$this->assertRegExp('/^[' . $pool . ']+$/', $result);
$result = random_string();
$this->assertSame(15, strlen($result));
$this->assertRegExp('/^[' . $pool . ']+$/', $result);
$this->assertDebuggingNotCalled();
$result = random_string(0);
$this->assertSame('', $result);
$this->assertDebuggingCalled();
$result = random_string(-1);
$this->assertSame('', $result);
$this->assertDebuggingCalled();
}
/**
* Test function for creation of complex random strings.
*/
public function test_complex_random_string() {
$pool = preg_quote('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`~!@#%^&*()_+-=[];,./<>?:{} ', '/');
$result = complex_random_string(10);
$this->assertSame(10, strlen($result));
$this->assertRegExp('/^[' . $pool . ']+$/', $result);
$this->assertNotSame($result, complex_random_string(10));
$result = complex_random_string(21);
$this->assertSame(21, strlen($result));
$this->assertRegExp('/^[' . $pool . ']+$/', $result);
$this->assertNotSame($result, complex_random_string(21));
$result = complex_random_string(666);
$this->assertSame(666, strlen($result));
$this->assertRegExp('/^[' . $pool . ']+$/', $result);
$result = complex_random_string();
$this->assertEquals(28, strlen($result), '', 4); // Expected length is 24 - 32.
$this->assertRegExp('/^[' . $pool . ']+$/', $result);
$this->assertDebuggingNotCalled();
$result = complex_random_string(0);
$this->assertSame('', $result);
$this->assertDebuggingCalled();
$result = complex_random_string(-1);
$this->assertSame('', $result);
$this->assertDebuggingCalled();
}
}
+4
View File
@@ -1,6 +1,10 @@
This files describes API changes in core libraries and APIs,
information provided here is intended especially for developers.
=== 2.7.10 ===
* In the html_editors (tinyMCE, Atto), the manage files button can be hidden by changing the 'enable_filemanagement' option to false.
=== 2.7.6 ===
* The authorization procedure in the mdeploy.php script has been improved. The script
+1 -1
View File
@@ -2226,7 +2226,7 @@ function check_database_storage_engine(environment_results $result) {
function check_slasharguments(environment_results $result){
global $CFG;
if (empty($CFG->slasharguments)) {
if (!during_initial_install() && empty($CFG->slasharguments)) {
$result->setInfo('slasharguments');
$result->setStatus(false);
return $result;
+10
View File
@@ -3519,3 +3519,13 @@ function get_formatted_help_string($identifier, $component, $ajax = false) {
}
return $data;
}
/**
* Renders a hidden password field so that browsers won't incorrectly autofill password fields with the user's password.
*
* @since 2.7.10
* @return string HTML to prevent password autofill
*/
function prevent_form_autofill_password() {
return '<div class="hide"><input type="password" /></div>';
}
+8 -6
View File
@@ -30,7 +30,7 @@ var LOGNAME = 'moodle-core-event';
*/
M.core = M.core || {};
M.core.event = {
M.core.event = M.core.event || {
/**
* This event is triggered when a page has added dynamic nodes to a page
* that should be processed by the filter system. An example is loading
@@ -44,7 +44,7 @@ M.core.event = {
FILTER_CONTENT_UPDATED: "filter-content-updated"
};
M.core.globalEvents = {
M.core.globalEvents = M.core.globalEvents || {
/**
* This event is triggered when form has an error
*
@@ -74,15 +74,17 @@ var eventDefaultConfig = {
// Publish all the events with a standard config.
var key;
for (key in M.core.event) {
if (M.core.event.hasOwnProperty(key)) {
if (M.core.event.hasOwnProperty(key) && Y.getEvent(M.core.event[key]) === null) {
Y.publish(M.core.event[key], eventDefaultConfig);
}
}
//Publish all the global events.
// Publish global events.
for (key in M.core.globalEvents) {
if (M.core.globalEvents.hasOwnProperty(key)) {
Y.Global.publish(M.core.globalEvents[key], Y.merge(eventDefaultConfig, {broadcast: 2}));
// Make sure the key exists and that the event has not yet been published. Otherwise, skip publishing.
if (M.core.globalEvents.hasOwnProperty(key) && Y.Global.getEvent(M.core.globalEvents[key]) === null) {
Y.Global.publish(M.core.globalEvents[key], Y.merge(eventDefaultConfig, {broadcast: true}));
Y.log('Global event published: ' + key, 'debug', LOGNAME);
}
}
+1 -1
View File
@@ -1 +1 @@
YUI.add("moodle-core-event",function(e,t){var n="moodle-core-event";M.core=M.core||{},M.core.event={FILTER_CONTENT_UPDATED:"filter-content-updated"},M.core.globalEvents={FORM_ERROR:"form_error"};var r={emitFacade:!0,defaultFn:function(e){},preventedFn:function(e){},stoppedFn:function(e){}},i;for(i in M.core.event)M.core.event.hasOwnProperty(i)&&e.publish(M.core.event[i],r);for(i in M.core.globalEvents)M.core.globalEvents.hasOwnProperty(i)&&e.Global.publish(M.core.globalEvents[i],e.merge(r,{broadcast:2}))},"@VERSION@",{requires:["event-custom"]});
YUI.add("moodle-core-event",function(e,t){var n="moodle-core-event";M.core=M.core||{},M.core.event=M.core.event||{FILTER_CONTENT_UPDATED:"filter-content-updated"},M.core.globalEvents=M.core.globalEvents||{FORM_ERROR:"form_error"};var r={emitFacade:!0,defaultFn:function(e){},preventedFn:function(e){},stoppedFn:function(e){}},i;for(i in M.core.event)M.core.event.hasOwnProperty(i)&&e.getEvent(M.core.event[i])===null&&e.publish(M.core.event[i],r);for(i in M.core.globalEvents)M.core.globalEvents.hasOwnProperty(i)&&e.Global.getEvent(M.core.globalEvents[i])===null&&e.Global.publish(M.core.globalEvents[i],e.merge(r,{broadcast:!0}))},"@VERSION@",{requires:["event-custom"]});
+7 -6
View File
@@ -30,7 +30,7 @@ var LOGNAME = 'moodle-core-event';
*/
M.core = M.core || {};
M.core.event = {
M.core.event = M.core.event || {
/**
* This event is triggered when a page has added dynamic nodes to a page
* that should be processed by the filter system. An example is loading
@@ -44,7 +44,7 @@ M.core.event = {
FILTER_CONTENT_UPDATED: "filter-content-updated"
};
M.core.globalEvents = {
M.core.globalEvents = M.core.globalEvents || {
/**
* This event is triggered when form has an error
*
@@ -71,15 +71,16 @@ var eventDefaultConfig = {
// Publish all the events with a standard config.
var key;
for (key in M.core.event) {
if (M.core.event.hasOwnProperty(key)) {
if (M.core.event.hasOwnProperty(key) && Y.getEvent(M.core.event[key]) === null) {
Y.publish(M.core.event[key], eventDefaultConfig);
}
}
//Publish all the global events.
// Publish global events.
for (key in M.core.globalEvents) {
if (M.core.globalEvents.hasOwnProperty(key)) {
Y.Global.publish(M.core.globalEvents[key], Y.merge(eventDefaultConfig, {broadcast: 2}));
// Make sure the key exists and that the event has not yet been published. Otherwise, skip publishing.
if (M.core.globalEvents.hasOwnProperty(key) && Y.Global.getEvent(M.core.globalEvents[key]) === null) {
Y.Global.publish(M.core.globalEvents[key], Y.merge(eventDefaultConfig, {broadcast: true}));
}
}
+8 -6
View File
@@ -28,7 +28,7 @@ var LOGNAME = 'moodle-core-event';
*/
M.core = M.core || {};
M.core.event = {
M.core.event = M.core.event || {
/**
* This event is triggered when a page has added dynamic nodes to a page
* that should be processed by the filter system. An example is loading
@@ -42,7 +42,7 @@ M.core.event = {
FILTER_CONTENT_UPDATED: "filter-content-updated"
};
M.core.globalEvents = {
M.core.globalEvents = M.core.globalEvents || {
/**
* This event is triggered when form has an error
*
@@ -72,14 +72,16 @@ var eventDefaultConfig = {
// Publish all the events with a standard config.
var key;
for (key in M.core.event) {
if (M.core.event.hasOwnProperty(key)) {
if (M.core.event.hasOwnProperty(key) && Y.getEvent(M.core.event[key]) === null) {
Y.publish(M.core.event[key], eventDefaultConfig);
}
}
//Publish all the global events.
// Publish global events.
for (key in M.core.globalEvents) {
if (M.core.globalEvents.hasOwnProperty(key)) {
Y.Global.publish(M.core.globalEvents[key], Y.merge(eventDefaultConfig, {broadcast: 2}));
// Make sure the key exists and that the event has not yet been published. Otherwise, skip publishing.
if (M.core.globalEvents.hasOwnProperty(key) && Y.Global.getEvent(M.core.globalEvents[key]) === null) {
Y.Global.publish(M.core.globalEvents[key], Y.merge(eventDefaultConfig, {broadcast: true}));
Y.log('Global event published: ' + key, 'debug', LOGNAME);
}
}
+8
View File
@@ -530,6 +530,7 @@ function assign_print_overview($courses, &$htmlarray) {
*/
function assign_print_recent_activity($course, $viewfullnames, $timestart) {
global $CFG, $USER, $DB, $OUTPUT;
require_once($CFG->dirroot . '/mod/assign/locallib.php');
// Do not use log table if possible, it may be huge.
@@ -613,7 +614,14 @@ function assign_print_recent_activity($course, $viewfullnames, $timestart) {
foreach ($show as $submission) {
$cm = $modinfo->get_cm($submission->cmid);
$context = context_module::instance($submission->cmid);
$assign = new assign($context, $cm, $cm->course);
$link = $CFG->wwwroot.'/mod/assign/view.php?id='.$cm->id;
// Obscure first and last name if blind marking enabled.
if ($assign->is_blind_marking()) {
$submission->firstname = get_string('participant', 'mod_assign');
$submission->lastname = $assign->get_uniqueid_for_user($submission->userid);
}
print_recent_activity_note($submission->timemodified,
$submission,
$cm->name,
+24
View File
@@ -145,6 +145,30 @@ class mod_assign_lib_testcase extends mod_assign_base_testcase {
assign_print_recent_activity($this->course, false, time() - 3600);
}
/** Make sure blind marking shows participant \d+ not fullname when assign_print_recent_activity is triggered. */
public function test_print_recent_activity_fullname_blind_marking() {
// Submitting an assignment generates a notification in blind marking.
$this->preventResetByRollback();
$sink = $this->redirectMessages();
$this->setUser($this->editingteachers[0]);
$assign = $this->create_instance(array('blindmarking' => 1));
$data = new stdClass();
$data->userid = $this->students[0]->id;
$notices = array();
$this->setUser($this->students[0]);
$assign->submit_for_grading($data, $notices);
$this->setUser($this->editingteachers[0]);
$uniqueid = $assign->get_uniqueid_for_user($data->userid);
$expectedstr = preg_quote(get_string('participant', 'mod_assign'), '/') . '.*' . $uniqueid;
$this->expectOutputRegex("/{$expectedstr}/");
assign_print_recent_activity($this->course, false, time() - 3600);
$sink->close();
}
public function test_assign_get_recent_mod_activity() {
$this->setUser($this->editingteachers[0]);
$assign = $this->create_instance();
+47
View File
@@ -1531,6 +1531,53 @@ function data_rating_validate($params) {
return true;
}
/**
* Can the current user see ratings for a given itemid?
*
* @param array $params submitted data
* contextid => int contextid [required]
* component => The component for this module - should always be mod_data [required]
* ratingarea => object the context in which the rated items exists [required]
* itemid => int the ID of the object being rated [required]
* scaleid => int scale id [optional]
* @return bool
* @throws coding_exception
* @throws rating_exception
*/
function mod_data_rating_can_see_item_ratings($params) {
global $DB;
// Check the component is mod_data.
if (!isset($params['component']) || $params['component'] != 'mod_data') {
throw new rating_exception('invalidcomponent');
}
// Check the ratingarea is entry (the only rating area in data).
if (!isset($params['ratingarea']) || $params['ratingarea'] != 'entry') {
throw new rating_exception('invalidratingarea');
}
if (!isset($params['itemid'])) {
throw new rating_exception('invaliditemid');
}
$datasql = "SELECT d.id as dataid, d.course, r.groupid
FROM {data_records} r
JOIN {data} d ON r.dataid = d.id
WHERE r.id = :itemid";
$dataparams = array('itemid' => $params['itemid']);
if (!$info = $DB->get_record_sql($datasql, $dataparams)) {
// Item doesn't exist
throw new rating_exception('invaliditemid');
}
$course = $DB->get_record('course', array('id' => $info->course), '*', MUST_EXIST);
$cm = get_coursemodule_from_instance('data', $info->dataid, $course->id, false, MUST_EXIST);
// Make sure groups allow this user to see the item they're rating.
return groups_group_visible($info->groupid, $course, $cm);
}
/**
* function that takes in the current data, number of items per page,
+101 -2
View File
@@ -35,9 +35,9 @@ require_once($CFG->dirroot . '/mod/data/lib.php');
* @copyright 2013 Adrian Greeve
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class data_lib_testcase extends advanced_testcase {
class mod_data_lib_testcase extends advanced_testcase {
function test_data_delete_record() {
public function test_data_delete_record() {
global $DB;
$this->resetAfterTest();
@@ -231,4 +231,103 @@ class data_lib_testcase extends advanced_testcase {
$this->assertEquals($url, $event->get_url());
$this->assertEventContextNotUsed($event);
}
/**
* Tests for mod_data_rating_can_see_item_ratings().
*
* @throws coding_exception
* @throws rating_exception
*/
public function test_mod_data_rating_can_see_item_ratings() {
global $DB;
$this->resetAfterTest();
// Setup test data.
$course = new stdClass();
$course->groupmode = SEPARATEGROUPS;
$course->groupmodeforce = true;
$course = $this->getDataGenerator()->create_course($course);
$data = $this->getDataGenerator()->create_module('data', array('course' => $course->id));
$cm = get_coursemodule_from_instance('data', $data->id);
$context = context_module::instance($cm->id);
// Create users.
$user1 = $this->getDataGenerator()->create_user();
$user2 = $this->getDataGenerator()->create_user();
$user3 = $this->getDataGenerator()->create_user();
$user4 = $this->getDataGenerator()->create_user();
// Groups and stuff.
$role = $DB->get_record('role', array('shortname' => 'teacher'), '*', MUST_EXIST);
$this->getDataGenerator()->enrol_user($user1->id, $course->id, $role->id);
$this->getDataGenerator()->enrol_user($user2->id, $course->id, $role->id);
$this->getDataGenerator()->enrol_user($user3->id, $course->id, $role->id);
$this->getDataGenerator()->enrol_user($user4->id, $course->id, $role->id);
$group1 = $this->getDataGenerator()->create_group(array('courseid' => $course->id));
$group2 = $this->getDataGenerator()->create_group(array('courseid' => $course->id));
groups_add_member($group1, $user1);
groups_add_member($group1, $user2);
groups_add_member($group2, $user3);
groups_add_member($group2, $user4);
// Add data.
$field = data_get_field_new('text', $data);
$fielddetail = new stdClass();
$fielddetail->name = 'Name';
$fielddetail->description = 'Some name';
$field->define_field($fielddetail);
$field->insert_field();
$recordid = data_add_record($data, $group1->id);
$datacontent = array();
$datacontent['fieldid'] = $field->field->id;
$datacontent['recordid'] = $recordid;
$datacontent['content'] = 'Asterix';
$DB->insert_record('data_content', $datacontent);
// Now try to access it as various users.
unassign_capability('moodle/site:accessallgroups', $role->id);
$params = array('contextid' => 2,
'component' => 'mod_data',
'ratingarea' => 'entry',
'itemid' => $recordid,
'scaleid' => 2);
$this->setUser($user1);
$this->assertTrue(mod_data_rating_can_see_item_ratings($params));
$this->setUser($user2);
$this->assertTrue(mod_data_rating_can_see_item_ratings($params));
$this->setUser($user3);
$this->assertFalse(mod_data_rating_can_see_item_ratings($params));
$this->setUser($user4);
$this->assertFalse(mod_data_rating_can_see_item_ratings($params));
// Now try with accessallgroups cap and make sure everything is visible.
assign_capability('moodle/site:accessallgroups', CAP_ALLOW, $role->id, $context->id);
$this->setUser($user1);
$this->assertTrue(mod_data_rating_can_see_item_ratings($params));
$this->setUser($user2);
$this->assertTrue(mod_data_rating_can_see_item_ratings($params));
$this->setUser($user3);
$this->assertTrue(mod_data_rating_can_see_item_ratings($params));
$this->setUser($user4);
$this->assertTrue(mod_data_rating_can_see_item_ratings($params));
// Change group mode and verify visibility.
$course->groupmode = VISIBLEGROUPS;
$DB->update_record('course', $course);
unassign_capability('moodle/site:accessallgroups', $role->id);
$this->setUser($user1);
$this->assertTrue(mod_data_rating_can_see_item_ratings($params));
$this->setUser($user2);
$this->assertTrue(mod_data_rating_can_see_item_ratings($params));
$this->setUser($user3);
$this->assertTrue(mod_data_rating_can_see_item_ratings($params));
$this->setUser($user4);
$this->assertTrue(mod_data_rating_can_see_item_ratings($params));
}
}
+6 -1
View File
@@ -171,15 +171,20 @@ class mod_forum_post_form extends moodleform {
// Check whether the user has access to all groups in this forum from the accessallgroups cap.
if ($groupmode == VISIBLEGROUPS || has_capability('moodle/site:accessallgroups', $modulecontext)) {
// Only allow posting to all groups if the user has access to all groups.
$groupinfo = array('0' => get_string('allparticipants'));
$groupdata[] = (object) array('id' => 0, 'name' => get_string('allparticipants'));
$groupcount++;
}
$contextcheck = has_capability('mod/forum:movediscussions', $modulecontext) && empty($post->parent) && $groupcount > 1;
if ($contextcheck) {
foreach ($groupdata as $grouptemp) {
if (!forum_user_can_post_discussion($forum, $grouptemp->id, -1, $cm, $modcontext)) {
continue;
}
$groupinfo[$grouptemp->id] = $grouptemp->name;
}
}
if (count($groupinfo) > 1) {
$mform->addElement('select','groupinfo', get_string('group'), $groupinfo);
$mform->setDefault('groupinfo', $post->groupid);
$mform->setType('groupinfo', PARAM_INT);
+42
View File
@@ -3772,6 +3772,48 @@ function forum_rating_validate($params) {
return true;
}
/**
* Can the current user see ratings for a given itemid?
*
* @param array $params submitted data
* contextid => int contextid [required]
* component => The component for this module - should always be mod_forum [required]
* ratingarea => object the context in which the rated items exists [required]
* itemid => int the ID of the object being rated [required]
* scaleid => int scale id [optional]
* @return bool
* @throws coding_exception
* @throws rating_exception
*/
function mod_forum_rating_can_see_item_ratings($params) {
global $DB, $USER;
// Check the component is mod_forum.
if (!isset($params['component']) || $params['component'] != 'mod_forum') {
throw new rating_exception('invalidcomponent');
}
// Check the ratingarea is post (the only rating area in forum).
if (!isset($params['ratingarea']) || $params['ratingarea'] != 'post') {
throw new rating_exception('invalidratingarea');
}
if (!isset($params['itemid'])) {
throw new rating_exception('invaliditemid');
}
$post = $DB->get_record('forum_posts', array('id' => $params['itemid']), '*', MUST_EXIST);
$discussion = $DB->get_record('forum_discussions', array('id' => $post->discussion), '*', MUST_EXIST);
$forum = $DB->get_record('forum', array('id' => $discussion->forum), '*', MUST_EXIST);
$course = $DB->get_record('course', array('id' => $forum->course), '*', MUST_EXIST);
$cm = get_coursemodule_from_instance('forum', $forum->id, $course->id , false, MUST_EXIST);
// Perform some final capability checks.
if (!forum_user_can_see_post($forum, $discussion, $post, $USER, $cm)) {
return false;
}
return true;
}
/**
* This function prints the overview of a discussion in the forum listing.
+23 -11
View File
@@ -674,8 +674,6 @@ if ($fromform = $mform_post->get_data()) {
// WARNING: the $fromform->message array has been overwritten, do not use it anymore!
$fromform->messagetrust = trusttext_trusted($modcontext);
$contextcheck = isset($fromform->groupinfo) && has_capability('mod/forum:movediscussions', $modcontext);
if ($fromform->edit) { // Updating a post
unset($fromform->groupid);
$fromform->id = $fromform->edit;
@@ -699,10 +697,15 @@ if ($fromform = $mform_post->get_data()) {
}
// If the user has access to all groups and they are changing the group, then update the post.
if ($contextcheck) {
if (isset($fromform->groupinfo) && has_capability('mod/forum:movediscussions', $modcontext)) {
if (empty($fromform->groupinfo)) {
$fromform->groupinfo = -1;
}
if (!forum_user_can_post_discussion($forum, $fromform->groupinfo, null, $cm, $modcontext)) {
print_error('cannotupdatepost', 'forum');
}
$DB->set_field('forum_discussions' ,'groupid' , $fromform->groupinfo, array('firstpost' => $fromform->id));
}
@@ -831,19 +834,27 @@ if ($fromform = $mform_post->get_data()) {
exit;
} else { // Adding a new discussion.
// The location to redirect to after successfully posting.
$redirectto = new moodle_url('view.php', array('f' => $fromform->forum));
// Before we add this we must check that the user will not exceed the blocking threshold.
forum_check_blocking_threshold($thresholdwarning);
if (isset($fromform->groupinfo)) {
// Use the value provided in the dropdown group selection.
$fromform->groupid = $fromform->groupinfo;
// Ensure that we redirect back to the group selected.
$redirectto->param('group', $fromform->groupid);
} else if (!isset($fromform->groupid) || empty($fromform->groupid)) {
// There was not value set in the hidden form element.
// Use the value for all participants instead.
$fromform->groupid = -1;
}
if (!forum_user_can_post_discussion($forum, $fromform->groupid, -1, $cm, $modcontext)) {
print_error('cannotcreatediscussion', 'forum');
}
// If the user has access all groups capability let them choose the group.
if ($contextcheck) {
$fromform->groupid = $fromform->groupinfo;
}
if (empty($fromform->groupid)) {
$fromform->groupid = -1;
}
$fromform->mailnow = empty($fromform->mailnow) ? 0 : 1;
@@ -895,7 +906,8 @@ if ($fromform = $mform_post->get_data()) {
$completion->update_state($cm,COMPLETION_COMPLETE);
}
redirect(forum_go_back_to("view.php?f=$fromform->forum"), $message.$subscribemessage, $timemessage);
// Redirect back to the discussion.
redirect(forum_go_back_to($redirectto->out()), $message . $subscribemessage, $timemessage);
} else {
print_error("couldnotadd", "forum", $errordestination);
+107
View File
@@ -24,6 +24,10 @@
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/mod/forum/lib.php');
require_once($CFG->dirroot . '/rating/lib.php');
class mod_forum_lib_testcase extends advanced_testcase {
public function test_forum_trigger_content_uploaded_event() {
@@ -833,4 +837,107 @@ class mod_forum_lib_testcase extends advanced_testcase {
return $discussion;
}
/**
* Tests for mod_forum_rating_can_see_item_ratings().
*
* @throws coding_exception
* @throws rating_exception
*/
public function test_mod_forum_rating_can_see_item_ratings() {
global $DB;
$this->resetAfterTest();
// Setup test data.
$course = new stdClass();
$course->groupmode = SEPARATEGROUPS;
$course->groupmodeforce = true;
$course = $this->getDataGenerator()->create_course($course);
$forum = $this->getDataGenerator()->create_module('forum', array('course' => $course->id));
$generator = self::getDataGenerator()->get_plugin_generator('mod_forum');
$cm = get_coursemodule_from_instance('forum', $forum->id);
$context = context_module::instance($cm->id);
// Create users.
$user1 = $this->getDataGenerator()->create_user();
$user2 = $this->getDataGenerator()->create_user();
$user3 = $this->getDataGenerator()->create_user();
$user4 = $this->getDataGenerator()->create_user();
// Groups and stuff.
$role = $DB->get_record('role', array('shortname' => 'teacher'), '*', MUST_EXIST);
$this->getDataGenerator()->enrol_user($user1->id, $course->id, $role->id);
$this->getDataGenerator()->enrol_user($user2->id, $course->id, $role->id);
$this->getDataGenerator()->enrol_user($user3->id, $course->id, $role->id);
$this->getDataGenerator()->enrol_user($user4->id, $course->id, $role->id);
$group1 = $this->getDataGenerator()->create_group(array('courseid' => $course->id));
$group2 = $this->getDataGenerator()->create_group(array('courseid' => $course->id));
groups_add_member($group1, $user1);
groups_add_member($group1, $user2);
groups_add_member($group2, $user3);
groups_add_member($group2, $user4);
$record = new stdClass();
$record->course = $forum->course;
$record->forum = $forum->id;
$record->userid = $user1->id;
$record->groupid = $group1->id;
$discussion = $generator->create_discussion($record);
// Retrieve the first post.
$post = $DB->get_record('forum_posts', array('discussion' => $discussion->id));
$ratingoptions = new stdClass;
$ratingoptions->context = $context;
$ratingoptions->ratingarea = 'post';
$ratingoptions->component = 'mod_forum';
$ratingoptions->itemid = $post->id;
$ratingoptions->scaleid = 2;
$ratingoptions->userid = $user2->id;
$rating = new rating($ratingoptions);
$rating->update_rating(2);
// Now try to access it as various users.
unassign_capability('moodle/site:accessallgroups', $role->id);
$params = array('contextid' => 2,
'component' => 'mod_forum',
'ratingarea' => 'post',
'itemid' => $post->id,
'scaleid' => 2);
$this->setUser($user1);
$this->assertTrue(mod_forum_rating_can_see_item_ratings($params));
$this->setUser($user2);
$this->assertTrue(mod_forum_rating_can_see_item_ratings($params));
$this->setUser($user3);
$this->assertFalse(mod_forum_rating_can_see_item_ratings($params));
$this->setUser($user4);
$this->assertFalse(mod_forum_rating_can_see_item_ratings($params));
// Now try with accessallgroups cap and make sure everything is visible.
assign_capability('moodle/site:accessallgroups', CAP_ALLOW, $role->id, $context->id);
$this->setUser($user1);
$this->assertTrue(mod_forum_rating_can_see_item_ratings($params));
$this->setUser($user2);
$this->assertTrue(mod_forum_rating_can_see_item_ratings($params));
$this->setUser($user3);
$this->assertTrue(mod_forum_rating_can_see_item_ratings($params));
$this->setUser($user4);
$this->assertTrue(mod_forum_rating_can_see_item_ratings($params));
// Change group mode and verify visibility.
$course->groupmode = VISIBLEGROUPS;
$DB->update_record('course', $course);
unassign_capability('moodle/site:accessallgroups', $role->id);
$this->setUser($user1);
$this->assertTrue(mod_forum_rating_can_see_item_ratings($params));
$this->setUser($user2);
$this->assertTrue(mod_forum_rating_can_see_item_ratings($params));
$this->setUser($user3);
$this->assertTrue(mod_forum_rating_can_see_item_ratings($params));
$this->setUser($user4);
$this->assertTrue(mod_forum_rating_can_see_item_ratings($params));
}
}
+1 -5
View File
@@ -165,10 +165,6 @@ if ($canmanage) {
if ($result->attemptsremaining != 0 && $lesson->review && !$reviewmode) {
$lesson->add_message(get_string('attemptsremaining', 'lesson', $result->attemptsremaining));
}
// Report if max attempts reached
if ($result->maxattemptsreached != 0 && $lesson->review && !$reviewmode) {
$lesson->add_message('('.get_string("maximumnumberofattemptsreached", "lesson").')');
}
$PAGE->set_url('/mod/lesson/view.php', array('id' => $cm->id, 'pageid' => $page->id));
$PAGE->set_subpage($page->id);
@@ -184,7 +180,7 @@ if ($lesson->displayleft) {
if ($lesson->ongoing && !$reviewmode) {
echo $lessonoutput->ongoing_score($lesson);
}
if (!$result->maxattemptsreached && !$reviewmode) {
if (!$reviewmode) {
echo $result->feedback;
}
+2 -4
View File
@@ -258,9 +258,7 @@ $string['mediaheight'] = 'Popup window height:';
$string['mediawidth'] = 'Popup window width:';
$string['messageprovider:graded_essay'] = 'Essay graded notification';
$string['minimumnumberofquestions'] = 'Minimum number of questions';
$string['minimumnumberofquestions_help'] = 'This setting specifies the minimum number of questions that will be used to calculate a grade for the activity. If the lesson contains one or more content pages, the minimum number of questions should be set to zero.
If set to say 20, it is suggested that the following text is added to the opening page of the lesson: "In this lesson you are expected to attempt at least 20 questions. You can attempt more if you wish. However, if you attempt less than 20 questions, your grade will be calculated as though you attempted 20."';
$string['minimumnumberofquestions_help'] = 'This setting specifies the minimum number of questions that will be used to calculate a grade for the activity.';
$string['missingname'] = 'Please enter a nickname';
$string['modattempts'] = 'Allow student review';
$string['modattempts_help'] = 'If enabled, students can navigate through the lesson again from the start.';
@@ -316,7 +314,7 @@ $string['numberofcorrectmatches'] = 'Number of correct matches: {$a}';
$string['numberofpagestoshow'] = 'Number of pages to show';
$string['numberofpagestoshow_help'] = 'This setting specifies the number of pages shown in a lesson. It is only applicable for lessons with pages shown in a random order (when "Action after correct answer" is set to "Show an unseen page" or "Show an unanswered page"). If set to zero, then all pages are shown.';
$string['numberofpagesviewed'] = 'Number of questions answered: {$a}';
$string['numberofpagesviewednotice'] = 'Number of questions answered: {$a->nquestions}; (You should answer at least: {$a->minquestions})';
$string['numberofpagesviewednotice'] = 'Number of questions answered: {$a->nquestions} (You should answer at least {$a->minquestions})';
$string['numerical'] = 'Numerical';
$string['ongoing'] = 'Display ongoing score';
$string['ongoing_help'] = 'If enabled, each page will display the student\'s current points earned out of the total possible thus far.';
+16 -3
View File
@@ -2008,6 +2008,19 @@ abstract class lesson_page extends lesson_base {
} else {
if (!has_capability('mod/lesson:manage', $context)) {
$nretakes = $DB->count_records("lesson_grades", array("lessonid"=>$this->lesson->id, "userid"=>$USER->id));
// Get the number of attempts that have been made on this question for this student and retake,
$nattempts = $DB->count_records('lesson_attempts', array('lessonid' => $this->lesson->id,
'userid' => $USER->id, 'pageid' => $this->properties->id, 'retry' => $nretakes));
// Check if they have reached (or exceeded) the maximum number of attempts allowed.
if ($nattempts >= $this->lesson->maxattempts) {
$result->maxattemptsreached = true;
$result->feedback = get_string('maximumnumberofattemptsreached', 'lesson');
$result->newpageid = $this->lesson->get_next_page($this->properties->nextpageid);
return $result;
}
// record student's attempt
$attempt = new stdClass;
$attempt->lessonid = $this->lesson->id;
@@ -2032,14 +2045,14 @@ abstract class lesson_page extends lesson_base {
if (!$userisreviewing) {
if ($this->lesson->retake || (!$this->lesson->retake && $nretakes == 0)) {
$DB->insert_record("lesson_attempts", $attempt);
// Increase the number of attempts made.
$nattempts++;
}
}
// "number of attempts remaining" message if $this->lesson->maxattempts > 1
// displaying of message(s) is at the end of page for more ergonomic display
if (!$result->correctanswer && ($result->newpageid == 0)) {
// wrong answer and student is stuck on this page - check how many attempts
// the student has had at this page/question
$nattempts = $DB->count_records("lesson_attempts", array("pageid"=>$this->properties->id, "userid"=>$USER->id, "retry" => $attempt->retry));
// retreive the number of attempts left counter for displaying at bottom of feedback page
if ($nattempts >= $this->lesson->maxattempts) {
if ($this->lesson->maxattempts > 1) { // don't bother with message if only one attempt
@@ -83,8 +83,7 @@ Feature: In a lesson activity, students can navigate through a series of pages i
And I set the following fields to these values:
| Your answer | 2 |
And I press "Submit"
And I should see "Correct answer"
And I should not see "Incorrect answer"
And I should see "Maximum number of attempts reached - Moving to next page"
And I press "Continue"
And I should see "Congratulations - end of lesson reached"
And I should see "Your score is 0 (out of 1)."
@@ -126,6 +125,6 @@ Feature: In a lesson activity, students can navigate through a series of pages i
And I set the following fields to these values:
| wrong | 1 |
And I press "Submit"
And I should see "(Maximum number of attempts reached - Moving to next page)"
And I should not see "Yes, I'd like to try again"
And I press "Continue"
And I should see "Congratulations - end of lesson reached"
@@ -0,0 +1,206 @@
@mod @mod_lesson
Feature: In a lesson activity, students can not re-attempt a question more than the allowed amount
In order to check a lesson question can not be attempted more than the allowed amount
As a student I need to check I cannot reattempt a question more than I should be allowed
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 |
And I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
And I add a "Lesson" to section "1"
And I set the following fields to these values:
| Name | Test lesson name |
| Re-takes allowed | Yes |
| Minimum number of questions | 3 |
And I press "Save and return to course"
And I follow "Test lesson name"
And I follow "Add a content page"
And I set the following fields to these values:
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page"
And I select "Add a content page" from the "qtype" singleselect
And I set the following fields to these values:
| Page title | Third page name |
| Page contents | Third page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page"
And I select "Question" from the "qtype" singleselect
And I set the field "Select a question type" to "True/false"
And I press "Add a question page"
And I set the following fields to these values:
| Page title | True/false question 3 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I select "Add a content page" from the "qtype" singleselect
And I set the following fields to these values:
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page"
And I select "Question" from the "qtype" singleselect
And I set the field "Select a question type" to "True/false"
And I press "Add a question page"
And I set the following fields to these values:
| Page title | True/false question 2 |
| Page contents | Kermit is a frog |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I select "Question" from the "qtype" singleselect
And I set the field "Select a question type" to "True/false"
And I press "Add a question page"
And I set the following fields to these values:
| Page title | True/false question 1 |
| Page contents | The earth is round. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I log out
Scenario: Check that we can leave a quiz and when we re-enter we can not re-attempt the question again
Given I log in as "student1"
And I follow "Course 1"
And I follow "Test lesson name"
And I should see "First page contents"
And I press "Next page"
And I should see "The earth is round"
And I set the following fields to these values:
| False| 1 |
And I press "Submit"
And I should see "Wrong"
And I follow "Course 1"
And I follow "Test lesson name"
And I should see "Do you want to start at the last page you saw?"
And I follow "No"
And I should see "First page contents"
And I press "Next page"
And I should see "The earth is round"
And I set the following fields to these values:
| False| 1 |
When I press "Submit"
Then I should see "Maximum number of attempts reached - Moving to next page"
@javascript @_bug_phantomjs
Scenario: Check that we can not click back on the browser at the last quiz result page and re-attempt the last question to get full marks
Given I log in as "student1"
And I follow "Course 1"
And I follow "Test lesson name"
And I should see "First page contents"
And I press "Next page"
And I should see "The earth is round"
And I set the following fields to these values:
| True| 1 |
And I press "Submit"
And I should see "Correct"
And I press "Continue"
And I should see "Kermit is a frog"
And I set the following fields to these values:
| True| 1 |
And I press "Submit"
And I should see "Correct"
And I press "Continue"
And I should see "Second page contents"
And I press "Next page"
And I should see "Paper is made from trees"
And I set the following fields to these values:
| False | 1 |
And I press "Submit"
And I should see "Wrong"
And I press "Continue"
And I should see "Third page contents"
And I press "Next page"
And I should see "Congratulations - end of lesson reached"
And I should see "Your score is 2 (out of 3)"
And I press the "back" button in the browser
And I press the "back" button in the browser
And I press the "back" button in the browser
And I should see "Paper is made from trees"
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
And I should see "Correct"
And I press "Continue"
And I should see "Third page contents"
When I press "Next page"
Then I should see "Number of questions answered: 1 (You should answer at least 3)"
@javascript
Scenario: Check that we can not click back on the browser and re-attempt a question
Given I log in as "student1"
And I follow "Course 1"
And I follow "Test lesson name"
And I should see "First page contents"
And I press "Next page"
And I should see "The earth is round"
And I set the following fields to these values:
| False | 1 |
And I press "Submit"
And I should see "Wrong"
And I press the "back" button in the browser
And I set the following fields to these values:
| True | 1 |
When I press "Submit"
Then I should see "Maximum number of attempts reached - Moving to next page"
And I press "Continue"
And I should see "Kermit is a frog"
And I set the following fields to these values:
| False | 1 |
And I press "Submit"
And I should see "Wrong"
And I press the "back" button in the browser
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
And I should see "Maximum number of attempts reached - Moving to next page"
And I press "Continue"
And I should see "Second page contents"
And I press "Next page"
And I should see "Paper is made from trees"
And I set the following fields to these values:
| True | 1 |
And I press "Submit"
And I should see "Correct"
And I press the "back" button in the browser
And I set the following fields to these values:
| False | 1 |
And I press "Submit"
And I should see "Maximum number of attempts reached - Moving to next page"
And I press "Continue"
And I should see "Third page contents"
And I press "Next page"
And I should see "Congratulations - end of lesson reached"
And I should see "Your score is 1 (out of 3)"
+85 -68
View File
@@ -267,12 +267,6 @@ $timer = null;
if ($pageid != LESSON_EOL) {
/// This is the code updates the lessontime for a timed test
$startlastseen = optional_param('startlastseen', '', PARAM_ALPHA);
if ($startlastseen == 'no') {
// this deletes old records not totally sure if this is necessary anymore
$retries = $DB->count_records('lesson_grades', array('lessonid'=>$lesson->id, 'userid'=>$USER->id));
$DB->delete_records('lesson_attempts', array('userid' => $USER->id, 'lessonid' => $lesson->id, 'retry' => $retries));
$DB->delete_records('lesson_branch', array('userid' => $USER->id, 'lessonid' => $lesson->id, 'retry' => $retries));
}
$page = $lesson->load_page($pageid);
// Check if the page is of a special type and if so take any nessecary action
@@ -416,84 +410,107 @@ if ($pageid != LESSON_EOL) {
// Used to check to see if the student ran out of time
$outoftime = optional_param('outoftime', '', PARAM_ALPHA);
// We are using level 3 header because the page title is a sub-heading of lesson title (MDL-30911).
$lessoncontent .= $OUTPUT->heading(get_string("congratulations", "lesson"), 3);
$lessoncontent .= $OUTPUT->box_start('generalbox boxaligncenter');
$ntries = $DB->count_records("lesson_grades", array("lessonid"=>$lesson->id, "userid"=>$USER->id));
if (isset($USER->modattempts[$lesson->id])) {
$ntries--; // need to look at the old attempts :)
}
$gradelesson = true;
$gradeinfo = lesson_grade($lesson, $ntries);
if ($lesson->custom && !$canmanage) {
// Before we calculate the custom score make sure they answered the minimum
// number of questions. We only need to do this for custom scoring as we can
// not get the miniumum score the user should achieve. If we are not using
// custom scoring (so all questions are valued as 1) then we simply check if
// they answered more than the minimum questions, if not, we mark it out of the
// number specified in the minimum questions setting - which is done in lesson_grade().
// Get the number of answers given.
if ($gradeinfo->nquestions < $lesson->minquestions) {
$gradelesson = false;
$a = new stdClass;
$a->nquestions = $gradeinfo->nquestions;
$a->minquestions = $lesson->minquestions;
$lessoncontent .= $OUTPUT->box_start('generalbox boxaligncenter');
$lesson->add_message(get_string('numberofpagesviewednotice', 'lesson', $a));
}
}
if ($gradelesson) {
// We are using level 3 header because the page title is a sub-heading of lesson title (MDL-30911).
$lessoncontent .= $OUTPUT->heading(get_string("congratulations", "lesson"), 3);
$lessoncontent .= $OUTPUT->box_start('generalbox boxaligncenter');
}
if (!$canmanage) {
// Update the clock / get time information for this user.
$lesson->stop_timer();
$gradeinfo = lesson_grade($lesson, $ntries);
if ($gradelesson) {
// Update the clock / get time information for this user.
$lesson->stop_timer();
$gradeinfo = lesson_grade($lesson, $ntries);
if ($gradeinfo->attempts) {
if (!$lesson->custom) {
$lessoncontent .= $lessonoutput->paragraph(get_string("numberofpagesviewed", "lesson", $gradeinfo->nquestions), 'center');
if ($lesson->minquestions) {
if ($gradeinfo->nquestions < $lesson->minquestions) {
// print a warning and set nviewed to minquestions
$lessoncontent .= $lessonoutput->paragraph(get_string("youshouldview", "lesson", $lesson->minquestions), 'center');
if ($gradeinfo->attempts) {
if (!$lesson->custom) {
$lessoncontent .= $lessonoutput->paragraph(get_string("numberofpagesviewed", "lesson", $gradeinfo->nquestions), 'center');
if ($lesson->minquestions) {
if ($gradeinfo->nquestions < $lesson->minquestions) {
// print a warning and set nviewed to minquestions
$lessoncontent .= $lessonoutput->paragraph(get_string("youshouldview", "lesson", $lesson->minquestions), 'center');
}
}
$lessoncontent .= $lessonoutput->paragraph(get_string("numberofcorrectanswers", "lesson", $gradeinfo->earned), 'center');
}
$lessoncontent .= $lessonoutput->paragraph(get_string("numberofcorrectanswers", "lesson", $gradeinfo->earned), 'center');
}
$a = new stdClass;
$a->score = $gradeinfo->earned;
$a->grade = $gradeinfo->total;
if ($gradeinfo->nmanual) {
$a->tempmaxgrade = $gradeinfo->total - $gradeinfo->manualpoints;
$a->essayquestions = $gradeinfo->nmanual;
$lessoncontent .= $OUTPUT->box(get_string("displayscorewithessays", "lesson", $a), 'center');
} else {
$lessoncontent .= $OUTPUT->box(get_string("displayscorewithoutessays", "lesson", $a), 'center');
}
$a = new stdClass;
$a->grade = number_format($gradeinfo->grade * $lesson->grade / 100, 1);
$a->total = $lesson->grade;
$lessoncontent .= $lessonoutput->paragraph(get_string("yourcurrentgradeisoutof", "lesson", $a), 'center');
$grade = new stdClass();
$grade->lessonid = $lesson->id;
$grade->userid = $USER->id;
$grade->grade = $gradeinfo->grade;
$grade->completed = time();
if (!$lesson->practice) {
if (isset($USER->modattempts[$lesson->id])) { // if reviewing, make sure update old grade record
if (!$grades = $DB->get_records("lesson_grades", array("lessonid" => $lesson->id, "userid" => $USER->id), "completed DESC", '*', 0, 1)) {
print_error('cannotfindgrade', 'lesson');
}
$oldgrade = array_shift($grades);
$grade->id = $oldgrade->id;
$DB->update_record("lesson_grades", $grade);
$a = new stdClass;
$a->score = $gradeinfo->earned;
$a->grade = $gradeinfo->total;
if ($gradeinfo->nmanual) {
$a->tempmaxgrade = $gradeinfo->total - $gradeinfo->manualpoints;
$a->essayquestions = $gradeinfo->nmanual;
$lessoncontent .= $OUTPUT->box(get_string("displayscorewithessays", "lesson", $a), 'center');
} else {
$newgradeid = $DB->insert_record("lesson_grades", $grade);
$lessoncontent .= $OUTPUT->box(get_string("displayscorewithoutessays", "lesson", $a), 'center');
}
} else {
$DB->delete_records("lesson_attempts", array("lessonid" => $lesson->id, "userid" => $USER->id, "retry" => $ntries));
}
} else {
if ($lesson->timed) {
if ($outoftime == 'normal') {
$grade = new stdClass();
$grade->lessonid = $lesson->id;
$grade->userid = $USER->id;
$grade->grade = 0;
$grade->completed = time();
if (!$lesson->practice) {
$a = new stdClass;
$a->grade = number_format($gradeinfo->grade * $lesson->grade / 100, 1);
$a->total = $lesson->grade;
$lessoncontent .= $lessonoutput->paragraph(get_string("yourcurrentgradeisoutof", "lesson", $a), 'center');
$grade = new stdClass();
$grade->lessonid = $lesson->id;
$grade->userid = $USER->id;
$grade->grade = $gradeinfo->grade;
$grade->completed = time();
if (!$lesson->practice) {
if (isset($USER->modattempts[$lesson->id])) { // if reviewing, make sure update old grade record
if (!$grades = $DB->get_records("lesson_grades", array("lessonid" => $lesson->id, "userid" => $USER->id), "completed DESC", '*', 0, 1)) {
print_error('cannotfindgrade', 'lesson');
}
$oldgrade = array_shift($grades);
$grade->id = $oldgrade->id;
$DB->update_record("lesson_grades", $grade);
} else {
$newgradeid = $DB->insert_record("lesson_grades", $grade);
}
$lessoncontent .= get_string("eolstudentoutoftimenoanswers", "lesson");
} else {
$DB->delete_records("lesson_attempts", array("lessonid" => $lesson->id, "userid" => $USER->id, "retry" => $ntries));
}
} else {
$lessoncontent .= get_string("welldone", "lesson");
if ($lesson->timed) {
if ($outoftime == 'normal') {
$grade = new stdClass();
$grade->lessonid = $lesson->id;
$grade->userid = $USER->id;
$grade->grade = 0;
$grade->completed = time();
if (!$lesson->practice) {
$newgradeid = $DB->insert_record("lesson_grades", $grade);
}
$lessoncontent .= get_string("eolstudentoutoftimenoanswers", "lesson");
}
} else {
$lessoncontent .= get_string("welldone", "lesson");
}
}
// update central gradebook
lesson_update_grades($lesson, $USER->id);
}
// update central gradebook
lesson_update_grades($lesson, $USER->id);
} else {
// display for teacher
$lessoncontent .= $lessonoutput->paragraph(get_string("displayofgrade", "lesson"), 'center');
+1 -1
View File
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2014051200; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2014051201; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2014050800; // Requires this Moodle version.
$plugin->component = 'mod_quiz'; // Full name of the plugin (used for diagnostics).
$plugin->cron = 60;
+7
View File
@@ -44,6 +44,13 @@ if (!empty($id)) {
print_error('missingparameter');
}
// PARAM_RAW is used for $currentorg, validate it against records stored in the table.
if (!empty($currentorg)) {
if (!$DB->record_exists('scorm_scoes', array('scorm' => $scorm->id, 'identifier' => $currentorg))) {
$currentorg = '';
}
}
$PAGE->set_url('/mod/scorm/loaddatamodel.php', array('scoid'=>$scoid, 'id'=>$cm->id));
require_login($course, false, $cm);
+8
View File
@@ -51,6 +51,14 @@ if (!empty($id)) {
} else {
print_error('missingparameter');
}
// PARAM_RAW is used for $currentorg, validate it against records stored in the table.
if (!empty($currentorg)) {
if (!$DB->record_exists('scorm_scoes', array('scorm' => $scorm->id, 'identifier' => $currentorg))) {
$currentorg = '';
}
}
// If new attempt is being triggered set normal mode and increment attempt number.
$attempt = scorm_get_last_attempt($scorm->id, $USER->id);
+7
View File
@@ -50,6 +50,13 @@ if (!empty($id)) {
print_error('missingparameter');
}
// PARAM_RAW is used for $currentorg, validate it against records stored in the table.
if (!empty($currentorg)) {
if (!$DB->record_exists('scorm_scoes', array('scorm' => $scorm->id, 'identifier' => $currentorg))) {
$currentorg = '';
}
}
$PAGE->set_url('/mod/scorm/prereqs.php', array('scoid'=>$scoid, 'attempt'=>$attempt, 'id'=>$cm->id));
require_login($course, false, $cm);
+5
View File
@@ -1,6 +1,11 @@
This files describes API changes in /mod/* - activity modules,
information provided here is intended especially for developers.
=== 2.7.10 ===
* Modules using rating component must implement a callback mod_x_rating_can_see_item_ratings(). Refer
to mod_forum_rating_can_see_item_ratings() for example.
=== 2.7 ===
* modgrade form element has been redesigned and allows setting the maximum grade point higher than 100.
+2 -2
View File
@@ -60,11 +60,11 @@ if (!wiki_user_can_view($subwiki, $wiki)) {
require_capability('mod/wiki:managefiles', $context);
if (empty($returnurl)) {
$refere = clean_param($_SERVER["HTTP_REFERER"], PARAM_LOCALURL);
$referer = clean_param($_SERVER['HTTP_REFERER'], PARAM_LOCALURL);
if (!empty($referer)) {
$returnurl = $referer;
} else {
$returnurl = new moodle_url('/mod/wiki/files.php', array('subwiki'=>$subwiki->id));
$returnurl = new moodle_url('/mod/wiki/files.php', array('subwiki' => $subwiki->id, 'pageid' => $pageid));
}
}
+6 -1
View File
@@ -381,7 +381,12 @@ class page_wiki_edit extends page_wiki {
function __construct($wiki, $subwiki, $cm) {
global $CFG, $PAGE;
parent::__construct($wiki, $subwiki, $cm);
self::$attachmentoptions = array('subdirs' => false, 'maxfiles' => - 1, 'maxbytes' => $CFG->maxbytes, 'accepted_types' => '*');
$showfilemanager = false;
if (has_capability('mod/wiki:managefiles', context_module::instance($cm->id))) {
$showfilemanager = true;
}
self::$attachmentoptions = array('subdirs' => false, 'maxfiles' => - 1, 'maxbytes' => $CFG->maxbytes,
'accepted_types' => '*', 'enable_filemanagement' => $showfilemanager);
$PAGE->requires->js_init_call('M.mod_wiki.renew_lock', null, true);
}
+7 -1
View File
@@ -57,7 +57,13 @@ if ($popup) {
$PAGE->set_pagelayout('popup');
}
if (!has_capability('moodle/rating:view',$context)) {
$params = array('contextid' => $contextid,
'component' => $component,
'ratingarea' => $ratingarea,
'itemid' => $itemid,
'scaleid' => $scaleid);
if (!has_capability('moodle/rating:view', $context) ||
!component_callback($component, 'rating_can_see_item_ratings', array($params), true)) {
print_error('noviewrate', 'rating');
}
+6 -4
View File
@@ -315,14 +315,16 @@ function coursetag_get_tagged_courses($tagid) {
function coursetag_delete_course_tags($courseid, $showfeedback=false) {
global $DB, $OUTPUT;
if ($taginstances = $DB->get_fieldset_select('tag_instance', 'tagid', "itemtype = 'course' AND itemid = :courseid",
array('courseid' => $courseid))) {
if ($taginstances = $DB->get_recordset_select('tag_instance', "itemtype = 'course' AND itemid = :courseid",
array('courseid' => $courseid), '', 'tagid, tiuserid')) {
tag_delete(array_values($taginstances));
foreach ($taginstances as $record) {
tag_delete_instance('course', $courseid, $record->tagid, $record->tiuserid);
}
$taginstances->close();
}
if ($showfeedback) {
echo $OUTPUT->notification(get_string('deletedcoursetags', 'tag'), 'notifysuccess');
}
}
+1 -1
View File
@@ -452,7 +452,7 @@ class core_tag_events_testcase extends advanced_testcase {
$sink = $this->redirectEvents();
coursetag_delete_course_tags($course->id);
$events = $sink->get_events();
$events = array($events[2], $events[3]);
$events = array($events[1], $events[3]);
// Check that the tags were deleted and the events data is valid.
$this->assertEquals(0, $DB->count_records('tag'));
+10 -1
View File
@@ -315,8 +315,17 @@ function user_get_user_details($user, $course = null, array $userfields = array(
$newfield = 'profile_field_'.$field->datatype;
$formfield = new $newfield($field->id, $user->id);
if ($formfield->is_visible() and !$formfield->is_empty()) {
// We only use display_data in fields that require text formatting.
if ($field->datatype == 'text' or $field->datatype == 'textarea') {
$fieldvalue = $formfield->display_data();
} else {
// Cases: datetime, checkbox and menu.
$fieldvalue = $formfield->data;
}
$userdetails['customfields'][] =
array('name' => $formfield->field->name, 'value' => $formfield->data,
array('name' => $formfield->field->name, 'value' => $fieldvalue,
'type' => $field->datatype, 'shortname' => $formfield->field->shortname);
}
}
+2 -2
View File
@@ -29,11 +29,11 @@
defined('MOODLE_INTERNAL') || die();
$version = 2014051208.00; // 20140512 = branching date YYYYMMDD - do not modify!
$version = 2014051210.00; // 20140512 = branching date YYYYMMDD - do not modify!
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '2.7.8 (Build: 20150511)'; // Human-friendly version name
$release = '2.7.10 (Build: 20150914)'; // Human-friendly version name
$branch = '27'; // This version's branch.
$maturity = MATURITY_STABLE; // This version's maturity level.