Commit 78715222 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Change empty view access confirmation to count blocks rather than artefacts

parent ce6296b9
......@@ -51,7 +51,7 @@ $string['artefacts'] = 'Artefacts';
$string['myviews'] = 'My Views';
$string['groupviews'] = 'Group Views';
$string['institutionviews'] = 'Institution Views';
$string['reallyaddaccesstoemptyview'] = 'Your View contains no artefacts. Do you really want to give these users access to the View?';
$string['reallyaddaccesstoemptyview'] = 'Your View contains no blocks. Do you really want to give these users access to the View?';
$string['viewdeleted'] = 'View deleted';
$string['viewsubmitted'] = 'View submitted';
$string['editviewnameanddescription'] = 'Edit View details';
......
......@@ -54,8 +54,7 @@ if (!$USER->can_edit_view($view)) {
$smarty = smarty(array('tablerenderer'), pieform_element_calendar_get_headdata(pieform_element_calendar_configure(array())), array('mahara' => array('From', 'To')));
$artefacts = $view->get_artefact_metadata();
if (empty($artefacts)) {
if (!count_records('block_instance', 'view', $view->get('id'))) {
$confirmmessage = get_string('reallyaddaccesstoemptyview', 'view');
$js = <<<EOF
addLoadEvent(function() {
......
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