From 856e2002caed9824566d7d94dc4421f476cae936 Mon Sep 17 00:00:00 2001 From: TamaroWalter Date: Tue, 14 May 2024 17:36:01 +0200 Subject: [PATCH 1/7] use right modulename --- classes/zoom.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/zoom.php b/classes/zoom.php index 8922583..90ffe24 100644 --- a/classes/zoom.php +++ b/classes/zoom.php @@ -94,7 +94,7 @@ private static function get_events_from_db(): array { WHERE (e.timestart >= :timestart OR e.timestart+e.timeduration > :timeduration) AND e.timestart <= :timeend AND e.courseid $insqlcourses - AND e.modulename = 'ratingallocate' + AND e.modulename = 'zoom' AND m.visible = 1 AND (e.name NOT LIKE '" .'0'. "' AND e.eventtype NOT LIKE '" .'0'. "' ) AND (e.instance <> 0 AND e.visible = 1) From b8313fcdafe052c453312140cea69a2cfc548286 Mon Sep 17 00:00:00 2001 From: TamaroWalter Date: Thu, 16 May 2024 10:23:03 +0200 Subject: [PATCH 2/7] add dependency and code clean --- classes/zoom.php | 4 ++-- version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/zoom.php b/classes/zoom.php index 90ffe24..057446c 100644 --- a/classes/zoom.php +++ b/classes/zoom.php @@ -85,8 +85,8 @@ private static function get_events_from_db(): array { + $inparamscourses; // Set the sql statement. - $sql = "SELECT e.id, e.name, z.name AS instancename , e.courseid, cm.id AS coursemoduleid, cm.availability AS availability, e.groupid, e.userid, - e.modulename, e.instance, e.eventtype, e.timestart, e.timemodified, e.visible + $sql = "SELECT e.id, e.name, z.name AS instancename , e.courseid, cm.id AS coursemoduleid, cm.availability AS availability, + e.groupid, e.userid, e.modulename, e.instance, e.eventtype, e.timestart, e.timemodified, e.visible FROM {event} e JOIN {modules} m ON e.modulename = m.name JOIN {course_modules} cm ON (cm.course = e.courseid AND cm.module = m.id AND cm.instance = e.instance) diff --git a/version.php b/version.php index 5f6ae7c..96eb088 100644 --- a/version.php +++ b/version.php @@ -24,7 +24,7 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'townsquareexpansion_zoom'; -$plugin->dependencies = ['local_townsquaresupport' => ANY_VERSION]; +$plugin->dependencies = ['local_townsquaresupport' => ANY_VERSION, 'mod_zoom' => ANY_VERSION]; $plugin->release = '0.1.0'; $plugin->version = 2024051400; $plugin->requires = 2022041900; From 48438ca0c43e47239271d53dadb73b5f99af6819 Mon Sep 17 00:00:00 2001 From: TamaroWalter Date: Fri, 7 Jun 2024 16:30:33 +0200 Subject: [PATCH 3/7] fix in language file --- lang/en/townsquareexpansion_zoom.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/en/townsquareexpansion_zoom.php b/lang/en/townsquareexpansion_zoom.php index eb1ea79..313d715 100644 --- a/lang/en/townsquareexpansion_zoom.php +++ b/lang/en/townsquareexpansion_zoom.php @@ -23,7 +23,7 @@ * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['pluginname'] = 'Townsquare subplugin for mod_zoom'; -$string['pluginname'] = 'Zoom support for townsquare block'; +$string['plugintitle'] = 'Zoom support for townsquare block'; $string['pluginnameadding'] = "Adding a zoom support subplugin"; $string['pluginnameediting'] = "Editing a zoom support subplugin"; $string['pluginnamesummary'] = "This subplugin allows the townsquare block to show events from zoom."; From 84606282dc49640c4f74f48f26ccaa40aca61e0f Mon Sep 17 00:00:00 2001 From: TamaroWalter Date: Thu, 13 Jun 2024 11:34:10 +0200 Subject: [PATCH 4/7] code cleaning --- classes/zoom.php | 2 -- lang/en/townsquareexpansion_zoom.php | 4 ++-- version.php | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/classes/zoom.php b/classes/zoom.php index 057446c..8e99d1e 100644 --- a/classes/zoom.php +++ b/classes/zoom.php @@ -55,7 +55,6 @@ public static function get_events(): array { $zoomevents = self::get_events_from_db(); // Filter out events that the user should not see. - // TODO: are the more filters needed and why? foreach ($zoomevents as $key => $event) { if (townsquare_filter_availability($event) || ($event->eventtype == "expectcompletionon" && townsquare_filter_activitycompletions($event))) { @@ -73,7 +72,6 @@ public static function get_events(): array { * @return array */ private static function get_events_from_db(): array { - // TODO: are the more or less parameters or conditions to implement? global $DB; // Prepare the parameter for sql query. diff --git a/lang/en/townsquareexpansion_zoom.php b/lang/en/townsquareexpansion_zoom.php index 313d715..a77186a 100644 --- a/lang/en/townsquareexpansion_zoom.php +++ b/lang/en/townsquareexpansion_zoom.php @@ -23,8 +23,8 @@ * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['pluginname'] = 'Townsquare subplugin for mod_zoom'; -$string['plugintitle'] = 'Zoom support for townsquare block'; +$string['pluginname_help'] = 'This subplugin allows the townsquare block to show events from zoom.'; $string['pluginnameadding'] = "Adding a zoom support subplugin"; $string['pluginnameediting'] = "Editing a zoom support subplugin"; $string['pluginnamesummary'] = "This subplugin allows the townsquare block to show events from zoom."; -$string['pluginname_help'] = 'This subplugin allows the townsquare block to show events from zoom.'; +$string['plugintitle'] = 'Zoom support for townsquare block'; diff --git a/version.php b/version.php index 96eb088..e7e400f 100644 --- a/version.php +++ b/version.php @@ -17,7 +17,7 @@ /** * Plugin version and other meta-data are defined here. * - * @package townsquareexpansion_moodleoverflow + * @package townsquareexpansion_zoom * @copyright 2024 Tamaro Walter * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ From b5f8d4cbdb3ae8ea374207f7ed3afd3b800e229e Mon Sep 17 00:00:00 2001 From: TamaroWalter Date: Thu, 20 Jun 2024 08:37:51 +0200 Subject: [PATCH 5/7] use lib instead of locallib --- classes/zoom.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/zoom.php b/classes/zoom.php index 8e99d1e..4e15a38 100644 --- a/classes/zoom.php +++ b/classes/zoom.php @@ -28,7 +28,7 @@ use local_townsquaresupport\townsquaresupportinterface; global $CFG; -require_once($CFG->dirroot . '/blocks/townsquare/locallib.php'); +require_once($CFG->dirroot . '/blocks/townsquare/lib.php'); /** * Class that implements the townsquaresupportinterface with the function to get the events from the plugin. From a5625adcf6f48d102380f3c4318aa3139b76ece0 Mon Sep 17 00:00:00 2001 From: TamaroWalter Date: Thu, 15 Aug 2024 14:20:14 -0700 Subject: [PATCH 6/7] adapt attribute to interface --- classes/zoom.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/zoom.php b/classes/zoom.php index 4e15a38..9f5fc3a 100644 --- a/classes/zoom.php +++ b/classes/zoom.php @@ -83,8 +83,9 @@ private static function get_events_from_db(): array { + $inparamscourses; // Set the sql statement. - $sql = "SELECT e.id, e.name, z.name AS instancename , e.courseid, cm.id AS coursemoduleid, cm.availability AS availability, - e.groupid, e.userid, e.modulename, e.instance, e.eventtype, e.timestart, e.timemodified, e.visible + $sql = "SELECT e.id, e.name AS content, z.name AS instancename , e.courseid, cm.id AS coursemoduleid, + cm.availability AS availability, e.groupid, e.userid, e.modulename, e.instance, e.eventtype, e.timestart, + e.timemodified, e.visible FROM {event} e JOIN {modules} m ON e.modulename = m.name JOIN {course_modules} cm ON (cm.course = e.courseid AND cm.module = m.id AND cm.instance = e.instance) From 318ccce1d1b12f7e8d0b16085f1e285d6e47822f Mon Sep 17 00:00:00 2001 From: TamaroWalter Date: Fri, 30 Aug 2024 10:42:48 +0200 Subject: [PATCH 7/7] mew moodle ci --- .github/workflows/moodle-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/moodle-ci.yml b/.github/workflows/moodle-ci.yml index a6ba6d6..932cada 100644 --- a/.github/workflows/moodle-ci.yml +++ b/.github/workflows/moodle-ci.yml @@ -50,7 +50,7 @@ jobs: - 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 4.5.4 echo $(cd ci/bin; pwd) >> $GITHUB_PATH echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH sudo locale-gen en_AU.UTF-8 @@ -179,7 +179,7 @@ jobs: - 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 4.5.4 echo $(cd ci/bin; pwd) >> $GITHUB_PATH echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH sudo locale-gen en_AU.UTF-8