Skip to content

Commit

Permalink
Merge branch 'davidherney:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpchi authored Dec 11, 2024
2 parents 73f8e2d + 9ef67ac commit dfbdab6
Show file tree
Hide file tree
Showing 51 changed files with 3,198 additions and 1,272 deletions.
86 changes: 53 additions & 33 deletions .github/workflows/moodle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:

services:
postgres:
image: postgres:12 # Moodle 4.0: >= 10
image: postgres:13 # Moodle 4.2: >=13
env:
POSTGRES_USER: 'postgres'
POSTGRES_HOST_AUTH_METHOD: 'trust'
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
mariadb:
image: mariadb:10.5 # Moodle 4.0 >=10.2.29
image: mariadb:10.6 # Moodle 4.2: >=10.6.7
env:
MYSQL_USER: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
Expand All @@ -32,22 +32,29 @@ jobs:
fail-fast: false
matrix:
include:
# Moodle 4.0, PHP 7.3, PostgreSQL
- php: '7.3' # 7.3-8.0
moodle-branch: 'MOODLE_400_STABLE'
database: pgsql
# Moodle 4.1, PHP 7.4, MariaDB
- php: '7.4' # 7.4-8.0
moodle-branch: 'MOODLE_401_STABLE'
# Moodle 4.4, PHP 8.1, MariaDB
- php: '8.1'
moodle-branch: 'MOODLE_404_STABLE'
database: mariadb
plugin-ci: ^4
# Moodle 4.4, PHP 8.2, MariaDB
- php: '8.2'
moodle-branch: 'MOODLE_404_STABLE'
database: mariadb
# Moodle 4.1, PHP 8.0, PostgreSQL
- php: '8.0' # 7.4-8.0
moodle-branch: 'MOODLE_401_STABLE'
plugin-ci: ^4
# Moodle 4.4, PHP 8.3, MariaDB
- php: '8.3'
moodle-branch: 'MOODLE_404_STABLE'
database: mariadb
plugin-ci: ^4
# Moodle 4.4, PHP 8.2, PostgreSQL
- php: '8.3'
moodle-branch: 'MOODLE_404_STABLE'
database: pgsql

plugin-ci: ^4
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: plugin

Expand All @@ -57,11 +64,13 @@ jobs:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
ini-values: max_input_vars=5000
# If you are not using code coverage, keep "none". Otherwise, use "pcov" (Moodle 3.10 and up) or "xdebug".
# If you try to use code coverage with "none", it will fallback to phpdbg (which has known problems).
coverage: none

- name: Initialise moodle-plugin-ci
run: |
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ${{ matrix.plugin-ci }}
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
sudo locale-gen en_AU.UTF-8
Expand All @@ -73,49 +82,60 @@ jobs:
env:
DB: ${{ matrix.database }}
MOODLE_BRANCH: ${{ matrix.moodle-branch }}
# Uncomment this to run Behat tests using the Moodle App.
# MOODLE_APP: 'true'

- name: PHP Lint
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci phplint

- name: PHP Copy/Paste Detector
continue-on-error: true # This step will show errors but will not fail
if: ${{ always() }}
run: moodle-plugin-ci phpcpd

- name: PHP Mess Detector
continue-on-error: true # This step will show errors but will not fail
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci phpmd

- name: Moodle Code Checker
if: ${{ always() }}
run: moodle-plugin-ci codechecker --max-warnings 0
if: ${{ !cancelled() }}
run: moodle-plugin-ci phpcs --max-warnings 0

- name: Moodle PHPDoc Checker
if: ${{ always() }}
run: moodle-plugin-ci phpdoc
if: ${{ !cancelled() }}
run: moodle-plugin-ci phpdoc --max-warnings 0

- name: Validating
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci validate

- name: Check upgrade savepoints
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci savepoints

- name: Mustache Lint
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci mustache

- name: Grunt
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci grunt --max-lint-warnings 0

- name: PHPUnit tests
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci phpunit --fail-on-warning

- name: Behat features
if: ${{ always() }}
run: moodle-plugin-ci behat --profile chrome
id: behat
if: ${{ !cancelled() }}
run: moodle-plugin-ci behat --profile chrome

- name: Upload Behat Faildump
if: ${{ failure() && steps.behat.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: Behat Faildump (${{ join(matrix.*, ', ') }})
path: ${{ github.workspace }}/moodledata/behat_dump
retention-days: 7
if-no-files-found: ignore

- name: Mark cancelled jobs as failed.
if: ${{ cancelled() }}
run: exit 1
63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# COURSE FORMAT Onetopic

Package tested in: moodle 4.4+.

## QUICK INSTALL
Download zip package, extract the onetopic folder and upload this folder into course/format/.

## ABOUT
* **Developed by:** David Herney - davidherney at gmail dot com
* **GIT:** https://github.com/davidherney/moodle-format_onetopic
* **Powered by:** [BambuCo](https://bambuco.co/)
* **Documentation:** [En](https://bambuco.co/onetopic-en/) - [Es](https://bambuco.co/onetopic/)

## COMING SOON
* Fix: the topics bar is not refresh when change (move a section in boost sections bar) or delete a section.

## IN VERSION

### 2024050901:
* Compatibility with moodle 4.4

### 2024050303:
* Update section control menu for Moodle 4.2 and stabilization improvements.

### 2024050301:
* Support bulk edit tools.

### 2022081610:
* New tabs view option: course index
* ![Tabs view Course index](https://boa.nuestroscursos.net/api/c/web/resources/NDU1MEVCNjAtODQ4Qy00RTk3LUI2NzUtOUJBN0E5ODk0QTkyQGJvYS51ZGVhLmVkdS5jbw==/!/onetopic/tabsview_courseindex.png)
* New scope to show tabs: modules. Included admin setting to enable it. Funded by [Ecole hôtelière de Lausanne](https://www.ehl.edu/)
* ![Scope modules](https://boa.nuestroscursos.net/api/c/web/resources/NDU1MEVCNjAtODQ4Qy00RTk3LUI2NzUtOUJBN0E5ODk0QTkyQGJvYS51ZGVhLmVkdS5jbw==/!/onetopic/tabs_scopemodules.png)

### 2022081609:
* New tabs style editor in site settings. Funded by [Ecole hôtelière de Lausanne](https://www.ehl.edu/)
* ![Editor preview](https://boa.nuestroscursos.net/api/c/web/resources/NDU1MEVCNjAtODQ4Qy00RTk3LUI2NzUtOUJBN0E5ODk0QTkyQGJvYS51ZGVhLmVkdS5jbw==/!/onetopic/tabs_styles_editor.png)
* Show "Availability information" in tabs and in the template mode.
1. ![Availability_information](https://boa.nuestroscursos.net/api/c/web/resources/NDU1MEVCNjAtODQ4Qy00RTk3LUI2NzUtOUJBN0E5ODk0QTkyQGJvYS51ZGVhLmVkdS5jbw==/!/onetopic/tpl_availability_information.png)
2. ![Availability_information window](https://boa.nuestroscursos.net/api/c/web/resources/NDU1MEVCNjAtODQ4Qy00RTk3LUI2NzUtOUJBN0E5ODk0QTkyQGJvYS51ZGVhLmVkdS5jbw==/!/onetopic/tpl_availability_information_window.png)

### 2022081608:
* Navigation options: Next/previous section, with different display options.
* A site setting option to define if use an anchor to navigate to the top of tabs when click in a tab.
* New course setting to hide the course index bar.

### 2022081607:
* Duplicate section feature.

### 2022081606:
* Enable/disable custom styles in site level
* Chevron icon for tabs with child's
* New CSS class for tabs with child's: haschilds

### 2022081605:
* Check compatibility with moodle 4.1
* Add section move controls
* Notice in the tab bar when a course is being edited and the tabs are hidden from students

### 2022081604:
* Stabilization

### 2022081602:
* Compatibility with moodle 4.0
41 changes: 0 additions & 41 deletions README.txt

This file was deleted.

4 changes: 2 additions & 2 deletions amd/build/main.min.js

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

2 changes: 1 addition & 1 deletion amd/build/main.min.js.map

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

Loading

0 comments on commit dfbdab6

Please sign in to comment.