Skip to content
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
116 changes: 50 additions & 66 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,102 +1,86 @@
language: php

sudo: false
dist: trusty
os: linux
dist: xenial

addons:
firefox: "47.0.1"
postgresql: "9.4"
apt:
packages:
- oracle-java9-installer
- oracle-java9-set-default
postgresql: "9.5"

services: mysql

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

php:
- 7.0
- 7.1
- 7.3

matrix:
exclude:
- php: 7.0
env: DB=pgsql MOODLE_BRANCH=master
- php: 7.0
env: DB=mysqli MOODLE_BRANCH=master
- php: 7.0
env: DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE
- php: 7.0
env: DB=mysqli MOODLE_BRANCH=MOODLE_37_STABLE
- php: 7.0
env: DB=pgsql MOODLE_BRANCH=MOODLE_38_STABLE
- php: 7.0
env: DB=mysqli MOODLE_BRANCH=MOODLE_38_STABLE
- php: 7.3
env: DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE
- php: 7.3
env: DB=mysqli MOODLE_BRANCH=MOODLE_35_STABLE
fast_finish: true
- 7.2
- 7.3
- 7.4

env:
global:
- BEHAT=yes
- MUSTACHE_IGNORE_NAMES="email_html_body.mustache, email_html.mustache, email_text.mustache"
matrix:
- DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE
- DB=pgsql MOODLE_BRANCH=MOODLE_36_STABLE
- DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE
- DB=pgsql MOODLE_BRANCH=MOODLE_38_STABLE
- DB=pgsql MOODLE_BRANCH=master
- DB=mysqli MOODLE_BRANCH=MOODLE_35_STABLE
- DB=mysqli MOODLE_BRANCH=MOODLE_36_STABLE
- DB=mysqli MOODLE_BRANCH=MOODLE_37_STABLE
- DB=mysqli MOODLE_BRANCH=MOODLE_38_STABLE
- DB=mysqli MOODLE_BRANCH=master
global:
- BEHAT=yes
- MUSTACHE_IGNORE_NAMES="email_html_body.mustache, email_html.mustache, email_text.mustache"
jobs:
- DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE
- DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE
- DB=pgsql MOODLE_BRANCH=MOODLE_38_STABLE
- DB=pgsql MOODLE_BRANCH=MOODLE_39_STABLE
- DB=pgsql MOODLE_BRANCH=master
- DB=mysqli MOODLE_BRANCH=MOODLE_35_STABLE
- DB=mysqli MOODLE_BRANCH=MOODLE_37_STABLE
- DB=mysqli MOODLE_BRANCH=MOODLE_38_STABLE
- DB=mysqli MOODLE_BRANCH=MOODLE_39_STABLE
- DB=mysqli MOODLE_BRANCH=master

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

jobs:
fast_finish: true
include:
# Prechecks against latest Moodle stable only.
- stage: static
php: 7.3
env: DB=mysqli MOODLE_BRANCH=MOODLE_37_STABLE
php: 7.4
env: DB=mysqli MOODLE_BRANCH=MOODLE_39_STABLE
install:
- moodle-plugin-ci install --no-init
- moodle-plugin-ci install --no-init
script:
- moodle-plugin-ci phplint
- moodle-plugin-ci phpcpd
- moodle-plugin-ci phpmd
- moodle-plugin-ci codechecker
- moodle-plugin-ci validate
- moodle-plugin-ci savepoints
- moodle-plugin-ci mustache
- moodle-plugin-ci grunt || [ "$MOODLE_BRANCH" = 'master' ]

- moodle-plugin-ci phplint
- moodle-plugin-ci phpcpd
- moodle-plugin-ci phpmd
- moodle-plugin-ci codechecker
- moodle-plugin-ci validate
- moodle-plugin-ci savepoints
- moodle-plugin-ci mustache
- moodle-plugin-ci grunt
# Smaller build matrix for development builds
- stage: develop
php: 7.3
php: 7.4
env: DB=mysqli MOODLE_BRANCH=MOODLE_39_STABLE
exclude:
- php: 7.3
env: DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE
- php: 7.3
env: DB=mysqli MOODLE_BRANCH=MOODLE_35_STABLE
- php: 7.4
env: DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE
- php: 7.4
env: DB=mysqli MOODLE_BRANCH=MOODLE_35_STABLE
- php: 7.4
env: DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE
- php: 7.4
env: DB=mysqli MOODLE_BRANCH=MOODLE_37_STABLE
install:
- moodle-plugin-ci install
script:
- moodle-plugin-ci phpunit --coverage-clover
- moodle-plugin-ci behat

# Default 'test' stage: Unit tests and behat tests against full matrix.
install:
- moodle-plugin-ci install

script:
- moodle-plugin-ci phpunit --coverage-clover
- moodle-plugin-ci behat
Expand Down
3 changes: 2 additions & 1 deletion amd/build/functions.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions amd/build/functions.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion post.php
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@
$post->message .= '<p><span class="edited">(' . get_string('editedby', 'moodleoverflow', $data) . ')</span></p>';
} else {
$data->name = fullname($USER);
$post->message .= "\n\n(" . get_string('editedby', 'moodleoverflow', $data) - ')';
$post->message .= "\n\n(" . get_string('editedby', 'moodleoverflow', $data) . ')';
}

// Delete the temporary object.
Expand Down
2 changes: 1 addition & 1 deletion tests/behat/add_moodleoverflow.feature
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Feature: Add moodleoverflow activities and discussions
And I add a new discussion to "Test moodleoverflow name" moodleoverflow with:
| Subject | Forum post 1 |
| Message | This is the body |
And I log out
And I log out
2 changes: 1 addition & 1 deletion tests/behat/edit_post_student.feature
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ Feature: Students can edit or delete their moodleoverflow posts within a set tim
Given I follow "Moodleoverflow post subject"
When I follow "Delete"
And I press "Continue"
Then I should not see "Moodleoverflow post subject"
Then I should not see "Moodleoverflow post subject"
2 changes: 1 addition & 1 deletion tests/behat/moodleoverflow_subscriptions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ Feature: A user can control their own subscription preferences for a moodleoverf
And I follow "Subscribe to this forum"
And I should see "Student One will be notified of new posts in 'Test moodleoverflow name'"
And I should see "Unsubscribe from this forum"
And I should not see "Subscribe to this forum"
And I should not see "Subscribe to this forum"
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'mod_moodleoverflow';
$plugin->version = 2019112100;
$plugin->release = 'v3.8-r1';
$plugin->version = 2020060500;
$plugin->release = 'v3.9-r1';
$plugin->requires = 2018051703;
$plugin->maturity = MATURITY_STABLE;
$plugin->dependencies = array();