/**
* Prints form items with the names $day, $month and $year
*
- * @param int $day ?
- * @param int $month ?
- * @param int $year ?
+ * @param string $day fieldname
+ * @param string $month fieldname
+ * @param string $year fieldname
* @param int $currenttime A default timestamp in GMT
- * @todo Finish documenting this function
+ * @param boolean $return
*/
-function print_date_selector($day, $month, $year, $currenttime=0) {
+function print_date_selector($day, $month, $year, $currenttime=0, $return=false) {
if (!$currenttime) {
$currenttime = time();
for ($i=2000; $i<=2010; $i++) {
$years[$i] = $i;
}
- choose_from_menu($days, $day, $currentdate['mday'], '');
- choose_from_menu($months, $month, $currentdate['mon'], '');
- choose_from_menu($years, $year, $currentdate['year'], '');
+ return choose_from_menu($days, $day, $currentdate['mday'], '', '', '0', $return)
+ .choose_from_menu($months, $month, $currentdate['mon'], '', '', '0', $return)
+ .choose_from_menu($years, $year, $currentdate['year'], '', '', '0', $return);
+
}
/**
*Prints form items with the names $hour and $minute
*
- * @param ? $hour ?
- * @param ? $minute ?
+ * @param string $hour fieldname
+ * @param string ? $minute fieldname
* @param $currenttime A default timestamp in GMT
- * @param int $step ?
- * @todo Finish documenting this function
+ * @param int $step minute spacing
+ * @param boolean $return
*/
-function print_time_selector($hour, $minute, $currenttime=0, $step=5 ,$return=false) {
+function print_time_selector($hour, $minute, $currenttime=0, $step=5, $return=false) {
if (!$currenttime) {
$currenttime = time();
$minutes[$i] = sprintf("%02d",$i);
}
- return choose_from_menu($hours, $hour, $currentdate['hours'], '','','',$return)
- .choose_from_menu($minutes, $minute, $currentdate['minutes'], '','','',$return);
+ return choose_from_menu($hours, $hour, $currentdate['hours'], '','','0',$return)
+ .choose_from_menu($minutes, $minute, $currentdate['minutes'], '','','0',$return);
}
/**
* Prints time limit value selector
*
* @uses $CFG
- * @param int $timelimit ?
- * @param string $unit ?
- * @todo Finish documenting this function
+ * @param int $timelimit default
+ * @param string $unit
+ * @param string $name
+ * @param boolean $return
*/
-function print_timer_selector($timelimit = 0, $unit = '', $name = 'timelimit') {
+function print_timer_selector($timelimit = 0, $unit = '', $name = 'timelimit', $return=false) {
global $CFG;
for ($i=1; $i<=$maxvalue; $i++) {
$minutes[$i] = $i.$unit;
}
- choose_from_menu($minutes, $name, $timelimit, get_string('none'));
+ return choose_from_menu($minutes, $name, $timelimit, get_string('none'), '','','0',$return);
}
/**