/** * Produces a heading * * @param string $text * @param int $level * @param string $classes * @param string $id * @return string */ public function heading($text, $level = 2, $classes = 'main', $id = null) { if ($classes == 'helpheading') { // Keeps wrap from help headings in dialog. $content = parent::heading($text, $level, $classes, $id); } else { $content = html_writer::start_tag('div', array('class' => 'headingwrap ui-bar-'.$this->theme_swatch() .' ui-footer')); $content .= parent::heading($text, $level, $classes.' ui-title', $id); $content .= html_writer::end_tag('div'); } return $content; }
} } $orderby = 'tree,weight,modtext'; if ($DB->get_dbfamily() == 'mssql' || $DB->get_dbfamily() == 'oracle') { // SQL Server and Oracle do not support ordering by TEXT field. $orderby = 'tree,weight,CAST(modtext AS VARCHAR(255))'; } $items = $DB->get_records(sharing_cart\record::TABLE, array('userid' => $USER->id), $orderby); $title = get_string('bulkdelete', 'block_sharing_cart'); $PAGE->set_pagelayout('standard'); $PAGE->set_url('/blocks/sharing_cart/bulkdelete.php', array('course' => $courseid)); $PAGE->set_title($title); $PAGE->set_heading($title); $PAGE->navbar->add(get_string('pluginname', 'block_sharing_cart'))->add($title, ''); echo $OUTPUT->header(); echo $OUTPUT->heading($title); echo ' <div style="width:100%; text-align:center;">'; if (empty($items)) { echo ' <div> <input type="button" onclick="history.back();" value="', get_string('back'), '" /> </div>'; } else { echo ' <script type="text/javascript"> //<![CDATA[ function get_checks() { var els = document.forms["form"].elements; var ret = new Array();