From fcd1243be8e69a628b64632066aa1e74a300b480 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Thu, 20 Aug 2009 08:46:03 +0000 Subject: [PATCH] MDL-19815 upgraded calls to print_table, print_single_button, print_user_picture, print_container* and notice_yesno --- mod/scorm/index.php | 4 +++- mod/scorm/report.php | 38 ++++++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/mod/scorm/index.php b/mod/scorm/index.php index e14f23ef82..3bc18e1e33 100755 --- a/mod/scorm/index.php +++ b/mod/scorm/index.php @@ -44,6 +44,8 @@ exit; } + $table = new html_table(); + if ($course->format == "weeks") { $table->head = array ($strweek, $strname, $strsummary, $strreport); $table->align = array ("center", "left", "left", "left"); @@ -94,7 +96,7 @@ echo "
"; - print_table($table); + echo $OUTPUT->table($table); echo $OUTPUT->footer(); diff --git a/mod/scorm/report.php b/mod/scorm/report.php index 2854f93218..c19f9cd915 100755 --- a/mod/scorm/report.php +++ b/mod/scorm/report.php @@ -124,7 +124,7 @@ } if ($scousers=$DB->get_records_sql($sql, $params)) { - $table = new stdClass(); + $table = new html_table(); $table->head = array(); $table->width = '100%'; if (has_capability('mod/scorm:deleteresponses',$contextmodule)) { @@ -172,7 +172,9 @@ if (has_capability('mod/scorm:deleteresponses',$contextmodule)) { $row[] = ''; } - $row[] = print_user_picture($scouser->userid, $course->id, $userdata->picture, false, true); + $userpic = moodle_user_picture::make($scouser->userid, $course->id); + $userpic->image->src = $userdata->picture; + $row[] = $OUTPUT->user_picture($userpic); $row[] = ''. fullname($userdata).''; $row[] = ''.$a.''; @@ -194,7 +196,7 @@ if (has_capability('mod/scorm:deleteresponses',$contextmodule)) { echo '
'; echo ''; - print_table($table); + echo $OUTPUT->table($table); echo ''.get_string('selectall', 'quiz').' / '; echo ''.get_string('selectnone', 'quiz').' '; echo '  '; @@ -211,7 +213,7 @@ $PAGE->requires->js_function_call('hide_item', Array('noscriptmenuaction')); echo '
'; } else { - print_table($table); + echo $OUTPUT->table($table); } echo ''; } else { @@ -224,7 +226,9 @@ if (!empty($userdata)) { echo $OUTPUT->box_start('generalbox boxaligncenter'); echo '
'."\n"; - print_user_picture($user, $course->id, $userdata->picture, false, false); + $userpic = moodle_user_picture::make($user, $course->id); + $userpic->image->src = $userdata->picture; + echo $OUTPUT->user_picture($userpic); echo "wwwroot/user/view.php?id=$user&course=$course->id\">". "$userdata->firstname $userdata->lastname
"; echo get_string('attempt','scorm').': '.$attempt; @@ -232,7 +236,7 @@ echo $OUTPUT->box_end(); // Print general score data - $table = new stdClass(); + $table = new html_table(); $table->head = array(get_string('title','scorm'), get_string('status','scorm'), get_string('time','scorm'), @@ -272,7 +276,7 @@ } $table->data[] = $row; } - print_table($table); + echo $OUTPUT->table($table); } } } else { @@ -286,7 +290,9 @@ //print_heading(format_string($sco->title)); echo $OUTPUT->heading(''.format_string($sco->title).''); echo '
'."\n"; - print_user_picture($user, $course->id, $userdata->picture, false, false); + $userpic = moodle_user_picture::make($user, $course->id); + $userpic->image->src = $userdata->picture; + echo $OUTPUT->user_picture($userpic); echo "wwwroot/user/view.php?id=$user&course=$course->id\">". "$userdata->firstname $userdata->lastname
"; $scoreview = ''; @@ -308,7 +314,7 @@ echo '

'.get_string('details','scorm').'

'; // Print general score data - $table = new stdClass(); + $table = new html_table(); $table->head = array(get_string('element','scorm'), get_string('value','scorm')); $table->align = array('left', 'left'); $table->wrap = array('nowrap', 'nowrap'); @@ -342,11 +348,11 @@ } if ($existelements) { echo '

'.get_string('general','scorm').'

'; - print_table($table); + echo $OUTPUT->table($table); } // Print Interactions data - $table = new stdClass(); + $table = new html_table(); $table->head = array(get_string('identifier','scorm'), get_string('type','scorm'), get_string('result','scorm'), @@ -384,11 +390,11 @@ } if ($existinteraction) { echo '

'.get_string('interactions','scorm').'

'; - print_table($table); + echo $OUTPUT->table($table); } // Print Objectives data - $table = new stdClass(); + $table = new html_table(); $table->head = array(get_string('identifier','scorm'), get_string('status','scorm'), get_string('raw','scorm'), @@ -428,9 +434,9 @@ } if ($existobjective) { echo '

'.get_string('objectives','scorm').'

'; - print_table($table); + echo $OUTPUT->table($table); } - $table = new stdClass(); + $table = new html_table(); $table->head = array(get_string('element','scorm'), get_string('value','scorm')); $table->align = array('left', 'left'); $table->wrap = array('nowrap', 'wrap'); @@ -452,7 +458,7 @@ } if ($existelements) { echo '

'.get_string('othertracks','scorm').'

'; - print_table($table); + echo $OUTPUT->table($table); } echo $OUTPUT->box_end(); } else { -- 2.39.5