MDL-19797 Migrated calls to print_heading

This commit is contained in:
nicolasconnault 2009-08-06 08:16:46 +00:00
parent ade58ba0f6
commit c018f97328
13 changed files with 21 additions and 19 deletions

View File

@ -129,7 +129,7 @@ $outcomes_tables = array();
$heading = get_string('outcomes', 'grades');
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();
foreach($outcomes as $outcome) {
$line = array();
@ -182,7 +182,7 @@ if ($courseid and $outcomes = grade_outcome::fetch_all_local($courseid)) {
if ($outcomes = grade_outcome::fetch_all_global()) {
$return = print_heading($strstandardoutcome, '', 3, 'main', true);
$return = $OUTPUT->heading($strstandardoutcome, 3, 'main');
$data = array();
foreach($outcomes as $outcome) {
$line = array();

View File

@ -144,9 +144,9 @@ if ($courseid) {
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_heading($strstandardscale, '', 3, 'main');
echo $OUTPUT->heading($strstandardscale, 3, 'main');
print_table($table2);
echo '<div class="buttons">';
print_single_button('edit.php', array('courseid'=>$courseid), $srtcreatenewscale);

View File

@ -255,7 +255,7 @@ $navigation = grade_build_nav(__FILE__, $strgradeedit, array('courseid' => $cour
print_header_simple($strgrades . ': ' . $strgraderreport . ': ' . $strgradeedit,
': ' . $strgradeedit , $navigation, '', '', true, '', navmenu($course));
print_heading($strgradeedit);
echo $OUTPUT->heading($strgradeedit);
print_simple_box_start("center");

View File

@ -187,8 +187,8 @@ abstract class grade_export {
* @param bool $require_user_idnumber true means skip users without idnumber
*/
public function display_preview($require_user_idnumber=false) {
print_heading(get_string('previewrows', 'grades'));
global $OUTPUT;
echo $OUTPUT->heading(get_string('previewrows', 'grades'));
echo '<table>';
echo '<tr>';
@ -286,12 +286,12 @@ abstract class grade_export {
* @return void
*/
public function print_continue() {
global $CFG;
global $CFG, $OUTPUT;
$params = $this->get_export_params();
print_heading(get_string('export', 'grades'));
echo $OUTPUT->heading(get_string('export', 'grades'));
echo '<div class="gradeexportlink">';
if (!$this->userkey) { // this button should trigger a download prompt

View File

@ -42,7 +42,7 @@ $mform = new grade_export_form(null, array('publishing' => true));
$groupmode = groups_get_course_groupmode($course); // Groups are being used
$currentgroup = groups_get_course_group($course, true);
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);
die;
}

View File

@ -42,7 +42,7 @@ $mform = new grade_export_form(null, array('includeseparator'=>true, 'publishing
$groupmode = groups_get_course_groupmode($course); // Groups are being used
$currentgroup = groups_get_course_group($course, true);
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);
die;
}

View File

@ -42,7 +42,7 @@ $mform = new grade_export_form(null, array('publishing' => true));
$groupmode = groups_get_course_groupmode($course); // Groups are being used
$currentgroup = groups_get_course_group($course, true);
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);
die;
}

View File

@ -42,7 +42,7 @@ $mform = new grade_export_form(null, array('idnumberrequired'=>true, 'publishing
$groupmode = groups_get_course_groupmode($course); // Groups are being used
$currentgroup = groups_get_course_group($course, true);
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);
die;
}

View File

@ -126,7 +126,7 @@ if ($formdata = $mform->get_data()) {
// print some preview
$numlines = 0; // 0 preview lines displayed
print_heading(get_string('importpreview', 'grades'));
echo $OUTPUT->heading(get_string('importpreview', 'grades'));
echo '<table>';
echo '<tr>';
foreach ($header as $h) {

View File

@ -812,7 +812,7 @@ class grade_plugin_info {
function print_grade_page_head($courseid, $active_type, $active_plugin=null,
$heading = false, $return=false,
$buttons=false, $extracss=array()) {
global $CFG, $COURSE;
global $CFG, $COURSE, $OUTPUT;
$strgrades = get_string('grades');
$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) {
$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) {
$returnval .= grade_print_tabs($active_type, $active_plugin, $plugin_info, $return);

View File

@ -34,6 +34,8 @@ $target = optional_param('target', 0, PARAM_ALPHANUM);
$toggle = optional_param('toggle', NULL, PARAM_INT);
$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
if (!$course = $DB->get_record('course', array('id' => $courseid))) {
print_error('nocourseid');
@ -123,7 +125,7 @@ if ($report->get_pref('enableajax')) {
// make sure separate group does not prevent view
if ($report->currentgroup == -2) {
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);
exit;
}

View File

@ -106,7 +106,7 @@ if (has_capability('moodle/grade:viewall', $context)) { //Teachers will see all
while ($userdata = $gui->next_user()) {
$user = $userdata->user;
$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()) {
echo '<br />'.$report->print_table(true);

View File

@ -475,7 +475,7 @@ function grade_report_user_profilereport($course, $user) {
// print the 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()) {
echo $report->print_table(true);