[svn r18627] minor - logic changes - fixed bug, with date in work tool - (partial FS#3664)

skala
Isaac Flores 16 years ago
parent efa9e49864
commit afd771c72b
  1. 6
      main/work/work.lib.php
  2. 6
      main/work/work.php

@ -1,4 +1,4 @@
<?php //$Id: work.lib.php 18625 2009-02-20 20:18:56Z cvargas1 $ <?php //$Id: work.lib.php 18627 2009-02-22 16:28:59Z iflorespaz $
/* For licensing terms, see /dokeos_license.txt */ /* For licensing terms, see /dokeos_license.txt */
/** /**
* @package dokeos.work * @package dokeos.work
@ -6,7 +6,7 @@
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default. * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default.
* @author Roan Embrechts, code refactoring and virtual course support * @author Roan Embrechts, code refactoring and virtual course support
* @author Frederic Vauthier, directories management * @author Frederic Vauthier, directories management
* @version $Id: work.lib.php 18625 2009-02-20 20:18:56Z cvargas1 $ * @version $Id: work.lib.php 18627 2009-02-22 16:28:59Z iflorespaz $
*/ */
/** /**
* Displays action links (for admins, authorized groups members and authorized students) * Displays action links (for admins, authorized groups members and authorized students)
@ -206,7 +206,7 @@ function create_group_date_select($prefix='')
$group_name[] = FormValidator :: createElement('select',$prefix.'day','',array_combine(range(1,31),range(1,31))); $group_name[] = FormValidator :: createElement('select',$prefix.'day','',array_combine(range(1,31),range(1,31)));
$group_name[] = FormValidator :: createElement('select',$prefix.'month','',array_combine(range(1,12),array(get_lang('JanuaryLong'),get_lang('FebruaryLong'),get_lang('MarchLong'),get_lang('AprilLong'),get_lang('MayLong'),get_lang('JuneLong'),get_lang('JulyLong'),get_lang('AugustLong'),get_lang('SeptemberLong'),get_lang('OctoberLong'),get_lang('NovemberLong'),get_lang('DecemberLong')))); $group_name[] = FormValidator :: createElement('select',$prefix.'month','',array_combine(range(1,12),array(get_lang('JanuaryLong'),get_lang('FebruaryLong'),get_lang('MarchLong'),get_lang('AprilLong'),get_lang('MayLong'),get_lang('JuneLong'),get_lang('JulyLong'),get_lang('AugustLong'),get_lang('SeptemberLong'),get_lang('OctoberLong'),get_lang('NovemberLong'),get_lang('DecemberLong'))));
$group_name[] = FormValidator :: createElement('select',$prefix.'year','',array($d_year=>$d_year,$d_year+1=>$d_year+1)); $group_name[] = FormValidator :: createElement('select',$prefix.'year','',array($d_year=>$d_year,$d_year+1=>$d_year+1));
$group_name[] = FormValidator :: createElement('select',$prefix.'hour','',array_combine(range(1,24),range(1,24))); $group_name[] = FormValidator :: createElement('select',$prefix.'hour','',array_combine(range(1,23),range(1,23)));
$group_name[] = FormValidator :: createElement('select',$prefix.'minute','',$minute); $group_name[] = FormValidator :: createElement('select',$prefix.'minute','',$minute);
return $group_name; return $group_name;
} }

@ -1,4 +1,4 @@
<?php //$Id: work.php 18626 2009-02-21 14:15:42Z ivantcholakov $ <?php //$Id: work.php 18627 2009-02-22 16:28:59Z iflorespaz $
/* For licensing terms, see /dokeos_license.txt */ /* For licensing terms, see /dokeos_license.txt */
/** /**
* @package dokeos.work * @package dokeos.work
@ -6,7 +6,7 @@
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default. * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default.
* @author Roan Embrechts, code refactoring and virtual course support * @author Roan Embrechts, code refactoring and virtual course support
* @author Frederic Vauthier, directories management * @author Frederic Vauthier, directories management
* @version $Id: work.php 18626 2009-02-21 14:15:42Z ivantcholakov $ * @version $Id: work.php 18627 2009-02-22 16:28:59Z iflorespaz $
* *
* @todo refactor more code into functions, use quickforms, coding standards, ... * @todo refactor more code into functions, use quickforms, coding standards, ...
*/ */
@ -1214,7 +1214,7 @@ function draw_date_picker($prefix,$default='') {
$date_form = make_select($prefix.'_day', array_combine(range(1,31),range(1,31)), $d_day); $date_form = make_select($prefix.'_day', array_combine(range(1,31),range(1,31)), $d_day);
$date_form .= make_select($prefix.'_month', $month_list, $d_month); $date_form .= make_select($prefix.'_month', $month_list, $d_month);
$date_form .= make_select($prefix.'_year', array( $d_year=> $d_year, $d_year+1=>$d_year+1), $d_year).'&nbsp;&nbsp;&nbsp;&nbsp;'; $date_form .= make_select($prefix.'_year', array( $d_year=> $d_year, $d_year+1=>$d_year+1), $d_year).'&nbsp;&nbsp;&nbsp;&nbsp;';
$date_form .= make_select($prefix.'_hour', array_combine(range(1,24),range(1,24)), $d_hour).' : '; $date_form .= make_select($prefix.'_hour', array_combine(range(1,23),range(1,23)), $d_hour).' : ';
$date_form .= make_select($prefix.'_minute', $minute, $d_minute); $date_form .= make_select($prefix.'_minute', $minute, $d_minute);
return $date_form; return $date_form;
} }

Loading…
Cancel
Save