Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.253.2.4 and 1.253.2.7

version 1.253.2.4, 2010/10/04 19:43:30 version 1.253.2.7, 2010/12/02 13:47:17
Line 410  The method used to restrict user input w Line 410  The method used to restrict user input w
 ##############################################  ##############################################
 sub date_setter {  sub date_setter {
     my ($formname,$dname,$currentvalue,$special,$includeempty,$state,      my ($formname,$dname,$currentvalue,$special,$includeempty,$state,
         $no_hh_mm_ss,$defhour,$defmin,$defsec,$nolink) = @_;          $no_hh_mm_ss,$defhour,$defmin,$defsec,$nolink,$hide_timezone) = @_;
     my $now = time;      my $now = time;
     my $wasdefined=1;      my $wasdefined=1;
     if (! defined($state) || $state ne 'disabled') {      if (! defined($state) || $state ne 'disabled') {
Line 563  ENDJS Line 563  ENDJS
         $cal_link = qq{<a href="javascript:$dname\_opencalendar()">};          $cal_link = qq{<a href="javascript:$dname\_opencalendar()">};
     }      }
     #      #
     my $tzone = ' '.$tzname.' ';      my $tzone;
       unless ($hide_timezone) {
           $tzone = ' '.$tzname.' ';
       }
     if ($no_hh_mm_ss) {      if ($no_hh_mm_ss) {
         $result .= &mt('[_1] [_2] [_3] ',          $result .= &mt('[_1] [_2] [_3] ',
                        $monthselector,$dayselector,$yearselector).                         $monthselector,$dayselector,$yearselector).
Line 643  Returns: Unix time represented in the fo Line 646  Returns: Unix time represented in the fo
 ##############################################  ##############################################
 ##############################################  ##############################################
 sub get_date_from_form {  sub get_date_from_form {
     my ($dname) = @_;      my ($dname,$timezone) = @_;
     my ($sec,$min,$hour,$day,$month,$year);      my ($sec,$min,$hour,$day,$month,$year);
     #      #
     if (defined($env{'form.'.$dname.'_second'})) {      if (defined($env{'form.'.$dname.'_second'})) {
Line 693  sub get_date_from_form { Line 696  sub get_date_from_form {
     if (($year<1970) || ($year>2037)) { return undef; }      if (($year<1970) || ($year>2037)) { return undef; }
     if (defined($sec) && defined($min)   && defined($hour) &&      if (defined($sec) && defined($min)   && defined($hour) &&
         defined($day) && defined($month) && defined($year)) {          defined($day) && defined($month) && defined($year)) {
         my $timezone = &Apache::lonlocal::gettimezone();          if (defined($timezone)) {
               if (&Apache::lonlocal::gettimezone($timezone) eq 'local') {
                   $timezone = &Apache::lonlocal::gettimezone();
               }
           } else {
               $timezone = &Apache::lonlocal::gettimezone();
           }
         my $dt = DateTime->new( year   => $year,          my $dt = DateTime->new( year   => $year,
                                 month  => $month,                                  month  => $month,
                                 day    => $day,                                  day    => $day,
Line 1386  returns: nothing Line 1395  returns: nothing
                 my $tooltip = 'Go to main menu';                  my $tooltip = 'Go to main menu';
                 my $no_mt_descr = 0;                  my $no_mt_descr = 0;
                 if ((exists($env{'request.course.id'})) &&                  if ((exists($env{'request.course.id'})) &&
                     ($env{'request.course.id'} ne '')) {                      ($env{'request.course.id'} ne '') && 
                       !($env{'form.context'} eq 'requestcrs')) {
                     if ((&Apache::loncommon::needs_gci_custom()) || ($env{'user.domain'} eq 'gcitest')) {                      if ((&Apache::loncommon::needs_gci_custom()) || ($env{'user.domain'} eq 'gcitest')) {
                         $href = '/adm/navmaps';                          if ($env{'environment.remotenavmap'} eq 'on') {
                               # open link using javascript when remote navmap is activated
                               $href = "javascript:gonav('/adm/navmaps');";
                           } else {
                               $href = '/adm/navmaps';
                           }
                         $tooltip = 'Contents';                          $tooltip = 'Contents';
                     }                      }
                     if ($env{'course.'.$env{'request.course.id'}.'.description'} ne '') {                      if ($env{'course.'.$env{'request.course.id'}.'.description'} ne '') {

Removed from v.1.253.2.4  
changed lines
  Added in v.1.253.2.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>