Skip to content

Commit b7e6f2c

Browse files
authored
Merge pull request #6 from santoshndev/moodle-50-plugin
Moodle 50 compatibility changes
2 parents c1c78af + bd63493 commit b7e6f2c

20 files changed

+68
-45
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
services:
1010
postgres:
11-
image: postgres:13
11+
image: postgres:14
1212
env:
1313
POSTGRES_USER: 'postgres'
1414
POSTGRES_HOST_AUTH_METHOD: 'trust'
@@ -55,6 +55,18 @@ jobs:
5555
- php: '8.3'
5656
moodle-branch: 'MOODLE_404_STABLE'
5757
database: pgsql
58+
- php: '8.3'
59+
moodle-branch: 'MOODLE_405_STABLE'
60+
database: mariadb
61+
- php: '8.3'
62+
moodle-branch: 'MOODLE_405_STABLE'
63+
database: pgsql
64+
- php: '8.3'
65+
moodle-branch: 'MOODLE_500_STABLE'
66+
database: mariadb
67+
- php: '8.4'
68+
moodle-branch: 'MOODLE_500_STABLE'
69+
database: pgsql
5870

5971
steps:
6072
- name: Check out repository code

README.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
1-
# Site Statistics
2-
Site Statistics Block for Moodle
3-
4-
This block is generally used to show the site statistics such as total number of active users, courses, activities and disk usage on dashboard.
5-
6-
This block can be added & viewed by administrator and manager role. Other user roles can also view this block if they are allowed to view it.
7-
8-
This block provides shortcuts to user management, course management and activity management through the hyperlinks added to the counts.
9-
10-
This block comes with English, Marathi and Hindi language strings.
11-
12-
# #Author
13-
14-
Author: Santosh Nagargoje
15-
16-
Web profile: https://santoshnagargoje.in/
1+
# Site Statistics
2+
Site Statistics Block for Moodle
3+
4+
This block is generally used to show the site statistics such as total number of active users, courses, activities and disk usage on dashboard.
5+
6+
This block can be added & viewed by administrator and manager role. Other user roles can also view this block if they are allowed to view it.
7+
8+
This block provides shortcuts to user management, course management and activity management through the hyperlinks added to the counts.
9+
10+
This block comes with English, Marathi and Hindi language strings.
11+
12+
# How to use
13+
1. Login as an administrator.
14+
2. Go to Dashboard page.
15+
3. Turn Editing on
16+
4. Click on Add a block
17+
5. Select Site Statistics from the list
18+
6. Check block added on Dashboard page
19+
**Note**: In order to get the disk usage value, the **Calculate Disk Usage** task should be executed. By default, it's scheduled on midnight every day but you are free to reschedule it as per your requirement.
20+
21+
# Author
22+
23+
Santosh Nagargoje
24+
25+
Web profile: https://santoshnagargoje.in/

block_site_stats.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Contains the class for the Site Statistics block.
1919
*
2020
* @package block_site_stats
21-
* @copyright 2024 Santosh Nagargoje <santosh.nag2217@gmail.com>
21+
* @copyright 2025 Santosh Nagargoje <santosh.nag2217@gmail.com>
2222
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2323
*/
2424
class block_site_stats extends block_base {

classes/observer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* The observer class needed by the site stats block.
2222
*
2323
* @package block_site_stats
24-
* @copyright 2024 Santosh Nagargoje <santosh.nag2217@gmail.com>
24+
* @copyright 2025 Santosh Nagargoje <santosh.nag2217@gmail.com>
2525
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2626
*/
2727
class observer {

classes/output/main.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* Class containing data for Site Statistics block.
2424
*
2525
* @package block_site_stats
26-
* @copyright 2024 Santosh Nagargoje <santosh.nag2217@gmail.com>
26+
* @copyright 2025 Santosh Nagargoje <santosh.nag2217@gmail.com>
2727
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2828
*/
2929
class main implements \templatable, \renderable {

classes/output/renderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* site stats block renderer
2222
*
2323
* @package block_site_stats
24-
* @copyright 2024 Santosh Nagargoje <santosh.nag2217@gmail.com>
24+
* @copyright 2025 Santosh Nagargoje <santosh.nag2217@gmail.com>
2525
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2626
*/
2727
class renderer extends plugin_renderer_base {

classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Privacy Subsystem implementation for block_site_stats.
1919
*
2020
* @package block_site_stats
21-
* @copyright 2024 Santosh Nagargoje <santosh.nag2217@gmail.com>
21+
* @copyright 2025 Santosh Nagargoje <santosh.nag2217@gmail.com>
2222
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2323
*/
2424

classes/task/diskusage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* Calculates the disk usage
2222
*
2323
* @package block_site_stats
24-
* @copyright 2024 Santosh Nagargoje <santosh.nag2217@gmail.com>
24+
* @copyright 2025 Santosh Nagargoje <santosh.nag2217@gmail.com>
2525
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2626
*/
2727
class diskusage extends \core\task\scheduled_task {

db/access.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Site Statistics block caps.
1919
*
2020
* @package block_site_stats
21-
* @copyright 2024 Santosh Nagargoje <santosh.nag2217@gmail.com>
21+
* @copyright 2025 Santosh Nagargoje <santosh.nag2217@gmail.com>
2222
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2323
*/
2424
defined('MOODLE_INTERNAL') || die();

db/caches.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Defines the cache usage
1919
*
2020
* @package block_site_stats
21-
* @copyright 2024 Santosh Nagargoje <santosh.nag2217@gmail.com>
21+
* @copyright 2025 Santosh Nagargoje <santosh.nag2217@gmail.com>
2222
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2323
*/
2424

0 commit comments

Comments
 (0)