Skip to content

#53 Matomo autoprovisioning#54

Open
bwalkerl wants to merge 4 commits intoMOODLE_401_STABLEfrom
matomo_autoprovisioning
Open

#53 Matomo autoprovisioning#54
bwalkerl wants to merge 4 commits intoMOODLE_401_STABLEfrom
matomo_autoprovisioning

Conversation

@bwalkerl
Copy link
Copy Markdown
Contributor

@bwalkerl bwalkerl commented Dec 4, 2023

#53

@bwalkerl bwalkerl force-pushed the matomo_autoprovisioning branch 2 times, most recently from 2f89d34 to 31dab02 Compare December 11, 2023 04:14
foreach ($autoprovisionable as $tool) {
$class = $tool->get_tool_classname();
if ($class::can_auto_provision()) {
$class::auto_provision($tool->get_client(get_config("watool_{$tool->name}")));
Copy link
Copy Markdown
Contributor

@brendanheywood brendanheywood Dec 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels pretty weird to me, we are settings up stuff specific to a tool, and then passing it into the tool. The tool should already know about itself this hints at a deeper issue.

I think there is a few things that can be simplified / avoided:

  1. let each tool manage its own client 100%, do NOT have a shared client_base. This feels like a premature optimization to me, and lets say we added support for Google analytics we would very likely use their SDK and this shared base just gets in the way
  2. so we don't need get_client() either, each tool does what it wants
  3. auto_provision() should take no arguments
  4. tool/matomo/classes/client.php will be a self contained class and not extend client_base (even extending curl I find weird but I'm ok with that)

@bwalkerl bwalkerl force-pushed the matomo_autoprovisioning branch from 31dab02 to 8fef6d1 Compare December 13, 2023 01:20
@bwalkerl bwalkerl changed the base branch from master to MOODLE_401_STABLE December 13, 2023 01:20
@bwalkerl bwalkerl force-pushed the matomo_autoprovisioning branch from 8fef6d1 to 069fd06 Compare December 18, 2023 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants