$progressvalue = 0; $progress = '?'; } $rows[] = array('firstname' => $users[$i]->firstname, 'lastname' => strtoupper($users[$i]->lastname), 'select' => $select, 'picture' => $picture, 'fullname' => $name, 'lastonlinetime' => empty($users[$i]->lastseen) ? 0 : $users[$i]->lastseen, 'lastonline' => $lastonline, 'progressbar' => $progressbar, 'progressvalue' => $progressvalue, 'progress' => $progress); } // Build the table content and output. if (!($sort = $table->get_sql_sort())) { $sort = 'lastname DESC'; } if ($numberofusers > 0) { usort($rows, 'block_progress_compare_rows'); foreach ($rows as $row) { $table->add_data(array($row['select'], $row['picture'], $row['fullname'], $row['lastonline'], $row['progressbar'], $row['progress'])); } } $table->print_initials_bar(); $table->print_html(); // Output messaging controls. echo html_writer::start_tag('div', array('class' => 'buttons')); echo html_writer::empty_tag('input', array('type' => 'button', 'id' => 'checkall', 'value' => get_string('selectall'))); echo html_writer::empty_tag('input', array('type' => 'button', 'id' => 'checknone', 'value' => get_string('deselectall'))); $displaylist = array(); $displaylist['messageselect.php'] = get_string('messageselectadd'); if (!empty($CFG->enablenotes) && has_capability('moodle/notes:manage', $context)) { $displaylist['addnote.php'] = get_string('addnewnote', 'notes'); $displaylist['groupaddnote.php'] = get_string('groupaddnewnote', 'notes'); } echo html_writer::tag('label', get_string("withselectedusers"), array('for' => 'formactionid')); echo html_writer::select($displaylist, 'formaction', '', array('' => 'choosedots'), array('id' => 'formactionid')); echo html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'id', 'value' => $course->id)); echo html_writer::start_tag('noscript', array('style' => 'display:inline;'));