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

Bug 1800317: hide view content in timeline for peer if no peer block

behatnotneeded

Change-Id: Idb95aadbf8afa67efd554d9d14e6b4dc0023aa41
(cherry picked from commit fabbd38b)
parent 1ceb7bcf
......@@ -7175,6 +7175,7 @@ class View {
}
public function format_versioning_data($data, $versionnumber=0) {
global $USER;
if (empty($data)) {
return false;
}
......@@ -7225,7 +7226,15 @@ class View {
$this->columns[$v->row][$v->column]['blockinstances'][] = $bi;
}
}
if (!$USER->has_peer_role_only($this) || $this->has_peer_assessement_block()) {
$html = $this->build_rows(false, false, $data);
}
else {
$html = '<div class="alert alert-info">
<span class="icon icon-lg icon-info-circle left" role="presentation" aria-hidden="true"></span>' .
get_string('nopeerassessmentrequired', 'artefact.peerassessment') .
'</div>';
}
$data->html = $html;
return $data;
}
......
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