Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion amd/build/delselected.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/delselected.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/src/delselected.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
export const SELECTORS = {
DELACTION: 'div.commandbar a#delselected',
SELECTBOX: 'table#slotmanager input.slotselect',
SELECTBOX: 'table#slotmanager input.slotselect.form-check-input.mt-0',
};

/**
Expand Down
23 changes: 18 additions & 5 deletions renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public function appointment_link($scheduler, $user, $appointmentid) {
'appointmentid' => $appointmentid,
];
$url = new moodle_url('/mod/scheduler/view.php', $paras);
return html_writer::link($url, fullname($user));
return html_writer::link($url, fullname($user), ['class' => 'align-middle']);
}

/**
Expand Down Expand Up @@ -416,6 +416,7 @@ public function teacherview_tabs(
*/
public function render_scheduler_slot_table(scheduler_slot_table $slottable) {
$table = new html_table();
$table->attributes['class'] = 'table generaltable table-reboot table-hover table-striped';

if ($slottable->showslot) {
$table->head = [get_string('date', 'scheduler')];
Expand Down Expand Up @@ -610,7 +611,7 @@ public function render_scheduler_student_list(scheduler_student_list $studentlis
$student->entryid,
$student->checked,
'',
['class' => 'studentselect']
['class' => 'studentselect form-check-input align-middle mt-0']
);
} else {
$img = $student->checked ? 'ticked' : 'unticked';
Expand Down Expand Up @@ -645,13 +646,16 @@ public function render_scheduler_student_list(scheduler_student_list $studentlis
$class .= ' highlight';
}

$picture = $this->user_picture($student->user, ['courseid' => $studentlist->scheduler->courseid]);
$picture = $this->user_picture(
$student->user,
['courseid' => $studentlist->scheduler->courseid, 'class' => 'userpicture ms-1']
);
$grade = '';
if ($studentlist->showgrades && $student->grade) {
$grade = $this->format_grade($studentlist->scheduler, $student->grade, true);
}

$o .= html_writer::div($checkbox . $picture . ' ' . $name . $studicons . ' ' . $grade, $class);
$o .= html_writer::div($checkbox . $picture . $name . $studicons . ' ' . $grade, $class);
}

if ($editable) {
Expand All @@ -678,6 +682,7 @@ public function render_scheduler_student_list(scheduler_student_list $studentlis
public function render_scheduler_slot_booker(scheduler_slot_booker $booker) {

$table = new html_table();
$table->attributes['class'] = 'table generaltable table-reboot table-hover table-striped';
$table->head = [ get_string('date', 'scheduler'), get_string('start', 'scheduler'),
get_string('end', 'scheduler'), get_string('location', 'scheduler'),
get_string('comments', 'scheduler'), s($booker->scheduler->get_teacher_name()),
Expand Down Expand Up @@ -834,6 +839,7 @@ public function render_scheduler_slot_manager(scheduler_slot_manager $slotman) {
$table->align[] = 'center';

$table->id = 'slotmanager';
$table->attributes['class'] = 'table generaltable table-reboot table-hover table-striped';
$table->data = [];

$previousdate = '';
Expand All @@ -843,7 +849,13 @@ public function render_scheduler_slot_manager(scheduler_slot_manager $slotman) {
foreach ($slotman->slots as $slot) {
$rowdata = [];

$selectbox = html_writer::checkbox('selectedslot[]', $slot->slotid, false, '', ['class' => 'slotselect']);
$selectbox = html_writer::checkbox(
'selectedslot[]',
$slot->slotid,
false,
'',
['class' => 'slotselect form-check-input mt-0']
);
$rowdata[] = $slot->editable ? $selectbox : '';

$startdate = $this->userdate($slot->starttime);
Expand Down Expand Up @@ -963,6 +975,7 @@ public function render_scheduler_slot_manager(scheduler_slot_manager $slotman) {
public function render_scheduler_scheduling_list(scheduler_scheduling_list $list) {

$mtable = new html_table();
$mtable->attributes['class'] = 'table generaltable table-reboot table-hover table-striped';

$mtable->id = $list->id;
$mtable->head = ['', get_string('name')];
Expand Down
15 changes: 10 additions & 5 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ div .path-mod-scheduler .appointmentnote {
margin-right: auto;
}

.path-mod-scheduler #slotmanager td,
.path-mod-scheduler #studentstoschedule td,
.path-mod-scheduler #groupstoschedule td {
vertical-align: middle;
}

.path-mod-scheduler div.bookercontrols {
text-align: center;
}
Expand Down Expand Up @@ -96,11 +102,11 @@ div .path-mod-scheduler .appointmentnote {
}


body.path-mod-scheduler input.slotselect {
body.path-mod-scheduler input.slotselect.form-check-input.mt-0 {
display: none;
}
body.path-mod-scheduler.jsenabled input.slotselect {
display: inline;
body.path-mod-scheduler.jsenabled input.slotselect.form-check-input.mt-0 {
display: block;
}

body.path-mod-scheduler.jsenabled input.studentselectsubmit {
Expand All @@ -119,13 +125,12 @@ body.path-mod-scheduler.jsenabled input.studentselectsubmit {
}

.path-mod-scheduler div.schedulelist.halfsize {
width: 46%;
width: 50%;
display: inline-table;
padding: 3px;
}

.path-mod-scheduler div.schedulelist.fullsize {
width: 96%;
display: block;
padding: 3px;
}
Expand Down
2 changes: 1 addition & 1 deletion teacherview.php
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ function scheduler_print_schedulebox(scheduler $scheduler, $studentid, $groupid
$maildisplay .= ' — ';
$maildisplay .= html_writer::link($reminderurl, get_string('sendreminder', 'scheduler'));

echo $output->box_start('maildisplay');
echo $output->box_start('maildisplay my-3');
// Print number of students who still have to make an appointment.
echo $output->heading(get_string('missingstudents', 'scheduler', count($reminderstudents)), 3);
// Print e-mail addresses and mailto links.
Expand Down
2 changes: 1 addition & 1 deletion templates/action_menu_trigger.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<a
href="#"
tabindex="0"
class="{{triggerextraclasses}} dropdown-toggle icon-no-margin"
class="{{triggerextraclasses}} dropdown-{{#bs5}}bs-{{/bs5}}toggle icon-no-margin"
id="action-menu-toggle-{{instance}}"
aria-label="{{title}}"
data-{{#bs5}}bs-{{/bs5}}toggle="dropdown"
Expand Down
8 changes: 8 additions & 0 deletions view.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@

$subpage = optional_param('subpage', $defaultsubpage, PARAM_ALPHA);

if (
!($permissions->can_edit_all_slots()) ||
$action === 'export' ||
$action === 'viewstatistics' ||
$action === 'addsession'
) {
$PAGE->add_body_class('limitedwidth');
}

// Print the page header.

Expand Down
12 changes: 6 additions & 6 deletions viewstatistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,17 @@ function byname($a, $b) {
$allattendees = ($attendees) ? count($attendees) : 0;

$str = '<h3>' . get_string('attendable', 'scheduler') . '</h3>';
$str .= '<strong>' . get_string('attendablelbl', 'scheduler') . '</strong>: ' . $allattendees . '<br/>';
$str .= '<p><strong>' . get_string('attendablelbl', 'scheduler') . '</strong>: ' . $allattendees . '</p>';
$str .= '<h3>' . get_string('attended', 'scheduler') . '</h3>';
$str .= '<strong>' . get_string('attendedlbl', 'scheduler') . '</strong>: ' . $attended . '<br/><br/>';
$str .= '<p><strong>' . get_string('attendedlbl', 'scheduler') . '</strong>: ' . $attended . '</p>';
$str .= '<h3>' . get_string('unattended', 'scheduler') . '</h3>';
$str .= '<strong>' . get_string('registeredlbl', 'scheduler') . '</strong>: ' . $registered . '<br/>';
$str .= '<p><strong>' . get_string('registeredlbl', 'scheduler') . '</strong>: ' . $registered . '<br/>';
$str .= '<strong>' . get_string('unregisteredlbl', 'scheduler') . '</strong>: ' .
($allattendees - $registered - $attended) . '<br/>';
($allattendees - $registered - $attended) . '</p>';
$str .= '<h3>' . get_string('availableslots', 'scheduler') . '</h3>';
$str .= '<strong>' . get_string('availableslotsowned', 'scheduler') . '</strong>: ' . $freeowned . '<br/>';
$str .= '<p><strong>' . get_string('availableslotsowned', 'scheduler') . '</strong>: ' . $freeowned . '<br/>';
$str .= '<strong>' . get_string('availableslotsnotowned', 'scheduler') . '</strong>: ' . $freenotowned . '<br/>';
$str .= '<strong>' . get_string('availableslotsall', 'scheduler') . '</strong>: ' . ($freeowned + $freenotowned) . '<br/>';
$str .= '<strong>' . get_string('availableslotsall', 'scheduler') . '</strong>: ' . ($freeowned + $freenotowned) . '</p>';

echo $OUTPUT->box($str);

Expand Down
Loading