Commit 947f3f89 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Robert Lyon

Bug 1848959: peer assessment: dont display 'Details' button for peer only roles

behatnotneeded

Change-Id: I5380cddc0871cb1faa849eed9b4f91b1b646dbde
parent 18228d84
...@@ -1428,6 +1428,8 @@ class BlockInstance { ...@@ -1428,6 +1428,8 @@ class BlockInstance {
$smarty->assign('justdetails', true); $smarty->assign('justdetails', true);
} }
$smarty->assign('peerroleonly', $USER->has_peer_role_only($this->get_view()));
return $smarty->fetch('view/blocktypecontainerviewing.tpl'); return $smarty->fetch('view/blocktypecontainerviewing.tpl');
} }
......
<div class="pageactions"> <div class="pageactions">
<div class="btn-group-vertical"> <div class="btn-group-vertical">
{if !$peerroleonly}
{* Assess button that will show/ hide comments and details in block-comments-details-header.tpl *} {* Assess button that will show/ hide comments and details in block-comments-details-header.tpl *}
<button id="details-btn" type="button" class="btn btn-secondary" title="{str tag=detailslinkalt section=view}"> <button id="details-btn" type="button" class="btn btn-secondary" title="{str tag=detailslinkalt section=view}">
<span class="icon icon-lg icon-search-plus left" role="presentation" aria-hidden="true" ></span> <span class="icon icon-lg icon-search-plus left" role="presentation" aria-hidden="true" ></span>
<span class="sr-only">{str tag=detailslinkalt section=view}</span> <span class="sr-only">{str tag=detailslinkalt section=view}</span>
</button> </button>
{/if}
{if $editurl}{strip} {if $editurl}{strip}
<a title="{str tag=editthisview section=view}" href="{$editurl}" class="btn btn-secondary"> <a title="{str tag=editthisview section=view}" href="{$editurl}" class="btn btn-secondary">
......
<div class="bt-{$blocktype} gridstackblock card card-secondary {$cardicontype} clearfix {if $retractable}collapsible{/if}" id="blockinstance_{$id}"> <div class="bt-{$blocktype} gridstackblock card card-secondary {$cardicontype} clearfix {if $retractable}collapsible{/if}" id="blockinstance_{$id}">
{if !$editing && $blockheader && !$versioning} {if !$editing && $blockheader && !$versioning && !$peerroleonly}
{include file='header/block-comments-details-header.tpl' artefactid=$artefactid blockid=$blockid commentcount=$commentcount} {include file='header/block-comments-details-header.tpl' artefactid=$artefactid blockid=$blockid commentcount=$commentcount}
{/if} {/if}
{if $title} {if $title}
......
...@@ -558,6 +558,7 @@ $smarty->assign('viewtype', $viewtype); ...@@ -558,6 +558,7 @@ $smarty->assign('viewtype', $viewtype);
$smarty->assign('feedback', $feedback); $smarty->assign('feedback', $feedback);
$smarty->assign('owner', $owner); $smarty->assign('owner', $owner);
$smarty->assign('peerhidden', $peerhidden); $smarty->assign('peerhidden', $peerhidden);
$smarty->assign('peerroleonly', $USER->has_peer_role_only($view));
list($tagcount, $alltags) = $view->get_all_tags_for_view(10); list($tagcount, $alltags) = $view->get_all_tags_for_view(10);
$smarty->assign('alltags', $alltags); $smarty->assign('alltags', $alltags);
$smarty->assign('moretags', ($tagcount > sizeof($alltags) ? true : false)); $smarty->assign('moretags', ($tagcount > sizeof($alltags) ? true : false));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment