Skip to content

Commit a3976b7

Browse files
committed
issue #1: plugin skeleton
0 parents  commit a3976b7

File tree

4 files changed

+140
-0
lines changed

4 files changed

+140
-0
lines changed

README.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Dynamic cohort rules #
2+
3+
TODO Describe the plugin shortly here.
4+
5+
TODO Provide more detailed description here.
6+
7+
## Installing via uploaded ZIP file ##
8+
9+
1. Log in to your Moodle site as an admin and go to _Site administration >
10+
Plugins > Install plugins_.
11+
2. Upload the ZIP file with the plugin code. You should only be prompted to add
12+
extra details if your plugin type is not automatically detected.
13+
3. Check the plugin validation report and finish the installation.
14+
15+
## Installing manually ##
16+
17+
The plugin can be also installed by putting the contents of this directory to
18+
19+
{your/moodle/dirroot}/admin/tool/dynamic_cohorts
20+
21+
Afterwards, log in to your Moodle site as an admin and go to _Site administration >
22+
Notifications_ to complete the installation.
23+
24+
Alternatively, you can run
25+
26+
$ php admin/cli/upgrade.php
27+
28+
to complete the installation from the command line.
29+
30+
## License ##
31+
32+
2024 Catalyst IT
33+
34+
This program is free software: you can redistribute it and/or modify it under
35+
the terms of the GNU General Public License as published by the Free Software
36+
Foundation, either version 3 of the License, or (at your option) any later
37+
version.
38+
39+
This program is distributed in the hope that it will be useful, but WITHOUT ANY
40+
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
41+
PARTICULAR PURPOSE. See the GNU General Public License for more details.
42+
43+
You should have received a copy of the GNU General Public License along with
44+
this program. If not, see <https://www.gnu.org/licenses/>.

db/access.php

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
// This file is part of Moodle - https://moodle.org/
3+
//
4+
// Moodle is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// Moodle is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.
16+
17+
/**
18+
* Plugin capabilities are defined here.
19+
*
20+
* @package tool_dynamic_cohorts
21+
* @category access
22+
* @copyright 2024 Catalyst IT
23+
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24+
*/
25+
26+
defined('MOODLE_INTERNAL') || die();
27+
28+
$capabilities = [
29+
30+
'tool/dynamic_cohorts:manage' => [
31+
'captype' => 'write',
32+
'contextlevel' => CONTEXT_SYSTEM,
33+
'archetypes' => [
34+
],
35+
],
36+
];

lang/en/tool_dynamic_cohorts.php

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
// This file is part of Moodle - https://moodle.org/
3+
//
4+
// Moodle is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// Moodle is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.
16+
17+
/**
18+
* Plugin strings are defined here.
19+
*
20+
* @package tool_dynamic_cohorts
21+
* @category string
22+
* @copyright 2024 Catalyst IT
23+
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24+
*/
25+
26+
defined('MOODLE_INTERNAL') || die();
27+
28+
$string['dynamic_cohorts:manage'] = 'Manage rules';
29+
$string['pluginname'] = 'Dynamic cohort rules';

version.php

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
// This file is part of Moodle - https://moodle.org/
3+
//
4+
// Moodle is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// Moodle is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.
16+
17+
/**
18+
* Plugin version and other meta-data are defined here.
19+
*
20+
* @package tool_dynamic_cohorts
21+
* @copyright 2024 Catalyst IT
22+
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23+
*/
24+
25+
defined('MOODLE_INTERNAL') || die();
26+
27+
$plugin->component = 'tool_dynamic_cohorts';
28+
$plugin->release = '0.1.0';
29+
$plugin->version = 2024030400;
30+
$plugin->requires = 2022112800;
31+
$plugin->maturity = MATURITY_ALPHA;

0 commit comments

Comments
 (0)