From b97ffab51a39d914d8588c0493483a7106f0e9b7 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Mon, 17 Apr 2023 11:22:57 +0100 Subject: [PATCH] MDL-77936 grade: omit second cell action divider when not required. --- grade/lib.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/grade/lib.php b/grade/lib.php index ca6220ffdbc..c7524e9d52f 100644 --- a/grade/lib.php +++ b/grade/lib.php @@ -2630,6 +2630,11 @@ class grade_structure { $context->dataid = $element['userid']; } + // Omit the second divider if there is nothing between it and the first divider. + if (!isset($context->ascendingfirstnameurl) && !isset($context->ascendingurl)) { + $context->divider2 = false; + } + if (!empty($USER->editing) || isset($context->gradeanalysisurl) || isset($context->gradesonlyurl) || isset($context->aggregatesonlyurl) || isset($context->fullmodeurl) || isset($context->reporturl0) || isset($context->ascendingfirstnameurl) || isset($context->ascendingurl)