Diff for /loncom/homework/structuretags.pm between versions 1.444 and 1.444.4.5

version 1.444, 2009/05/11 16:51:22 version 1.444.4.5, 2010/01/29 15:37:04
Line 243  sub page_start { Line 243  sub page_start {
   
  my ($symb,undef,undef,undef,$publicuser)= &Apache::lonnet::whichuser();   my ($symb,undef,undef,undef,$publicuser)= &Apache::lonnet::whichuser();
  if ($symb eq '' && !$publicuser) {   if ($symb eq '' && !$publicuser) {
     my $help = &Apache::loncommon::help_open_topic("Ambiguous_Reference");              $page_start .= '<p class="LC_info">'
     $help=&mt("Browsing resource, all submissions are temporary.")."<br />";                            .&mt('Browsing resource, all submissions are temporary.')
     $page_start .= $help;                            .'</p>';
  }          }
     }      }
   
     if (!defined($found{'body'}) && $env{'request.state'} ne 'construct') {      if (!defined($found{'body'}) && $env{'request.state'} ne 'construct') {
Line 418  sub problem_web_to_edit_header { Line 418  sub problem_web_to_edit_header {
     '</div>';      '</div>';
     }      }
           
     my $show_all_foils_text =       my $show_all_foils_text =
  ($Apache::lonhomework::parsing_a_task) ?          ($Apache::lonhomework::parsing_a_task) ?
  &mt('&nbsp;Show&nbsp;All&nbsp;Instances')          &mt('Show All Instances')
  : &mt('&nbsp;Show&nbsp;All&nbsp;Foils');          : &mt('Show All Foils');
   
     my $show_all= '<span class="LC_nobreak"><label><input type="checkbox" name="showallfoils"';      my $show_all= '<span class="LC_nobreak"><label for="showallfoils">'
                    .'<input type="checkbox" name="showallfoils"';
     if (defined($env{'form.showallfoils'})) { $show_all.=' checked="checked"'; }      if (defined($env{'form.showallfoils'})) { $show_all.=' checked="checked"'; }
     $show_all.= ' />'.$show_all_foils_text.'</label></span>';      $show_all.= ' /> '.$show_all_foils_text
                  .'</label></span>';
   
   
   
Line 674  sub checkout_msg { Line 676  sub checkout_msg {
     return (<<ENDCHECKOUT);      return (<<ENDCHECKOUT);
 <h2>$lt{'resource'}</h2>  <h2>$lt{'resource'}</h2>
     <p>$lt{'id_expln'}</p>      <p>$lt{'id_expln'}</p>
 <font color="red">  <p class="LC_warning">$lt{'warning'}</p>
 <p>$lt{'warning'}</p>  
 </font>  
 <form name="checkout" method="post" action="$uri">  <form name="checkout" method="post" action="$uri">
 <input type="hidden" name="doescheckout" value="yes" />  <input type="hidden" name="doescheckout" value="yes" />
 <input type="button" name="checkoutbutton" value="$lt{'checkout'}" onClick="javascript:if (confirm('$lt{'checkout?'}')) { document.checkout.submit(); }" />  <input type="button" name="checkoutbutton" value="$lt{'checkout'}" onClick="javascript:if (confirm('$lt{'checkout?'}')) { document.checkout.submit(); }" />
Line 902  sub start_problem { Line 902  sub start_problem {
     '<input type="hidden" name="username"      '<input type="hidden" name="username"
                              value="'.$env{'form.username'}.'" />';                               value="'.$env{'form.username'}.'" />';
     }      }
     if ($env{'request.role.adv'}) {              if ($env{'request.role.adv'}) {
  $form_tag_start.=                  $form_tag_start.= ' <label class="LC_nobreak">'
     ' <label><input type="checkbox" name="showallfoils"';                           .'<input type="checkbox" name="showallfoils"';
  if (defined($env{'form.showallfoils'})) {                  if (defined($env{'form.showallfoils'})) {
     $form_tag_start.=' checked="checked"';                      $form_tag_start.=' checked="checked"';
  }                  }
  $form_tag_start.= ' />'.&mt('&nbsp;Show&nbsp;All&nbsp;Foils').                  $form_tag_start.= ' /> '
     '</label>';                                   .&mt('Show All Foils')
                                    .'</label>';
   
     }      }
             if ($Apache::lonhomework::type eq 'practice') {              if ($Apache::lonhomework::type eq 'practice') {
                 $form_tag_start.=&practice_problem_header();                  $form_tag_start.=&practice_problem_header();
Line 1066  sub end_problem { Line 1068  sub end_problem {
  #  it in the problem header.  We have been logging the   #  it in the problem header.  We have been logging the
  #  last due date written to file.    #  last due date written to file. 
   
  my $duetime = &Apache::lonnet::EXT("resource.$id.duedate");    my $duetime = &Apache::lonnet::EXT("resource.$id.duedate");
  my $duedate = POSIX::strftime("%c",localtime($duetime));   my $duedate = POSIX::strftime("%c",localtime($duetime));
           my $duedate_text = &mt('Due date: [_1]'
                                 ,&Apache::lonlocal::locallocaltime($duetime));
  my $temp_file;   my $temp_file;
  my $filename = "/home/httpd/prtspool/$env{'user.name'}_$env{'user.domain'}_printout.due";   my $filename = "/home/httpd/prtspool/$env{'user.name'}_$env{'user.domain'}_printout.due";
   
Line 1099  sub end_problem { Line 1103  sub end_problem {
     if (not $env{'request.symb'} =~ m/\.page_/) {      if (not $env{'request.symb'} =~ m/\.page_/) {
  if(not $duedate=~m/1969/ and $Apache::lonhomework::type ne 'exam') {   if(not $duedate=~m/1969/ and $Apache::lonhomework::type ne 'exam') {
     $frontmatter .= $begin_doc.      $frontmatter .= $begin_doc.
  '\textit{Due date: '.$duedate.'} '.$toc_line;   '\textit{'.$duedate_text.'} '.$toc_line;
  } else {   } else {
     $frontmatter.= $begin_doc.$toc_line;      $frontmatter.= $begin_doc.$toc_line;
     if ($Apache::lonhomework::type eq 'exam' and $allow_print_points==1) { $frontmatter .= '\fbox{\textit{'.$weight.' pt}}';}                      if ($Apache::lonhomework::type eq 'exam' and $allow_print_points==1) {
                           $frontmatter .= '\fbox{\textit{'.$weight.' pt}}';
                       }
  }   }
     } else {      } else {
  $frontmatter .= '\vskip 1mm\textit{Due date: '.$duedate.'} \\\\\\\\'.$startminipage;   $frontmatter .= '\vskip 1mm\textit{'.$duedate_text.'} \\\\\\\\'.$startminipage;
     }      }
  } else {   } else {
     if (not $env{'request.symb'} =~ m/\.page_/) {      if (not $env{'request.symb'} =~ m/\.page_/) {
  $frontmatter .= $begin_doc.$toc_line;   $frontmatter .= $begin_doc.$toc_line;
  if (($Apache::lonhomework::type eq 'exam') and ($allow_print_points==1)) { $frontmatter .= '\fbox{\textit{'.$weight.' pt}}';}                  if (($Apache::lonhomework::type eq 'exam') and ($allow_print_points==1)) {
                       $frontmatter .= '\fbox{\textit{'.$weight.' pt}}';
                   }
     } else {      } else {
  $frontmatter .= '\vskip 1mm \\\\\\\\'.$startminipage;   $frontmatter .= '\vskip 1mm \\\\\\\\'.$startminipage;
     }      }
Line 1752  sub start_part { Line 1760  sub start_part {
     '.disableexampointprint'}) eq 'yes') {      '.disableexampointprint'}) eq 'yes') {
  $allow_print_points=0;   $allow_print_points=0;
     }      }
     if (($Apache::lonhomework::type eq 'exam') && ($allow_print_points)) { $result .= '\fbox{\textit{'.$weight.' pt}}';}                      if (($Apache::lonhomework::type eq 'exam') && ($allow_print_points)) { 
                           $result .= '\vskip 10mm\fbox{\textit{'.$weight.' pt}}';
                       }
  } elsif ($target eq 'web') {   } elsif ($target eq 'web') {
     $result.='<a name="'.&escape($Apache::inputtags::part).'" />';      $result.='<a name="'.&escape($Apache::inputtags::part).'" />';
  }   }
Line 2039  sub start_simpleeditbutton { Line 2049  sub start_simpleeditbutton {
 #              .&mt('Note: it can take up to 10 minutes for changes to take effect for all users.')  #              .&mt('Note: it can take up to 10 minutes for changes to take effect for all users.')
 #              .&Apache::loncommon::help_open_topic('Caching')  #              .&Apache::loncommon::help_open_topic('Caching')
 #              .'</p>';  #              .'</p>';
         $result.=&Apache::lontemplate::start_functionslist()          $result .= '<table width="100%" bgcolor="#FFFFAA" border="2"><tr><td>'.
                 .&Apache::lontemplate::item_functionslist(                     '<a href="'.$url.'/smpedit?symb='.&escape($symb).'">'.
                      '<a href="'.$url.'/smpedit?symb='.&escape($symb).'">'.&mt('Edit').'</a>')                     &mt('Edit').'</a></td></tr></table><br />';
                 .&Apache::lontemplate::end_functionslist();  
   
     }      }
     return $result;      return $result;

Removed from v.1.444  
changed lines
  Added in v.1.444.4.5


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