From 50addfda9d62485ca0c03685c2a78de1b40f8687 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Fri, 9 Jun 2017 10:49:19 +1200 Subject: [PATCH] Fix #264 improve radio button spacing on self-marking page --- student_attendance_form.php | 6 ++++-- styles.css | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/student_attendance_form.php b/student_attendance_form.php index 5f7d7d7..414ee90 100644 --- a/student_attendance_form.php +++ b/student_attendance_form.php @@ -52,10 +52,12 @@ class mod_attendance_student_attendance_form extends moodleform { // Create radio buttons for setting the attendance status. $radioarray = array(); foreach ($statuses as $status) { - $radioarray[] =& $mform->createElement('radio', 'status', '', $status->description, $status->id, array()); + $name = html_writer::span($status->description, 'statusdesc'); + $radioarray[] =& $mform->createElement('radio', 'status', '', $name, $status->id, array()); } // Add the radio buttons as a control with the user's name in front. - $mform->addGroup($radioarray, 'statusarray', $USER->firstname.' '.$USER->lastname.':', array(''), false); + $radiogroup = $mform->addGroup($radioarray, 'statusarray', $USER->firstname.' '.$USER->lastname.':', array(''), false); + $radiogroup->setAttributes(array('class' => 'statusgroup')); $mform->addRule('statusarray', get_string('attendancenotset', 'attendance'), 'required', '', 'client', false, false); $this->add_action_buttons(); diff --git a/styles.css b/styles.css index 52a860a..31cd6c1 100644 --- a/styles.css +++ b/styles.css @@ -177,3 +177,6 @@ .path-mod-attendance .summaryreport .c7 { background-color: #EAEAEA; } +#page-mod-attendance-sessions .statusgroup .statusdesc { + margin-right: 12px; +}