Skip to content
Browse files

MDL-34571 report: convert to html_writer

  • Loading branch information...
1 parent 2bbd896 commit cb589b25c40fbd3f07cd8de67ca7e1a3d406476f @rwijaya rwijaya committed Sep 13, 2012
Showing with 8 additions and 8 deletions.
  1. +7 −7 report/courseoverview/index.php
  2. +1 −1 report/participation/index.php
View
14 report/courseoverview/index.php
@@ -68,8 +68,8 @@
print_error('nostatstodisplay', 'error', $CFG->wwwroot.'/course/view.php?id='.$course->id);
}
-echo '<form action="index.php" method="post">'."\n";
-echo '<div>';
+echo html_writer::start_tag('form', array('action' => 'index.php', 'method' => 'post'));
+echo html_writer::start_tag('div');
$table = new html_table();
$table->width = '*';
@@ -82,13 +82,13 @@
$table->data[] = array(get_string('statsreporttype'),$reporttypemenu,
get_string('statstimeperiod'),$timeoptionsmenu,
- '<label class="accesshide" for="numcourses">' . get_string('numberofcourses') . '</label>' .
- '<input type="text" id="numcourses" name="numcourses" size="3" maxlength="2" value="'.$numcourses.'" />',
- '<input type="submit" value="'.get_string('view').'" />') ;
+ html_writer::label(get_string('numberofcourses'), 'numcourses', false, array('class' => 'accesshide')) .
+ html_writer::empty_tag('input', array('type' => 'text', 'id' => 'numcourses', 'name' => 'numcourses', 'size' => '3', 'maxlength' => '2', 'value' => $numcourses)),
+ html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('view'))));
echo html_writer::table($table);
-echo '</div>';
-echo '</form>';
+echo html_writer::end_tag('div');
+echo html_writer::end_tag('form');
echo $OUTPUT->heading($reportoptions[$report]);
View
2 report/participation/index.php
@@ -303,7 +303,7 @@
}
echo '</div>';
echo '<div>';
- echo '<label for="formactionselect">'.get_string('withselectedusers').'</label>';
+ echo html_writer::label(get_string('withselectedusers', 'formactionselect'), 'formactionselect');
$displaylist['messageselect.php'] = get_string('messageselectadd');
echo html_writer::select($displaylist, 'formaction', '', array(''=>'choosedots'), array('id'=>'formactionselect'));
echo $OUTPUT->help_icon('withselectedusers');

0 comments on commit cb589b2

Please sign in to comment.
Something went wrong with that request. Please try again.