Skip to content

Commit 3908f03

Browse files
committed
little overall changes
1 parent dcedfa0 commit 3908f03

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

classes/moodleoverflow.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static function get_events(): array {
4747
global $DB;
4848

4949
// If moodleoverflow is not installed or not activated, return empty array.
50-
if (!$DB->get_record('modules', ['name' => 'forum', 'visible' => 1])) {
50+
if (!$DB->get_record('modules', ['name' => 'moodleoverflow', 'visible' => 1])) {
5151
return [];
5252
}
5353

@@ -66,9 +66,10 @@ public static function get_events(): array {
6666
if ( (townsquare_filter_availability($event)) ||
6767
($event->eventtype == 'expectcompletionon' && townsquare_filter_activitycompletions($event))) {
6868
unset($moodleoverflowevents[$key]);
69+
continue;
6970
}
7071

71-
// Add the name of the instance to events.
72+
// Add the name of the instance to the event.
7273
if ($event->eventtype != 'post') {
7374
$event->instancename = $DB->get_field($event->modulename, 'name', ['id' => $event->instance]);
7475
}

lang/en/moodleoverflow.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
* @copyright 2024 Tamaro Walter
2323
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2424
*/
25+
$string['pluginname'] = 'Townsquaresubplugin for mod_moodleoverflow';
2526
$string['pluginname'] = 'Moodleoverflow support for townsquare block';
2627
$string['pluginnameadding'] = "Adding a Moodleoverflow support subplugin";
2728
$string['pluginnameediting'] = "Editing a Moodleoverflow support subplugin";
28-
$string['pluginnamesummary'] = "This subplugin allows the townsquare block to show new posts from moodleoverflow.";
29-
$string['pluginname_help'] = 'This subplugin allows the townsquare block to show posts from moodleoverflow.';
29+
$string['pluginnamesummary'] = "This subplugin allows the townsquare block to show posts and events from moodleoverflow.";
30+
$string['pluginname_help'] = 'This subplugin allows the townsquare block to show posts and events from moodleoverflow.';

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
$plugin->component = 'townsquareexpansion_moodleoverflow';
2727
$plugin->dependencies = ['local_townsquaresupport' => ANY_VERSION];
2828
$plugin->release = '0.1.0';
29-
$plugin->version = 2024011503;
29+
$plugin->version = 2024050900;
3030
$plugin->requires = 2022041900;
3131
$plugin->maturity = MATURITY_ALPHA;

0 commit comments

Comments
 (0)