Sorting out TITLE / PAGEHEADING / SUBSECTIONHEADING for pages

Bug #1539262 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Robert Lyon

Bug Description

Following on from Bug #1529731 I notice that there is a lot of duplication of code / non-consistent use of the TITLE / PAGEHEADING / SUBSECTIONHEADING for pages.

There are many places where the TITLE - set as a defined value for a php file is exactly the same as PAGEHEADING which is passed into $smarty after the fact. It would be easier to allow the PAGEHEADING to be set as TITLE if their is no overriding PAGEHEADING set.

I've also feel the SUBSECTIONHEADING should be set as a constant rather than a $subsectionheading variable to keep it consistent with the other ones.

For the setting of the PAGEHEADING and SUBSECTIONHEADING constants the order they appear in the <h1> tag was not consistent. Normally the values are set as:
SUBSECTIONHEADING = the particular instance title
PAGEHEADING = the umbrella title

For example, for a group's pages it is:
SUBSECTIONHEADING = Pages
PAGEHEADING = Group 1 (the name of the group)

Which displays as:
<h1>Pages | Group 1</h1>

So I'll make a few patches to clean this up

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5978

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/5979

Robert Lyon (robertl-9)
Changed in mahara:
status: New → In Progress
Revision history for this message
Charlie Amoah (charlie-catalyst) wrote :

Hi Robert can I please get instructions on how to test this? Or a hint so I can create my own steps please? Thanks.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5978
Committed: https://git.mahara.org/mahara/mahara/commit/4d6abc2b5a466f918ea6a86526d65f696ab05d52
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 4d6abc2b5a466f918ea6a86526d65f696ab05d52
Author: Robert Lyon <email address hidden>
Date: Fri Jan 29 09:58:49 2016 +1300

Bug 1539262: Making constant SUBSECTIONHEADING

To make this similar to PAGEHEADING / TITLE for consistency

This allows the for it to display when an AccessDeniedException is
thrown.

Also fixing up where the PAGEHEADING / SUBSECTIONHEADING were set in
the wrong order.

behatnotneeded - existing tests should be fine

Change-Id: Ife016639aa8f444e6d3f3183e3753cd9f8e9aae4
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/5979
Committed: https://git.mahara.org/mahara/mahara/commit/e82c0fcb1550d6cb2480e8fbe044985bac326072
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit e82c0fcb1550d6cb2480e8fbe044985bac326072
Author: Robert Lyon <email address hidden>
Date: Fri Jan 29 10:05:17 2016 +1300

Bug 1539262: Removing unnecessary $smarty PAGEHEADING lines

As they are set to TITLE we can just assign TITLE to PAGEHEADING in
the smarty function call.

We can later override the PAGEHRADING with
$smarty->assign('PAGEHEADING', string); if we need to.

Have also updated a few files where TITLE was not defined.

behatnotneeded - everything should work as before

Change-Id: I3ea592cd37344e68c6e90a3c64947cf99db59471
Signed-off-by: Robert Lyon <email address hidden>

Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.