mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #31846
[Bug 1521418] [NEW] Refactoring: Move out the blocktypes that live under artefacts
Public bug reported:
Mahara blocktypes that display a particular type of artefact, typically
live "underneath" that artefact. For instance the "image" blocktype, for
displaying images, lives under htdocs/artefact/file/blocktype/image
This causes us a lot of coding headaches, because whenever we're
locating a plugin we have to take this special case into account. And,
it doesn't give us much in the way of benefit. It can act as a kind of
crude dependency/package-management, and it makes a certain conceptual
organizational sense, but that's about it.
So, I think it would help us straighten out our code base if we
refactored the code to get rid of "live-in" blocktypes. My proposal is:
1. Move all the live-in blocktypes to the htdocs/blocktype directory
2. Remove the code that handles their special location
3. Add a sanity check that tries to detect if a live-in blocktype is present, when installing a new artefact (in order to tell people that their plugins need to be upgraded)
4. (Optionally) Add a dependency management system to the standard plugin/version.php file: Bug 1299908
Adding item #4 would help to address the one bit of functionality we
lose. But it's not strictly required; you could just depend site admins
to manually install the necessary plugins. And the individual plugin
sanity check can be used as a makeshift dependency checker.
** Affects: mahara
Importance: Low
Status: Confirmed
** Tags: api blocktype plugins refactoring
** Changed in: mahara
Status: New => Confirmed
** Changed in: mahara
Importance: Undecided => Low
** Tags added: api blocktype plugins refactoring
** Description changed:
Mahara blocktypes that display a particular type of artefact, typically
live "underneath" that artefact. For instance the "image" blocktype, for
displaying images, lives under htdocs/artefact/file/blocktype/image
This causes us a lot of coding headaches, because whenever we're
locating a plugin we have to take this special case into account. And,
it doesn't give us much in the way of benefit. It can act as a kind of
crude dependency/package-management, and it makes a certain conceptual
organizational sense, but that's about it.
So, I think it would help us straighten out our code base if we
refactored the code to get rid of "live-in" blocktypes. My proposal is:
1. Move all the live-in blocktypes to the htdocs/blocktype directory
2. Remove the code that handles their special location
3. Add a sanity check that tries to detect if a live-in blocktype is present, when installing a new artefact (in order to tell people that their plugins need to be upgraded)
- 4. (Optionally) Add a dependency management system to the standard plugin/version.php file
+ 4. (Optionally) Add a dependency management system to the standard plugin/version.php file: Bug 1299908
Adding item #4 would help to address the one bit of functionality we
- lose. But it would be a big job, so it would be best to file that as a
- separate bug.
+ lose. But it's not strictly required; you could just depend site admins
+ to manually install the necessary plugins. And the individual plugin
+ sanity check can be used as a makeshift dependency checker.
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1521418
Title:
Refactoring: Move out the blocktypes that live under artefacts
Status in Mahara:
Confirmed
Bug description:
Mahara blocktypes that display a particular type of artefact,
typically live "underneath" that artefact. For instance the "image"
blocktype, for displaying images, lives under
htdocs/artefact/file/blocktype/image
This causes us a lot of coding headaches, because whenever we're
locating a plugin we have to take this special case into account. And,
it doesn't give us much in the way of benefit. It can act as a kind of
crude dependency/package-management, and it makes a certain conceptual
organizational sense, but that's about it.
So, I think it would help us straighten out our code base if we
refactored the code to get rid of "live-in" blocktypes. My proposal
is:
1. Move all the live-in blocktypes to the htdocs/blocktype directory
2. Remove the code that handles their special location
3. Add a sanity check that tries to detect if a live-in blocktype is present, when installing a new artefact (in order to tell people that their plugins need to be upgraded)
4. (Optionally) Add a dependency management system to the standard plugin/version.php file: Bug 1299908
Adding item #4 would help to address the one bit of functionality we
lose. But it's not strictly required; you could just depend site
admins to manually install the necessary plugins. And the individual
plugin sanity check can be used as a makeshift dependency checker.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1521418/+subscriptions
Follow ups