Skip to content

Commit

Permalink
Merge pull request #32 from wiris/master
Browse files Browse the repository at this point in the history
Master
  • Loading branch information
ptorrent-at-wiris authored May 6, 2021
2 parents 8dc7a57 + d6c1543 commit d8700f1
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 43 deletions.
118 changes: 81 additions & 37 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,90 @@
notifications:
email: false

language: php

sudo: required
dist: trusty

#branches:
# only:
# - master

addons:
firefox: "47.0.1"
postgresql: "9.4"
apt:
packages:
- chromium-chromedriver
postgresql: "9.6"

services:
- postgresql

jobs:
# Enable fast finish.
# This will fail the build if a single job fails (except those in allow_failures).
# It will not stop the jobs from running.
fast_finish: true

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

php:
- 7.0
# - 7.0
- 7.1
- 7.2
# - 7.2
# - 7.3
- 7.4

env:
global:
- IGNORE_PATHS=classes/privacy,ignore,node_modules,quizzes,lang
# - IGNORE_NAMES=ignore_name.php
# - MUSTACHE_IGNORE_NAMES=broken.mustache
# - PROFILE=chrome
- COVERAGE=false
- PHPUNIT_IGNORE_PATHS=classes/privacy,ignore,node_modules,quizzes,lang
- DB=pgsql

matrix:
- MOODLE_BRANCH=MOODLE_35_STABLE DB=mysqli IGNORE_PATHS=integration,filtersettings.php,quizzes,lang
- MOODLE_BRANCH=MOODLE_35_STABLE DB=pgsql IGNORE_PATHS=integration,filtersettings.php,quizzes,lang
- MOODLE_BRANCH=MOODLE_36_STABLE DB=mysqli IGNORE_PATHS=integration,filtersettings.php,quizzes,lang
- MOODLE_BRANCH=MOODLE_36_STABLE DB=pgsql IGNORE_PATHS=integration,filtersettings.php,quizzes,lang
- MOODLE_BRANCH=MOODLE_37_STABLE DB=mysqli IGNORE_PATHS=integration,filtersettings.php,quizzes,lang
- MOODLE_BRANCH=MOODLE_37_STABLE DB=pgsql IGNORE_PATHS=integration,filtersettings.php,quizzes,lang
- MOODLE_BRANCH=MOODLE_311_STABLE
- MOODLE_BRANCH=MOODLE_310_STABLE
- MOODLE_BRANCH=MOODLE_39_STABLE
- MOODLE_BRANCH=MOODLE_38_STABLE
- MOODLE_BRANCH=MOODLE_37_STABLE
- MOODLE_BRANCH=MOODLE_36_STABLE
- MOODLE_BRANCH=MOODLE_35_STABLE

matrix:
exclude:
- php: 7.0
env: MOODLE_BRANCH=MOODLE_37_STABLE DB=mysqli IGNORE_PATHS=integration,filtersettings.php,quizzes,lang
- php: 7.0
env: MOODLE_BRANCH=MOODLE_37_STABLE DB=pgsql IGNORE_PATHS=integration,filtersettings.php,quizzes,lang
- php: 7.2
env: MOODLE_BRANCH=MOODLE_32_STABLE DB=mysqli IGNORE_PATHS=integration,filtersettings.php,quizzes,lang
- php: 7.2
env: MOODLE_BRANCH=MOODLE_32_STABLE DB=pgsql IGNORE_PATHS=integration,filtersettings.php,quizzes,lang
- php: 7.2
env: MOODLE_BRANCH=MOODLE_33_STABLE DB=mysqli IGNORE_PATHS=integration,filtersettings.php,quizzes,lang
- php: 7.2
env: MOODLE_BRANCH=MOODLE_33_STABLE DB=pgsql IGNORE_PATHS=integration,filtersettings.php,quizzes,lang
- php: 7.1
env: MOODLE_BRANCH=MOODLE_38_STABLE
- php: 7.1
env: MOODLE_BRANCH=MOODLE_39_STABLE
- php: 7.1
env: MOODLE_BRANCH=MOODLE_310_STABLE
- php: 7.1
env: MOODLE_BRANCH=MOODLE_311_STABLE
- php: 7.1
env: MOODLE_BRANCH=MOODLE_39_STABLE
- php: 7.1
env: MOODLE_BRANCH=MOODLE_310_STABLE
- php: 7.1
env: MOODLE_BRANCH=MOODLE_311_STABLE
- php: 7.4
env: MOODLE_BRANCH=MOODLE_35_STABLE
- php: 7.4
env: MOODLE_BRANCH=MOODLE_36_STABLE
- php: 7.4
env: MOODLE_BRANCH=MOODLE_37_STABLE


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

install:
- nvm install 14.0.0
- nvm use 14.0.0
- moodle-plugin-ci add-plugin wiris/moodle-atto_wiris
- moodle-plugin-ci add-plugin --branch master wiris/moodle-filter_wiris
- moodle-plugin-ci add-plugin wiris/moodle-qtype_wq
- moodle-plugin-ci add-plugin wiris/moodle-filter_wiris
- moodle-plugin-ci add-plugin --branch $TRAVIS_BRANCH wiris/moodle-qtype_wq
- moodle-plugin-ci install

script:
Expand All @@ -71,8 +93,30 @@ script:
- moodle-plugin-ci phpmd
- moodle-plugin-ci codechecker
- moodle-plugin-ci validate
- moodle-plugin-ci phpunit
- moodle-plugin-ci savepoints
- moodle-plugin-ci mustache
- moodle-plugin-ci grunt
- moodle-plugin-ci behat --profile chrome
# - if [ "$MOODLE_BRANCH" = MOODLE_35_STABLE ]; then
# moodle-plugin-ci grunt;
# fi
# - if [ "$MOODLE_BRANCH" = MOODLE_36_STABLE ]; then
# moodle-plugin-ci grunt;
# fi
# - if [ "$MOODLE_BRANCH" = MOODLE_37_STABLE ]; then
# moodle-plugin-ci grunt;
# fi
# - if [ "$MOODLE_BRANCH" = MOODLE_38_STABLE ]; then
# moodle-plugin-ci grunt -t eslint;
# fi
# - if [ "$MOODLE_BRANCH" = MOODLE_39_STABLE ]; then
# moodle-plugin-ci grunt -t eslint;
# fi
# - if [ "$MOODLE_BRANCH" = MOODLE_310_STABLE ]; then
# moodle-plugin-ci grunt -t eslint;
# fi
# - if [ "$MOODLE_BRANCH" = MOODLE_311_STABLE ]; then
# moodle-plugin-ci grunt -t eslint;
# fi
- moodle-plugin-ci phpunit
- moodle-plugin-ci behat
# - moodle-plugin-ci behat --profile $PROFILE
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Wiris Quizzes Essay question type
### Master Build Status
[![Build Status](https://travis-ci.org/wiris/moodle-qtype_essaywiris.svg?branch=master)](https://travis-ci.org/wiris/moodle-qtype_essaywiris)
### Development Build Status
[![Build Status](https://travis-ci.org/wiris/moodle-qtype_essaywiris.svg?branch=development)](https://travis-ci.org/wiris/moodle-qtype_essaywiris)
[![Build Status](https://travis-ci.com/wiris/moodle-qtype_essaywiris.svg)](https://travis-ci.com/wiris/moodle-qtype_essaywiris)

The Wiris Essay question type extends the Moodle Essay type, adding mathematical functionality to it.

Expand All @@ -21,8 +19,14 @@ Then add /question/type/essaywiris to your git ignore.

Alternatively, download the zip from <https://github.com/wiris/moodle-qtype_essaywiris/archive/master.zip> it into the question/type folder, and then rename the new folder to "essaywiris".

## Technical Support

## License
If you have questions or need help integrating MathType, please contact us ([email protected]) instead of opening an issue.

## Privacy policy

The [MathType Privacy Policy](https://www.wiris.com/mathtype/privacy-policy) covers the data processing operations for the MathType users. It is an addendum of the company’s general Privacy Policy and the [general Privacy Policy](https://wiris.com/en/privacy-policy) still applies to MathType users.

## License

Wiris Essay question type is Licensed under the [GNU General Public, License Version 3](https://www.gnu.org/licenses/gpl-3.0.en.html).
8 changes: 8 additions & 0 deletions question.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class qtype_essaywiris_question extends qtype_wq_question implements question_ma
public $graderinfoformat;
public $responsetemplate;
public $responsetemplateformat;
public $maxbytes;
public $filetypeslist;

public function join_all_text() {
$text = parent::join_all_text();
Expand Down Expand Up @@ -69,4 +71,10 @@ public function is_complete_response(array $response) {
}
return $complete;
}

public function get_word_count_message_for_review(array $response): string {
return $this->base->get_word_count_message_for_review($response);
}


}
3 changes: 1 addition & 2 deletions renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ public function formulation_and_controls(question_attempt $qa, question_display_
$result = $this->base->formulation_and_controls($qa, $options);

// Auxiliar text.
$showauxiliartextinput = $qa->get_question()->wirisquestion->question->getProperty(
com_wiris_quizzes_api_QuizzesConstants::$PROPERTY_SHOW_AUXILIAR_TEXT_INPUT); // @codingStandardsIgnoreLine
$showauxiliartextinput = $qa->get_question()->wirisquestion->question->getProperty(com_wiris_quizzes_api_QuizzesConstants::$PROPERTY_SHOW_AUXILIAR_TEXT_INPUT); // @codingStandardsIgnoreLine
if ($showauxiliartextinput) {
$result .= $this->auxiliar_text($qa, $options);
}
Expand Down

0 comments on commit d8700f1

Please sign in to comment.