mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-19797 Migrated calls to print_heading
This commit is contained in:
parent
ade58ba0f6
commit
c018f97328
@ -129,7 +129,7 @@ $outcomes_tables = array();
|
|||||||
$heading = get_string('outcomes', 'grades');
|
$heading = get_string('outcomes', 'grades');
|
||||||
|
|
||||||
if ($courseid and $outcomes = grade_outcome::fetch_all_local($courseid)) {
|
if ($courseid and $outcomes = grade_outcome::fetch_all_local($courseid)) {
|
||||||
$return = print_heading($strcustomoutcomes, '', 3, 'main', true);
|
$return = $OUTPUT->heading($strcustomoutcomes, 3, 'main');
|
||||||
$data = array();
|
$data = array();
|
||||||
foreach($outcomes as $outcome) {
|
foreach($outcomes as $outcome) {
|
||||||
$line = array();
|
$line = array();
|
||||||
@ -182,7 +182,7 @@ if ($courseid and $outcomes = grade_outcome::fetch_all_local($courseid)) {
|
|||||||
|
|
||||||
|
|
||||||
if ($outcomes = grade_outcome::fetch_all_global()) {
|
if ($outcomes = grade_outcome::fetch_all_global()) {
|
||||||
$return = print_heading($strstandardoutcome, '', 3, 'main', true);
|
$return = $OUTPUT->heading($strstandardoutcome, 3, 'main');
|
||||||
$data = array();
|
$data = array();
|
||||||
foreach($outcomes as $outcome) {
|
foreach($outcomes as $outcome) {
|
||||||
$line = array();
|
$line = array();
|
||||||
|
@ -144,9 +144,9 @@ if ($courseid) {
|
|||||||
print_grade_page_head($courseid, 'scale', null, get_string('coursescales', 'grades'));
|
print_grade_page_head($courseid, 'scale', null, get_string('coursescales', 'grades'));
|
||||||
}
|
}
|
||||||
|
|
||||||
print_heading($strcustomscales, '', 3, 'main');
|
echo $OUTPUT->heading($strcustomscales, 3, 'main');
|
||||||
print_table($table);
|
print_table($table);
|
||||||
print_heading($strstandardscale, '', 3, 'main');
|
echo $OUTPUT->heading($strstandardscale, 3, 'main');
|
||||||
print_table($table2);
|
print_table($table2);
|
||||||
echo '<div class="buttons">';
|
echo '<div class="buttons">';
|
||||||
print_single_button('edit.php', array('courseid'=>$courseid), $srtcreatenewscale);
|
print_single_button('edit.php', array('courseid'=>$courseid), $srtcreatenewscale);
|
||||||
|
@ -255,7 +255,7 @@ $navigation = grade_build_nav(__FILE__, $strgradeedit, array('courseid' => $cour
|
|||||||
print_header_simple($strgrades . ': ' . $strgraderreport . ': ' . $strgradeedit,
|
print_header_simple($strgrades . ': ' . $strgraderreport . ': ' . $strgradeedit,
|
||||||
': ' . $strgradeedit , $navigation, '', '', true, '', navmenu($course));
|
': ' . $strgradeedit , $navigation, '', '', true, '', navmenu($course));
|
||||||
|
|
||||||
print_heading($strgradeedit);
|
echo $OUTPUT->heading($strgradeedit);
|
||||||
|
|
||||||
print_simple_box_start("center");
|
print_simple_box_start("center");
|
||||||
|
|
||||||
|
@ -187,8 +187,8 @@ abstract class grade_export {
|
|||||||
* @param bool $require_user_idnumber true means skip users without idnumber
|
* @param bool $require_user_idnumber true means skip users without idnumber
|
||||||
*/
|
*/
|
||||||
public function display_preview($require_user_idnumber=false) {
|
public function display_preview($require_user_idnumber=false) {
|
||||||
|
global $OUTPUT;
|
||||||
print_heading(get_string('previewrows', 'grades'));
|
echo $OUTPUT->heading(get_string('previewrows', 'grades'));
|
||||||
|
|
||||||
echo '<table>';
|
echo '<table>';
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
@ -286,12 +286,12 @@ abstract class grade_export {
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function print_continue() {
|
public function print_continue() {
|
||||||
global $CFG;
|
global $CFG, $OUTPUT;
|
||||||
|
|
||||||
$params = $this->get_export_params();
|
$params = $this->get_export_params();
|
||||||
|
|
||||||
|
|
||||||
print_heading(get_string('export', 'grades'));
|
echo $OUTPUT->heading(get_string('export', 'grades'));
|
||||||
|
|
||||||
echo '<div class="gradeexportlink">';
|
echo '<div class="gradeexportlink">';
|
||||||
if (!$this->userkey) { // this button should trigger a download prompt
|
if (!$this->userkey) { // this button should trigger a download prompt
|
||||||
|
@ -42,7 +42,7 @@ $mform = new grade_export_form(null, array('publishing' => true));
|
|||||||
$groupmode = groups_get_course_groupmode($course); // Groups are being used
|
$groupmode = groups_get_course_groupmode($course); // Groups are being used
|
||||||
$currentgroup = groups_get_course_group($course, true);
|
$currentgroup = groups_get_course_group($course, true);
|
||||||
if ($groupmode == SEPARATEGROUPS and !$currentgroup and !has_capability('moodle/site:accessallgroups', $context)) {
|
if ($groupmode == SEPARATEGROUPS and !$currentgroup and !has_capability('moodle/site:accessallgroups', $context)) {
|
||||||
print_heading(get_string("notingroup"));
|
echo $OUTPUT->heading(get_string("notingroup"));
|
||||||
print_footer($course);
|
print_footer($course);
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ $mform = new grade_export_form(null, array('includeseparator'=>true, 'publishing
|
|||||||
$groupmode = groups_get_course_groupmode($course); // Groups are being used
|
$groupmode = groups_get_course_groupmode($course); // Groups are being used
|
||||||
$currentgroup = groups_get_course_group($course, true);
|
$currentgroup = groups_get_course_group($course, true);
|
||||||
if ($groupmode == SEPARATEGROUPS and !$currentgroup and !has_capability('moodle/site:accessallgroups', $context)) {
|
if ($groupmode == SEPARATEGROUPS and !$currentgroup and !has_capability('moodle/site:accessallgroups', $context)) {
|
||||||
print_heading(get_string("notingroup"));
|
echo $OUTPUT->heading(get_string("notingroup"));
|
||||||
print_footer($course);
|
print_footer($course);
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ $mform = new grade_export_form(null, array('publishing' => true));
|
|||||||
$groupmode = groups_get_course_groupmode($course); // Groups are being used
|
$groupmode = groups_get_course_groupmode($course); // Groups are being used
|
||||||
$currentgroup = groups_get_course_group($course, true);
|
$currentgroup = groups_get_course_group($course, true);
|
||||||
if ($groupmode == SEPARATEGROUPS and !$currentgroup and !has_capability('moodle/site:accessallgroups', $context)) {
|
if ($groupmode == SEPARATEGROUPS and !$currentgroup and !has_capability('moodle/site:accessallgroups', $context)) {
|
||||||
print_heading(get_string("notingroup"));
|
echo $OUTPUT->heading(get_string("notingroup"));
|
||||||
print_footer($course);
|
print_footer($course);
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ $mform = new grade_export_form(null, array('idnumberrequired'=>true, 'publishing
|
|||||||
$groupmode = groups_get_course_groupmode($course); // Groups are being used
|
$groupmode = groups_get_course_groupmode($course); // Groups are being used
|
||||||
$currentgroup = groups_get_course_group($course, true);
|
$currentgroup = groups_get_course_group($course, true);
|
||||||
if ($groupmode == SEPARATEGROUPS and !$currentgroup and !has_capability('moodle/site:accessallgroups', $context)) {
|
if ($groupmode == SEPARATEGROUPS and !$currentgroup and !has_capability('moodle/site:accessallgroups', $context)) {
|
||||||
print_heading(get_string("notingroup"));
|
echo $OUTPUT->heading(get_string("notingroup"));
|
||||||
print_footer($course);
|
print_footer($course);
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ if ($formdata = $mform->get_data()) {
|
|||||||
// print some preview
|
// print some preview
|
||||||
$numlines = 0; // 0 preview lines displayed
|
$numlines = 0; // 0 preview lines displayed
|
||||||
|
|
||||||
print_heading(get_string('importpreview', 'grades'));
|
echo $OUTPUT->heading(get_string('importpreview', 'grades'));
|
||||||
echo '<table>';
|
echo '<table>';
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
foreach ($header as $h) {
|
foreach ($header as $h) {
|
||||||
|
@ -812,7 +812,7 @@ class grade_plugin_info {
|
|||||||
function print_grade_page_head($courseid, $active_type, $active_plugin=null,
|
function print_grade_page_head($courseid, $active_type, $active_plugin=null,
|
||||||
$heading = false, $return=false,
|
$heading = false, $return=false,
|
||||||
$buttons=false, $extracss=array()) {
|
$buttons=false, $extracss=array()) {
|
||||||
global $CFG, $COURSE;
|
global $CFG, $COURSE, $OUTPUT;
|
||||||
$strgrades = get_string('grades');
|
$strgrades = get_string('grades');
|
||||||
$plugin_info = grade_get_plugin_info($courseid, $active_type, $active_plugin);
|
$plugin_info = grade_get_plugin_info($courseid, $active_type, $active_plugin);
|
||||||
|
|
||||||
@ -876,7 +876,7 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null,
|
|||||||
if ($CFG->grade_navmethod == GRADE_NAVMETHOD_COMBO || $CFG->grade_navmethod == GRADE_NAVMETHOD_DROPDOWN) {
|
if ($CFG->grade_navmethod == GRADE_NAVMETHOD_COMBO || $CFG->grade_navmethod == GRADE_NAVMETHOD_DROPDOWN) {
|
||||||
$returnval .= print_grade_plugin_selector($plugin_info, $return);
|
$returnval .= print_grade_plugin_selector($plugin_info, $return);
|
||||||
}
|
}
|
||||||
$returnval .= print_heading($heading);
|
$returnval .= $OUTPUT->heading($heading);
|
||||||
|
|
||||||
if ($CFG->grade_navmethod == GRADE_NAVMETHOD_COMBO || $CFG->grade_navmethod == GRADE_NAVMETHOD_TABS) {
|
if ($CFG->grade_navmethod == GRADE_NAVMETHOD_COMBO || $CFG->grade_navmethod == GRADE_NAVMETHOD_TABS) {
|
||||||
$returnval .= grade_print_tabs($active_type, $active_plugin, $plugin_info, $return);
|
$returnval .= grade_print_tabs($active_type, $active_plugin, $plugin_info, $return);
|
||||||
|
@ -34,6 +34,8 @@ $target = optional_param('target', 0, PARAM_ALPHANUM);
|
|||||||
$toggle = optional_param('toggle', NULL, PARAM_INT);
|
$toggle = optional_param('toggle', NULL, PARAM_INT);
|
||||||
$toggle_type = optional_param('toggle_type', 0, PARAM_ALPHANUM);
|
$toggle_type = optional_param('toggle_type', 0, PARAM_ALPHANUM);
|
||||||
|
|
||||||
|
$PAGE->set_url('grade/report/grader/index.php', compact('courseid', 'page', 'perpageurl', 'edit', 'sortitemid'));
|
||||||
|
|
||||||
/// basic access checks
|
/// basic access checks
|
||||||
if (!$course = $DB->get_record('course', array('id' => $courseid))) {
|
if (!$course = $DB->get_record('course', array('id' => $courseid))) {
|
||||||
print_error('nocourseid');
|
print_error('nocourseid');
|
||||||
@ -123,7 +125,7 @@ if ($report->get_pref('enableajax')) {
|
|||||||
// make sure separate group does not prevent view
|
// make sure separate group does not prevent view
|
||||||
if ($report->currentgroup == -2) {
|
if ($report->currentgroup == -2) {
|
||||||
print_grade_page_head($COURSE->id, 'report', 'grader', $reportname, false, $buttons);
|
print_grade_page_head($COURSE->id, 'report', 'grader', $reportname, false, $buttons);
|
||||||
print_heading(get_string("notingroup"));
|
echo $OUTPUT->heading(get_string("notingroup"));
|
||||||
print_footer($course);
|
print_footer($course);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ if (has_capability('moodle/grade:viewall', $context)) { //Teachers will see all
|
|||||||
while ($userdata = $gui->next_user()) {
|
while ($userdata = $gui->next_user()) {
|
||||||
$user = $userdata->user;
|
$user = $userdata->user;
|
||||||
$report = new grade_report_user($courseid, $gpr, $context, $user->id);
|
$report = new grade_report_user($courseid, $gpr, $context, $user->id);
|
||||||
print_heading(get_string('modulename', 'gradereport_user'). ' - '.fullname($report->user));
|
echo $OUTPUT->heading(get_string('modulename', 'gradereport_user'). ' - '.fullname($report->user));
|
||||||
|
|
||||||
if ($report->fill_table()) {
|
if ($report->fill_table()) {
|
||||||
echo '<br />'.$report->print_table(true);
|
echo '<br />'.$report->print_table(true);
|
||||||
|
@ -475,7 +475,7 @@ function grade_report_user_profilereport($course, $user) {
|
|||||||
|
|
||||||
// print the page
|
// print the page
|
||||||
echo '<div class="grade-report-user">'; // css fix to share styles with real report page
|
echo '<div class="grade-report-user">'; // css fix to share styles with real report page
|
||||||
print_heading(get_string('modulename', 'gradereport_user'). ' - '.fullname($report->user));
|
echo $OUTPUT->heading(get_string('modulename', 'gradereport_user'). ' - '.fullname($report->user));
|
||||||
|
|
||||||
if ($report->fill_table()) {
|
if ($report->fill_table()) {
|
||||||
echo $report->print_table(true);
|
echo $report->print_table(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user