mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #37124
[Bug 1605419] A change has been merged
Reviewed: https://reviews.mahara.org/6742
Committed: https://git.mahara.org/mahara/mahara/commit/8f2d8b18863d6c446b7c914db2e9651c1ae2f3b5
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch: master
commit 8f2d8b18863d6c446b7c914db2e9651c1ae2f3b5
Author: Aaron Wells <aaronw@xxxxxxxxxxxxxxx>
Date: Fri Jul 22 12:04:03 2016 +1200
Bug 1605419: Refactoring out old, unused methods of View class
Leaving in View::get_artefact_instances() because there are
plans to use it in the SmartEvidence commits.
Change-Id: I04371779ba358678ae5b36b286356e2fd990dfff
behatnotneeded: Covered by existing tests.
--
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/1605419
Title:
Remove unused & obsolete methods of the "View" class
Status in Mahara:
Fix Committed
Bug description:
The method View::find_artefact_children() was added in 2007, and was
only ever used in the method View::get_artefact_hierarchy(). The
function View::get_artefact_hierarchy() was then removed later in 2007
due to errors, but View::find_artefact_children() was left behind by
apparent oversight.
In its current form it's not very useful, and it's more or less
redundant with artefact_get_descendants() in artefact/lib.php.
Likewise there are several other "orphan" methods in the View class,
which it would be good to remove because:
1. The class is already huge, and removing unnecessary methods will
make it easier for developers to find the useful methods in it.
2. These unused methods often contain bugs, because they're not
updated when Mahara's internal data structures change.
I'm going to remove several of these unused methods, and refactor away
a few single-use methods that don't provide any real API value.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1605419/+subscriptions
References