Skip to content

Commit

Permalink
3.58.1 stable version
Browse files Browse the repository at this point in the history
  • Loading branch information
mcagigas-at-wiris authored Nov 23, 2017
1 parent 72bf267 commit d5b9689
Show file tree
Hide file tree
Showing 14 changed files with 440 additions and 297 deletions.
69 changes: 27 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,52 @@ language: php

sudo: false

addons:
firefox: "47.0.1"
postgresql: "9.3"
apt:
packages:
- oracle-java8-installer
- oracle-java8-set-default

cache:
directories:
- $HOME/.composer/cache
- $HOME/.npm

php:
php:
- 5.6
- 7.0
- 7.1

env:
- MOODLE_BRANCH=MOODLE_31_STABLE DB=mysqli IGNORE_PATHS=quizzes
- MOODLE_BRANCH=MOODLE_30_STABLE DB=pgsql IGNORE_PATHS=quizzes
- MOODLE_BRANCH=MOODLE_29_STABLE DB=mysqli IGNORE_PATHS=quizzes
- MOODLE_BRANCH=MOODLE_28_STABLE DB=pgsql IGNORE_PATHS=quizzes
- MOODLE_BRANCH=MOODLE_27_STABLE DB=mysqli IGNORE_PATHS=quizzes

matrix:
exclude:
- php: 7.0
env: MOODLE_BRANCH=MOODLE_29_STABLE DB=mysqli IGNORE_PATHS=quizzes
- php: 7.0
env: MOODLE_BRANCH=MOODLE_28_STABLE DB=pgsql IGNORE_PATHS=quizzes
- php: 7.0
env: MOODLE_BRANCH=MOODLE_27_STABLE DB=mysqli IGNORE_PATHS=quizzes
- php: 5.6
env: MOODLE_BRANCH=MOODLE_31_STABLE DB=mysqli IGNORE_PATHS=quizzes
- php: 5.6
env: MOODLE_BRANCH=MOODLE_30_STABLE DB=pgsql IGNORE_PATHS=quizzes
- php: 5.6
env: MOODLE_BRANCH=MOODLE_29_STABLE DB=mysqli IGNORE_PATHS=quizzes
- php: 5.6
env: MOODLE_BRANCH=MOODLE_28_STABLE DB=pgsql IGNORE_PATHS=quizzes
- php: 5.6
env: MOODLE_BRANCH=MOODLE_27_STABLE DB=mysqli IGNORE_PATHS=quizzes
include:
- php: 5.4
env: MOODLE_BRANCH=MOODLE_31_STABLE DB=mysqli IGNORE_PATHS=quizzes
- php: 5.4
env: MOODLE_BRANCH=MOODLE_30_STABLE DB=pgsql IGNORE_PATHS=quizzes
- php: 5.4
env: MOODLE_BRANCH=MOODLE_29_STABLE DB=mysqli IGNORE_PATHS=quizzes
- php: 5.4
env: MOODLE_BRANCH=MOODLE_28_STABLE DB=pgsql IGNORE_PATHS=quizzes
- php: 5.4
env: MOODLE_BRANCH=MOODLE_27_STABLE DB=mysqli IGNORE_PATHS=quizzes
env:
global:
- MOODLE_BRANCH=MOODLE_32_STABLE IGNORE_PATHS=quizzes,lang
- MOODLE_BRANCH=MOODLE_33_STABLE IGNORE_PATHS=quizzes,lang
matrix:
- DB=pgsql
- DB=mysqli

before_install:
- phpenv config-rm xdebug.ini
- nvm install 8.9
- nvm use 8.9
- cd ../..
- composer selfupdate
- composer create-project -n --no-dev --prefer-dist moodlerooms/moodle-plugin-ci ci ^1
- composer create-project -n --no-dev --prefer-dist moodlerooms/moodle-plugin-ci ci ^2
- export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH"

install:
- moodle-plugin-ci add-plugin wiris/moodle-filter_wiris
- moodle-plugin-ci add-plugin --branch development wiris/moodle-filter_wiris
- moodle-plugin-ci install

script:
- moodle-plugin-ci phplint
- moodle-plugin-ci phpcpd
- moodle-plugin-ci phpmd
- moodle-plugin-ci codechecker
- moodle-plugin-ci shifter
- moodle-plugin-ci validate
- moodle-plugin-ci savepoints
- moodle-plugin-ci mustache
- moodle-plugin-ci grunt -t css
- moodle-plugin-ci phpunit
- moodle-plugin-ci behat
- moodle-plugin-ci behat
15 changes: 11 additions & 4 deletions info.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
// BEGIN HELPERS FUNCTIONS.
function wrs_assert_simple($condition) {
if ($condition) {
return '<span class="ok wrs_filter wrs_plugin">OK</span>';
return '<span class="ok wrs_filter wrs_plugin">'. get_string('ok', 'qtype_wq').'</span>';
} else {
return '<span class="error wrs_filter wrs_plugin">ERROR</span>';
return '<span class="error wrs_filter wrs_plugin">'. get_string('error', 'qtype_wq').'</span>';
}
}

Expand All @@ -40,9 +40,9 @@ function wrs_assert($condition, $reporttext, $solutionlink) {

function wrs_getstatus($condition) {
if ($condition) {
return '<span class="ok wrs_filter wrs_plugin">OK</span>';
return '<span class="ok wrs_filter wrs_plugin">'. get_string('ok', 'qtype_wq').'</span>';
} else {
return '<span class="error wrs_filter wrs_plugin">ERROR</span>';
return '<span class="error wrs_filter wrs_plugin">'. get_string('error', 'qtype_wq').'</span>';
}
}

Expand Down Expand Up @@ -94,6 +94,10 @@ function wrs_createtablerow($testname, $reporttext, $solutionlink, $condition) {
$version = $plugin->release;
$reporttext = get_string('info_test1_rt1', 'qtype_wq') . $version;
$condition = true;
} else if ($plugin->maturity == MATURITY_BETA) {
$version = $plugin->version;
$reporttext = get_string('info_test1_rt1', 'qtype_wq') . $version;
$condition = true;
} else {
$reporttext = get_string('info_test1_rt2', 'qtype_wq');
$condition = false;
Expand Down Expand Up @@ -121,6 +125,9 @@ function wrs_createtablerow($testname, $reporttext, $solutionlink, $condition) {
$reporttext = get_string('info_test2_rt2', 'qtype_wq') . ' ' . $version . ' ' . $plugininfo;
$condition = false;
}
} else if ($plugin->maturity == MATURITY_BETA) {
$reporttext = get_string('info_test2_rt1', 'qtype_wq') . ' ' . $plugininfo;
$condition = true;
} else {
$reporttext = get_string('info_test2_rt3', 'qtype_wq') . ' ' . $plugininfo;
$condition = false;
Expand Down
2 changes: 2 additions & 0 deletions question.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@ public function __construct(question_definition $base = null) {
* The random seed to be used in this question.
* **/
public function start_attempt(question_attempt_step $step, $variant) {
global $USER;
$this->base->start_attempt($step, $variant);

// Get variables from WIRIS quizzes service.
$builder = com_wiris_quizzes_api_QuizzesBuilder::getInstance();
$text = $this->join_all_text();
$this->wirisquestioninstance = $builder->newQuestionInstance($this->wirisquestion);
$this->wirisquestioninstance->setRandomSeed($variant);
$this->wirisquestioninstance->setParameter('user_id', $USER->id);

// Begin testing code. It's never used in production.
global $CFG;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ public function __construct() {
static $META_PROPERTY_REFERER = "referer";
static $META_PROPERTY_QUESTION = "question";
static $META_PROPERTY_USER = "userref";
static $PARAMETER_USER_ID = "user_id";
function __toString() { return 'com.wiris.quizzes.api.QuizzesConstants'; }
}
Loading

0 comments on commit d5b9689

Please sign in to comment.