Commit a1b947e4 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1537426: Ignore site blogs/blogposts im menus options



Now that 'mahara' can have blog/blogpost artefacts we want to ignore
them from site menus options for logged in links

Change-Id: I8d1be32678ae97d93187181eb4aedcb331e543eb
Signed-off-by: default avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit 130890b2)
parent 9fff2670
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1320,7 +1320,8 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
                a.id, a.title, a.parent, a.artefacttype
            FROM {artefact} a
                LEFT OUTER JOIN {artefact_file_files} f ON f.artefact = a.id
            WHERE a.institution = 'mahara'", array());
            WHERE a.institution = 'mahara'
            AND artefacttype NOT IN ('blog', 'blogpost')", array());

        $files = array();
        if (!empty($artefacts)) {
+24 −0
Original line number Diff line number Diff line
@@ -51,3 +51,27 @@ Scenario: Creating and deleting external links (Selenium 1426983)
     | Privacy statement | 0 |
     | About | 0 |
     | Contact us | 0 |


Scenario: Make sure blogs do not show in site file link options (Bug #1537426)
    # Log in as "Admin" user
    Given I log in as "admin" with password "Kupuhipa1"
    When I follow "Administration"

    # I create a site journal
    And I choose "Journals" in "Configure site"
    And I follow "Create journal"
    And I fill in "Title" with "Site blog"
    And I press "Create journal"

    # I upload some site files
    And I choose "Files" in "Configure site"
    And I attach the file "Image1.jpg" to "File"

    # Entering an external link
    And I choose "Menus" in "Configure site"
    And I select "Logged-in links and resources" from "Edit:"
    And I set the following fields to these values:
    | Site file | 1 |
    And the "linkedtonew" select box should not contain "Site blog"
    And I press "Add"
 No newline at end of file