本文整理汇总了PHP中flexible_table::show_download_buttons_at方法的典型用法代码示例。如果您正苦于以下问题:PHP flexible_table::show_download_buttons_at方法的具体用法?PHP flexible_table::show_download_buttons_at怎么用?PHP flexible_table::show_download_buttons_at使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类flexible_table
的用法示例。
在下文中一共展示了flexible_table::show_download_buttons_at方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fullname
}
if (!empty($orderby) && ($dir == 'asc' || $dir == 'desc')) {
$orderby .= " " . $dir;
}
}
$count = $DB->count_records_sql($sqlcount);
$unplagfiles = $DB->get_records_sql($sqlallfiles . $orderby, null, $page * $limit, $limit);
$table->define_columns(array('id', 'name', 'module', 'identifier', 'status', 'attempts', 'action'));
$table->define_headers(array(get_string('id', 'plagiarism_unplag'), get_string('user'), get_string('module', 'plagiarism_unplag'), get_string('identifier', 'plagiarism_unplag'), get_string('status', 'plagiarism_unplag'), get_string('attempts', 'plagiarism_unplag'), ''));
$table->define_baseurl('unplag_debug.php');
$table->sortable(true);
$table->no_sorting('file', 'action');
$table->collapsible(true);
$table->set_attribute('cellspacing', '0');
$table->set_attribute('class', 'generaltable generalbox');
$table->show_download_buttons_at(array(TABLE_P_BOTTOM));
$table->setup();
$fs = get_file_storage();
foreach ($unplagfiles as $tf) {
$modulecontext = context_module::instance($tf->cm);
$coursemodule = get_coursemodule_from_id($tf->moduletype, $tf->cm);
$user = "<a href='" . $CFG->wwwroot . "/user/profile.php?id=" . $tf->userid . "'>" . fullname($tf) . "</a>";
if ($tf->statuscode == UNPLAG_STATUSCODE_ACCEPTED) {
// Sanity Check.
$reset = '<a href="unplag_debug.php?reset=2&id=' . $tf->id . '&sesskey=' . sesskey() . '">' . get_string('getscore', 'plagiarism_unplag') . '</a> | ';
} else {
$reset = '<a href="unplag_debug.php?reset=1&id=' . $tf->id . '&sesskey=' . sesskey() . '">' . get_string('resubmit', 'plagiarism_unplag') . '</a> | ';
}
$reset .= '<a href="unplag_debug.php?delete=1&id=' . $tf->id . '&sesskey=' . sesskey() . '">' . get_string('delete') . '</a>';
$cmurl = new moodle_url($CFG->wwwroot . '/mod/' . $tf->moduletype . '/view.php', array('id' => $tf->cm));
$cmlink = html_writer::link($cmurl, shorten_text($coursemodule->name, 40, true), array('title' => $coursemodule->name));
示例2: array
$headers[] = 'Usage';
$table->define_headers($headers);
$columns = array();
$columns[] = 'courses';
$columns[] = 'modules';
$columns[] = 'usage';
$table->define_columns($columns);
// Define a base url
$table->define_baseurl($url);
// The sortable and non sortable columns
$table->pageable(true);
// We get the count for the data
$numcursos = count($modulestats);
// Set the page size
$table->pagesize($perpage, $numcursos);
$table->show_download_buttons_at(array(TABLE_P_TOP));
// Setup the table
$table->setup();
$permodulestats = array();
$courses = array();
$modules = array();
foreach ($modulestats as $stat) {
$courses[$stat->id] = 1;
$modules[] = intval($stat->modules);
$permodulestats[$stat->name][] = intval($stat->modules);
}
$coursestats = local_uai_calculate_stats(array_values($courses), 'courses');
$totalmodules = local_uai_calculate_stats($modules, 'modules');
$courseurl = new moodle_url('/course/view.php', array('id' => $stat->id));
$data = array();
$data[] = $coursestats->count;