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

Bug 1991604: Outcomes portfolio (4) - Adjustments to activity template page



And creation of new activity page

Change-Id: Iab35c4142abef19ec4013d79c41b99b742eef68b
Signed-off-by: default avatarRobert Lyon <robertl@catalyst.net.nz>
parent 7b4b83e4
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -453,7 +453,6 @@ class View {
            $userid = $USER->get('id');
        }

        // Viewdata need to have 'type' = 'activity'
        $user = new User();
        $user->find_by_id($userid);

@@ -521,6 +520,12 @@ class View {

        // Check for signoff/verify page settings exist
        $template_signoff = get_record('view_signoff_verify', 'view', $templateid);
        // If activity page then we need to set signoff to be true by default and we
        // do this by ensuring the verify is false for this page
        if ($viewdata['type'] == 'activity') {
            $template_signoff = new stdClass();
            $template_signoff->show_verify = 0;
        }
        if ($template_signoff) {
            $dataobj = (object) [
                'view' => $view->get('id'),
+6 −5
Original line number Diff line number Diff line
@@ -22,12 +22,13 @@
        <span class="btn-title visually-hidden">{str tag=editcontent1 section=view}</span>
        </button>
    {/if}
    <button
data-url="{$WWWROOT}{if $collectionurl}{$collectionurl}{else}view/view.php?id={$viewid}{/if}"
    {if !$issitetemplate}
        <button data-url="{$WWWROOT}{if $collectionurl}{$collectionurl}{else}view/view.php?id={$viewid}{/if}"
    id='displaypagebtn' type="button" class="btn btn-secondary editviews displaycontent" title="{str tag=displayview section=view}">
        <span class="icon icon-tv icon-lg left" role="presentation" aria-hidden="true"></span>
        <span class="visually-hidden">{str tag=displayview section=view}</span>
        </button>
    {/if}
    {if !$accesssuspended && ($edittitle || $viewtype == 'share') && !$issitetemplate && $selected != 'share'}
        <button
            data-url="{$WWWROOT}view/accessurl.php?return=edit&id={$viewid}{if $collectionid}&collection={$collectionid}{/if}"
+3 −3
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ $institution = $view->get('institution');
$view->set_edit_nav();
$view->set_user_theme();

if ($view->get('type') == 'activity') {
if ($view->get('type') == 'activity' && !$issitetemplate) {
    View::check_can_edit_activity_page_info($group);
}

@@ -208,7 +208,7 @@ function create_settings_pieform() {

    // Only allow activity pages as part of group portfolios
    $group = $view->get('group');

    $hidden_activity_info_elems = array();
    if ($view->get('type') == 'activity' && $group && is_outcomes_group($group)) {
        list($activity_info_elements, $hidden_activity_info_elems) = get_view_activity_info_elements($outcome);
    }
@@ -972,7 +972,7 @@ function settings_submit(Pieform $form, $values) {
        }
    }

    if ($view->get('type') == 'activity') {
    if ($view->get('type') == 'activity' && !$issitetemplate) {
        set_view_activity_info($form, $values);
    }