Remove unused code from lib/view.php that was never used correctly

Bug #1731807 reported by Robert Lyon on 2017-11-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rebecca Blundell

Bug Description

I noticed a bug in the theme/raw/templates/view/blocktypecontainerediting.tpl where there were two closing </button> tags to the one opening <button> tag (see lines 37/38)

So I wondered why this didn't cause a problem rendering the page and found the code would only be rendered if $configure was true.

And that would only happen if a block instance called render_editing with $configure = true

And I noticed on view/blocks.php that happens when
$blockid = $view->get_blockinstance_currently_being_configured();

But $view->get_blockinstance_currently_being_configured(); always returns 0 as the set_blockinstance_currently_being_configured() is never called.

Changing the number from 0 to a valid block number on an edit screen and then reloading page gives all manner of errors.

Looking at the commit that added the set/get functions 09c73752c11c800dcb2bfbb6606206831f19d439 this was before 1.0 release and doesn't look to have been implemented fully.

We should clean up this area and remove any/all code that is not actually being used

Robert Lyon (robertl-9) on 2017-11-12
Changed in mahara:
milestone: none → 18.04.0
status: New → Confirmed
importance: Undecided → Medium
Changed in mahara:
assignee: nobody → Rebecca Blundell (rjb-dev)
Changed in mahara:
status: Confirmed → In Progress

Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit e8fe8839957a3fc0b88340ab56314b784f8a3fec
Author: Rebecca Blundell <email address hidden>
Date: Thu Dec 14 11:46:10 2017 +1300

Bug 1731807 - remove unused blockinstance code

I've removed some more things that don't seem to be needed.


Change-Id: I811aff5ac64e0d4178f61d39e19541f7b5e45cea

Robert Lyon (robertl-9) on 2018-03-06
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9) on 2018-04-05
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers