diff --git a/.travis.yml b/.travis.yml index 50273fa..ab361d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,21 @@ +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: @@ -20,49 +23,68 @@ 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: @@ -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 \ No newline at end of file + # - 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 diff --git a/README.md b/README.md index 0ee97eb..1024829 100644 --- a/README.md +++ b/README.md @@ -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. @@ -21,8 +19,14 @@ Then add /question/type/essaywiris to your git ignore. Alternatively, download the zip from 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 (support@wiris.com) 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). diff --git a/question.php b/question.php index 9a56815..c6b0f0f 100644 --- a/question.php +++ b/question.php @@ -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(); @@ -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); + } + + } diff --git a/renderer.php b/renderer.php index 2009644..22e227f 100644 --- a/renderer.php +++ b/renderer.php @@ -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); }