Diff for /loncom/homework/inputtags.pm between versions 1.342 and 1.348

version 1.342, 2016/04/06 00:34:12 version 1.348, 2019/08/11 16:19:52
Line 460  sub start_textline { Line 460  sub start_textline {
  }   }
  my $name = 'HWVAL_'.$id;   my $name = 'HWVAL_'.$id;
                 my $itemid = 'HWVAL_'.$partid.'_'.$id;                  my $itemid = 'HWVAL_'.$partid.'_'.$id;
                   # NOTE: the input id should match the one given by defaut_homework input_id().
                 my $input_tag_id = $itemid.'_'.$input_id;                  my $input_tag_id = $itemid.'_'.$input_id;
  if ($Apache::inputtags::status[-1] eq 'CANNOT_ANSWER') {   if ($Apache::inputtags::status[-1] eq 'CANNOT_ANSWER') {
     $name = "none";      $name = "none";
Line 670  sub file_selector { Line 671  sub file_selector {
         my $free_space = $maxfilesize * 1048576;          my $free_space = $maxfilesize * 1048576;
         $result .= &mt('Submit a file: (only one file per submission)').          $result .= &mt('Submit a file: (only one file per submission)').
             ' <br /><input type="file" size="50" name="HWFILE'.$jspart.'_'.$id.              ' <br /><input type="file" size="50" name="HWFILE'.$jspart.'_'.$id.
             '" id="HWFILE'.$jspart.'_'.$id.'" class="flUpload" /><br />'.              '" id="HWFILE'.$jspart.'_'.$id.'" class="LC_flUpload LC_hwkfile" />'.
             '<input type="hidden" id="free_space" value="'.$free_space.'" /><br />'              '<input type="hidden" id="LC_free_space_'.$jspart.'_'.$id.'"'.
               ' value="'.$free_space.'" /><br />';
         }          }
     if ( $which eq 'both') {      if ( $which eq 'both') {
  $result.='<br />'.'<strong>'.&mt('OR:').'</strong><br />';   $result.='<br />'.'<strong>'.&mt('OR:').'</strong><br />';
Line 1333  sub decideoutput { Line 1335  sub decideoutput {
             my $first_access=&Apache::lonnet::get_first_access($interval[1]);              my $first_access=&Apache::lonnet::get_first_access($interval[1]);
             if (defined($first_access)) {              if (defined($first_access)) {
                 my $due_date= &Apache::lonnet::EXT("resource.$part.duedate");                  my $due_date= &Apache::lonnet::EXT("resource.$part.duedate");
                 unless (($due_date) && ($due_date < $first_access + $interval[0])) {                   my ($timelimit) = ($interval[0] =~ /^(\d+)/);
                   unless (($due_date) && ($due_date < $first_access + $timelimit)) { 
                     $message = &mt("Answer Submitted: Your final submission will be graded when the time limit is reached.");                      $message = &mt("Answer Submitted: Your final submission will be graded when the time limit is reached.");
                 }                  }
             }              }
Line 1902  sub previous_tries { Line 1905  sub previous_tries {
     my $tries_text = &get_tries_text('link');      my $tries_text = &get_tries_text('link');
     my $prefix = $env{'form.request.prefix'};      my $prefix = $env{'form.request.prefix'};
     $prefix =~ tr{.}{_};      $prefix =~ tr{.}{_};
     my $function_name = "LONCAPA_previous_tries_".$prefix.      my $function_name = 'LONCAPA_previous_tries_'.$prefix;
  $Apache::lonxml::curdepth.'_'.$env{'form.counter'};      if (($env{'request.state'} eq 'construct') || ($id =~ /[._]|[^\w\s\-]/)) {
           $function_name .= $Apache::lonxml::curdepth;
       } else {
           $function_name .= &js_escape($id);
       }
       $function_name .= '_'.$Apache::lonxml::counter;
     my $result = &Apache::loncommon::modal_adhoc_window($function_name,420,410,$output,&mt($tries_text))."<br />";      my $result = &Apache::loncommon::modal_adhoc_window($function_name,420,410,$output,&mt($tries_text))."<br />";
     return $result;      return $result;
 }  }

Removed from v.1.342  
changed lines
  Added in v.1.348


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