Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.56.1 Stable version #9

Merged
merged 20 commits into from
Aug 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions classes/moodlefilecache.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@
class moodlefilecache {

private $cache;
public $area;
public $module;

/**
* Constructores for WIRIS file cache.
* @param String $area cache area.
* @param String $module cache definition.
*/
public function __construct($area, $module) {
$this->area = $area;
$this->module = $module;
$this->cache = cache::make($area, $module);
}

Expand All @@ -55,7 +59,7 @@ public function delete($key) {
public function deleteAll() {
// @codingStandardsIgnoreEnd
if (!$this->cache->purgue()) {
throw new moodle_exception('Error deleting cache on ' . $this->area . ' area', $this->module);
throw new moodle_exception(get_string('errordeletingcache', 'filter_wiris', $this->area), $this->module);
}

}
Expand All @@ -81,7 +85,7 @@ public function get($key) {
*/
public function set($key, $value) {
if (!$this->cache->set($key, $value)) {
throw new moodle_exception('Error saving cache on ' . $this->area . ' area', $this->module);
throw new moodle_exception(get_string('errorsavingcache', 'filter_wiris', $this->area), $this->module);
}
}
}
8 changes: 4 additions & 4 deletions info.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ function wrs_createtablerow($testname, $reporttext, $solutionlink, $condition) {

$plugin = new stdClass();
require_once($CFG->dirroot . '/question/type/wq/version.php');
if (isset($plugin->version)) {
$version = $plugin->version;
if (isset($plugin->release)) {
$version = $plugin->release;
$reporttext = get_string('info_test1_rt1', 'qtype_wq') . $version;
$condition = true;
} else {
Expand All @@ -112,8 +112,8 @@ function wrs_createtablerow($testname, $reporttext, $solutionlink, $condition) {

require_once($CFG->dirroot . '/filter/wiris/version.php');
$plugininfo = get_string('info_test2_info', 'qtype_wq') . '<a href="../../../filter/wiris/info.php" target="_blank">' . get_string('info_test2_infopage', 'qtype_wq') . '</a>';
if (isset($plugin->version)) {
$version = $plugin->version;
if (isset($plugin->release)) {
$version = $plugin->release;
if ($version >= '3.17.20') {
$reporttext = get_string('info_test2_rt1', 'qtype_wq') . ' ' . $plugininfo;
$condition = true;
Expand Down
63 changes: 61 additions & 2 deletions lang/ca/qtype_wq.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,64 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

$string['wq'] = 'Matemàtiques i Ciències - WIRIS';
$string['pluginname'] = 'Matemàtiques i Ciències - WIRIS';
$string['wq'] = 'Matemàtiques i Ciències - WIRIS';;
$string['pluginname'] = 'Matemàtiques i Ciències - WIRIS';;
$string['pluginnamesummary'] = '';
$string['wq_help'] = 'Generic WIRIS quizzes Help';
$string['editingwq'] = 'Editing a generic WIRIS question';
$string['addingwq'] = 'Adding a generic WIRIS question';
$string['cachedef_images'] = "WIRIS Quizzes images.";
$string['error'] = 'ERROR';
$string['info_maintitle'] = "Moodle 2.x WIRIS quizzes test page";
$string['info_tableheader_test'] = "Test";
$string['info_tableheader_report'] = "Report";
$string['info_tableheader_status'] = "Status";
$string['info_disabled'] = "DISABLED";
$string['info_enabled'] = "ENABLED";
$string['info_enabled'] = "ENABLED";
$string['info_information'] = "For more information or if you have any doubt contact WIRIS Support:";
$string['info_test1_name'] = "WIRIS quizzes version";
$string['info_test1_rt1'] = "WIRIS quizzes version is ";
$string['info_test1_rt2'] = "Impossible to find WIRIS quizzes version.";
$string['info_test2_name'] = "WIRIS plugin version";
$string['info_test2_info'] = "Check WIRIS plugin ";
$string['info_test2_infopage'] = "info page";
$string['info_test2_rt1'] = "WIRIS plugin is properly installed.";
$string['info_test2_rt2'] = "WIRIS quizzes requires WIRIS plugin 3.17.20 or greater. Your version is";
$string['info_test2_rt3'] = "Impossible to find WIRIS plugin version file.";
$string['info_test3_name'] = "Moodle version";
$string['info_test3_rt1'] = "Your moodle version is sufficiently new.";
$string['info_test3_rt2'] = "Your Moodle version is %s. WIRIS quizzes could not work correctly with Moodle version prior to 2011060313";
$string['info_test3_rt3'] = "Impossible to find Moodle version file.";
$string['info_test4_name'] = "Plugins";
$string['info_test4_pluginname1'] = "True/False question type";
$string['info_test4_pluginname2'] = "Short-Answer question type";
$string['info_test4_pluginname3'] = "Embedded answer (Cloze) question type";
$string['info_test4_pluginname4'] = "Multi Choice question type";
$string['info_test4_pluginname5'] = "Matching question type";
$string['info_test4_pluginname6'] = "Essay question type";
$string['info_test4_pluginname7'] = "Commons question type";
$string['info_test4_rt1'] = "The following WIRIS question plugins are installed:";
$string['info_test4_rt2'] = "The following WIRIS question plugins are missing:";
$string['info_test4_rt3'] = "Install";
$string['info_test5_name'] = "Database";
$string['info_test5_rt1'] = "All WIRIS tables are present.";
$string['info_test5_rt2'] = "One or more of WIRIS tables are missing.";
$string['info_test6_name'] = "WIRIS quizzes";
$string['info_test7_name'] = "Checking WIRIS configuration";
$string['info_test8_name'] = "Checking if WIRIS server is reachable";
$string['info_test8_rt1'] = "Connecting to %s at port %s";
$string['info_test9_name'] = "WIRIS quizzes service";
$string['info_test10_name'] = "Checking WIRIS quizzes functionality (variable)";
$string['info_test11_name'] = "Checking WIRIS quizzes functionality (plot)";
$string['info_test12_name'] = "Max server connections";
$string['info_test12_rt1'] = "There are currently %s active concurrent connections out of a maximum of %s. Greatest number of concurrent connections is %s.";
$string['info_test12_rt2'] = "Error with the maximum connections security system. See details: <br/><pre>%s<br/>%s</pre>";
$string['ok'] = 'OK';
$string['proxyurl'] = 'PROXY_URL:';
$string['cachedir'] = 'CACHE_DIR:';
$string['serviceurl'] = 'SERVICE_URL:';
$string['wqsummary'] = 'This adds a generic WIRIS question. Only for test purpose. It will be hide from here.';
$string['wirisquestionincorrect'] = 'Sorry! The system can not generate one of the questions of the quiz. <br />Maybe there is a temporary connection problem right now. <br />Maybe the question algorithm has a bug, and fails sometimes. <br />Maybe it will fail always. <br />Don\'t panic... <br />You can retry the quiz, without penalty, just clicking Continue. <br />You can also tell the Teachers that there is an issue with the question titled: \'{$a->questionname}\'';
$string['wirisquizzeserror'] = 'Sorry! There was an error in WIRIS quizzes.';
$string['failedtoloadwirisquizzesfromxml'] = 'Failed to load WIRIS quizzes XML definition for question id';
63 changes: 61 additions & 2 deletions lang/de/qtype_wq.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,64 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

$string['wq'] = 'Mathematik und Naturwissenschaften von WIRIS';
$string['pluginname'] = 'Mathematik und Naturwissenschaften von WIRIS';
$string['wq'] = 'Mathematik und Naturwissenschaften von WIRIS';;
$string['pluginname'] = 'Mathematik und Naturwissenschaften von WIRIS';;
$string['pluginnamesummary'] = '';
$string['wq_help'] = 'Generic WIRIS quizzes Help';
$string['editingwq'] = 'Editing a generic WIRIS question';
$string['addingwq'] = 'Adding a generic WIRIS question';
$string['cachedef_images'] = "WIRIS Quizzes images.";
$string['error'] = 'ERROR';
$string['info_maintitle'] = "Moodle 2.x WIRIS quizzes test page";
$string['info_tableheader_test'] = "Test";
$string['info_tableheader_report'] = "Report";
$string['info_tableheader_status'] = "Status";
$string['info_disabled'] = "DISABLED";
$string['info_enabled'] = "ENABLED";
$string['info_enabled'] = "ENABLED";
$string['info_information'] = "For more information or if you have any doubt contact WIRIS Support:";
$string['info_test1_name'] = "WIRIS quizzes version";
$string['info_test1_rt1'] = "WIRIS quizzes version is ";
$string['info_test1_rt2'] = "Impossible to find WIRIS quizzes version.";
$string['info_test2_name'] = "WIRIS plugin version";
$string['info_test2_info'] = "Check WIRIS plugin ";
$string['info_test2_infopage'] = "info page";
$string['info_test2_rt1'] = "WIRIS plugin is properly installed.";
$string['info_test2_rt2'] = "WIRIS quizzes requires WIRIS plugin 3.17.20 or greater. Your version is";
$string['info_test2_rt3'] = "Impossible to find WIRIS plugin version file.";
$string['info_test3_name'] = "Moodle version";
$string['info_test3_rt1'] = "Your moodle version is sufficiently new.";
$string['info_test3_rt2'] = "Your Moodle version is %s. WIRIS quizzes could not work correctly with Moodle version prior to 2011060313";
$string['info_test3_rt3'] = "Impossible to find Moodle version file.";
$string['info_test4_name'] = "Plugins";
$string['info_test4_pluginname1'] = "True/False question type";
$string['info_test4_pluginname2'] = "Short-Answer question type";
$string['info_test4_pluginname3'] = "Embedded answer (Cloze) question type";
$string['info_test4_pluginname4'] = "Multi Choice question type";
$string['info_test4_pluginname5'] = "Matching question type";
$string['info_test4_pluginname6'] = "Essay question type";
$string['info_test4_pluginname7'] = "Commons question type";
$string['info_test4_rt1'] = "The following WIRIS question plugins are installed:";
$string['info_test4_rt2'] = "The following WIRIS question plugins are missing:";
$string['info_test4_rt3'] = "Install";
$string['info_test5_name'] = "Database";
$string['info_test5_rt1'] = "All WIRIS tables are present.";
$string['info_test5_rt2'] = "One or more of WIRIS tables are missing.";
$string['info_test6_name'] = "WIRIS quizzes";
$string['info_test7_name'] = "Checking WIRIS configuration";
$string['info_test8_name'] = "Checking if WIRIS server is reachable";
$string['info_test8_rt1'] = "Connecting to %s at port %s";
$string['info_test9_name'] = "WIRIS quizzes service";
$string['info_test10_name'] = "Checking WIRIS quizzes functionality (variable)";
$string['info_test11_name'] = "Checking WIRIS quizzes functionality (plot)";
$string['info_test12_name'] = "Max server connections";
$string['info_test12_rt1'] = "There are currently %s active concurrent connections out of a maximum of %s. Greatest number of concurrent connections is %s.";
$string['info_test12_rt2'] = "Error with the maximum connections security system. See details: <br/><pre>%s<br/>%s</pre>";
$string['ok'] = 'OK';
$string['proxyurl'] = 'PROXY_URL:';
$string['cachedir'] = 'CACHE_DIR:';
$string['serviceurl'] = 'SERVICE_URL:';
$string['wqsummary'] = 'This adds a generic WIRIS question. Only for test purpose. It will be hide from here.';
$string['wirisquestionincorrect'] = 'Sorry! The system can not generate one of the questions of the quiz. <br />Maybe there is a temporary connection problem right now. <br />Maybe the question algorithm has a bug, and fails sometimes. <br />Maybe it will fail always. <br />Don\'t panic... <br />You can retry the quiz, without penalty, just clicking Continue. <br />You can also tell the Teachers that there is an issue with the question titled: \'{$a->questionname}\'';
$string['wirisquizzeserror'] = 'Sorry! There was an error in WIRIS quizzes.';
$string['failedtoloadwirisquizzesfromxml'] = 'Failed to load WIRIS quizzes XML definition for question id';
63 changes: 61 additions & 2 deletions lang/el/qtype_wq.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,64 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

$string['wq'] = 'Μαθηματικά και επιστήμη από τη WIRIS';
$string['pluginname'] = 'Μαθηματικά και επιστήμη από τη WIRIS';
$string['wq'] = 'Μαθηματικά και επιστήμη από τη WIRIS';;
$string['pluginname'] = 'Μαθηματικά και επιστήμη από τη WIRIS';;
$string['pluginnamesummary'] = '';
$string['wq_help'] = 'Generic WIRIS quizzes Help';
$string['editingwq'] = 'Editing a generic WIRIS question';
$string['addingwq'] = 'Adding a generic WIRIS question';
$string['cachedef_images'] = "WIRIS Quizzes images.";
$string['error'] = 'ERROR';
$string['info_maintitle'] = "Moodle 2.x WIRIS quizzes test page";
$string['info_tableheader_test'] = "Test";
$string['info_tableheader_report'] = "Report";
$string['info_tableheader_status'] = "Status";
$string['info_disabled'] = "DISABLED";
$string['info_enabled'] = "ENABLED";
$string['info_enabled'] = "ENABLED";
$string['info_information'] = "For more information or if you have any doubt contact WIRIS Support:";
$string['info_test1_name'] = "WIRIS quizzes version";
$string['info_test1_rt1'] = "WIRIS quizzes version is ";
$string['info_test1_rt2'] = "Impossible to find WIRIS quizzes version.";
$string['info_test2_name'] = "WIRIS plugin version";
$string['info_test2_info'] = "Check WIRIS plugin ";
$string['info_test2_infopage'] = "info page";
$string['info_test2_rt1'] = "WIRIS plugin is properly installed.";
$string['info_test2_rt2'] = "WIRIS quizzes requires WIRIS plugin 3.17.20 or greater. Your version is";
$string['info_test2_rt3'] = "Impossible to find WIRIS plugin version file.";
$string['info_test3_name'] = "Moodle version";
$string['info_test3_rt1'] = "Your moodle version is sufficiently new.";
$string['info_test3_rt2'] = "Your Moodle version is %s. WIRIS quizzes could not work correctly with Moodle version prior to 2011060313";
$string['info_test3_rt3'] = "Impossible to find Moodle version file.";
$string['info_test4_name'] = "Plugins";
$string['info_test4_pluginname1'] = "True/False question type";
$string['info_test4_pluginname2'] = "Short-Answer question type";
$string['info_test4_pluginname3'] = "Embedded answer (Cloze) question type";
$string['info_test4_pluginname4'] = "Multi Choice question type";
$string['info_test4_pluginname5'] = "Matching question type";
$string['info_test4_pluginname6'] = "Essay question type";
$string['info_test4_pluginname7'] = "Commons question type";
$string['info_test4_rt1'] = "The following WIRIS question plugins are installed:";
$string['info_test4_rt2'] = "The following WIRIS question plugins are missing:";
$string['info_test4_rt3'] = "Install";
$string['info_test5_name'] = "Database";
$string['info_test5_rt1'] = "All WIRIS tables are present.";
$string['info_test5_rt2'] = "One or more of WIRIS tables are missing.";
$string['info_test6_name'] = "WIRIS quizzes";
$string['info_test7_name'] = "Checking WIRIS configuration";
$string['info_test8_name'] = "Checking if WIRIS server is reachable";
$string['info_test8_rt1'] = "Connecting to %s at port %s";
$string['info_test9_name'] = "WIRIS quizzes service";
$string['info_test10_name'] = "Checking WIRIS quizzes functionality (variable)";
$string['info_test11_name'] = "Checking WIRIS quizzes functionality (plot)";
$string['info_test12_name'] = "Max server connections";
$string['info_test12_rt1'] = "There are currently %s active concurrent connections out of a maximum of %s. Greatest number of concurrent connections is %s.";
$string['info_test12_rt2'] = "Error with the maximum connections security system. See details: <br/><pre>%s<br/>%s</pre>";
$string['ok'] = 'OK';
$string['proxyurl'] = 'PROXY_URL:';
$string['cachedir'] = 'CACHE_DIR:';
$string['serviceurl'] = 'SERVICE_URL:';
$string['wqsummary'] = 'This adds a generic WIRIS question. Only for test purpose. It will be hide from here.';
$string['wirisquestionincorrect'] = 'Sorry! The system can not generate one of the questions of the quiz. <br />Maybe there is a temporary connection problem right now. <br />Maybe the question algorithm has a bug, and fails sometimes. <br />Maybe it will fail always. <br />Don\'t panic... <br />You can retry the quiz, without penalty, just clicking Continue. <br />You can also tell the Teachers that there is an issue with the question titled: \'{$a->questionname}\'';
$string['wirisquizzeserror'] = 'Sorry! There was an error in WIRIS quizzes.';
$string['failedtoloadwirisquizzesfromxml'] = 'Failed to load WIRIS quizzes XML definition for question id';
17 changes: 12 additions & 5 deletions lang/en/qtype_wq.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

$string['wq'] = 'Math & Science by WIRIS';
$string['pluginname'] = 'Math & Science by WIRIS';$string['pluginnamesummary'] = '';
$string['wq'] = 'Math & Science by WIRIS';;
$string['pluginname'] = 'Math & Science by WIRIS';;
$string['pluginnamesummary'] = '';
$string['wq_help'] = 'Generic WIRIS quizzes Help';
$string['editingwq'] = 'Editing a generic WIRIS question';
$string['addingwq'] = 'Adding a generic WIRIS question';
$string['wqsummary'] = 'This adds a generic WIRIS question. Only for test purpose. It will be hide from here.';
$string['wirisquestionincorrect'] = 'Sorry! The system can not generate one of the questions of the quiz. <br />Maybe there is a temporary connection problem right now. <br />Maybe the question algorithm has a bug, and fails sometimes. <br />Maybe it will fail always. <br />Don\'t panic... <br />You can retry the quiz, without penalty, just clicking Continue. <br />You can also tell the Teachers that there is an issue with the question titled: \'{$a->questionname}\'';
$string['wirisquizzeserror'] = 'Sorry! There was an error in WIRIS quizzes.';
$string['cachedef_images'] = "WIRIS Quizzes images.";
$string['error'] = 'ERROR';
$string['info_maintitle'] = "Moodle 2.x WIRIS quizzes test page";
$string['info_tableheader_test'] = "Test";
$string['info_tableheader_report'] = "Report";
Expand Down Expand Up @@ -68,3 +67,11 @@
$string['info_test12_name'] = "Max server connections";
$string['info_test12_rt1'] = "There are currently %s active concurrent connections out of a maximum of %s. Greatest number of concurrent connections is %s.";
$string['info_test12_rt2'] = "Error with the maximum connections security system. See details: <br/><pre>%s<br/>%s</pre>";
$string['ok'] = 'OK';
$string['proxyurl'] = 'PROXY_URL:';
$string['cachedir'] = 'CACHE_DIR:';
$string['serviceurl'] = 'SERVICE_URL:';
$string['wqsummary'] = 'This adds a generic WIRIS question. Only for test purpose. It will be hide from here.';
$string['wirisquestionincorrect'] = 'Sorry! The system can not generate one of the questions of the quiz. <br />Maybe there is a temporary connection problem right now. <br />Maybe the question algorithm has a bug, and fails sometimes. <br />Maybe it will fail always. <br />Don\'t panic... <br />You can retry the quiz, without penalty, just clicking Continue. <br />You can also tell the Teachers that there is an issue with the question titled: \'{$a->questionname}\'';
$string['wirisquizzeserror'] = 'Sorry! There was an error in WIRIS quizzes.';
$string['failedtoloadwirisquizzesfromxml'] = 'Failed to load WIRIS quizzes XML definition for question id';
Loading