Merge branch 'MDL-30843_b' of git://github.com/rwijaya/moodle

This commit is contained in:
Sam Hemelryk 2012-04-10 12:34:37 +12:00
commit 5bfeb5ffd3
108 changed files with 390 additions and 216 deletions

View file

@ -3806,9 +3806,11 @@ function forum_print_mode_form($id, $mode, $forumtype='') {
global $OUTPUT;
if ($forumtype == 'single') {
$select = new single_select(new moodle_url("/mod/forum/view.php", array('f'=>$id)), 'mode', forum_get_layout_modes(), $mode, null, "mode");
$select->set_label(get_accesshide(get_string('displaymode', 'forum')));
$select->class = "forummode";
} else {
$select = new single_select(new moodle_url("/mod/forum/discuss.php", array('d'=>$id)), 'mode', forum_get_layout_modes(), $mode, null, "mode");
$select->set_label(get_accesshide(get_string('displaymode', 'forum')));
}
echo $OUTPUT->render($select);
}

View file

@ -343,10 +343,15 @@ function forum_print_big_search_form($course) {
}
echo '<input name="timefromrestrict" type="checkbox" value="1" alt="'.get_string('searchdatefrom', 'forum').'" onclick="return lockoptions(\'searchform\', \'timefromrestrict\', timefromitems)" '. $datefromchecked . ' /> ';
$selectors = html_writer::select_time('days', 'fromday', $datefrom)
$selectors = html_writer::label(get_string('days'), 'menufromday', false, array('class' => 'accesshide'))
. html_writer::select_time('days', 'fromday', $datefrom)
. html_writer::label(get_string('month'), 'menufrommonth', false, array('class' => 'accesshide'))
. html_writer::select_time('months', 'frommonth', $datefrom)
. html_writer::label(get_string('year'), 'menufromyear', false, array('class' => 'accesshide'))
. html_writer::select_time('years', 'fromyear', $datefrom)
. html_writer::label(get_string('hour'), 'menufromhour', false, array('class' => 'accesshide'))
. html_writer::select_time('hours', 'fromhour', $datefrom)
. html_writer::label(get_string('minutes'), 'menufromminute', false, array('class' => 'accesshide'))
. html_writer::select_time('minutes', 'fromminute', $datefrom);
echo $selectors;
echo '<input type="hidden" name="hfromday" value="0" />';
@ -369,10 +374,15 @@ function forum_print_big_search_form($course) {
}
echo '<input name="timetorestrict" type="checkbox" value="1" alt="'.get_string('searchdateto', 'forum').'" onclick="return lockoptions(\'searchform\', \'timetorestrict\', timetoitems)" ' .$datetochecked. ' /> ';
$selectors = html_writer::select_time('days', 'fromday', $dateto)
$selectors = html_writer::label(get_string('days'), 'menufromday', false, array('class' => 'accesshide'))
. html_writer::select_time('days', 'fromday', $dateto)
. html_writer::label(get_string('month'), 'menufrommonth', false, array('class' => 'accesshide'))
. html_writer::select_time('months', 'frommonth', $dateto)
. html_writer::label(get_string('year'), 'menufromyear', false, array('class' => 'accesshide'))
. html_writer::select_time('years', 'fromyear', $dateto)
. html_writer::label(get_string('hour'), 'menufromhour', false, array('class' => 'accesshide'))
. html_writer::select_time('hours', 'fromhour', $dateto)
. html_writer::label(get_string('minutes'), 'menufromminute', false, array('class' => 'accesshide'))
. html_writer::select_time('minutes', 'fromminute', $dateto);
echo $selectors;