Diff for /loncom/homework/structuretags.pm between versions 1.444.4.1 and 1.449

version 1.444.4.1, 2009/08/12 22:57:14 version 1.449, 2009/06/09 12:56:27
Line 203  sub page_start { Line 203  sub page_start {
  }   }
     }      }
   
       my $pageheader = '';
     if (defined($found{'body'})) {      if (defined($found{'body'})) {
  $body_args{'skip_phases'}{'body'}=1;   $body_args{'skip_phases'}{'body'}=1;
     } elsif (!defined($found{'body'})       } elsif (!defined($found{'body'}) 
Line 211  sub page_start { Line 212  sub page_start {
     if ($env{'environment.remote'} ne 'off') {      if ($env{'environment.remote'} ne 'off') {
  $body_args{'only_body'}  = 1;   $body_args{'only_body'}  = 1;
     }      }
           $pageheader = &Apache::lonhtmlcommon::breadcrumbs() # FIXME add breadcrumbs
                        .&Apache::loncommon::head_subbox(
                   &Apache::loncommon::CSTR_pageheader());
  }   }
     } elsif (!defined($found{'body'})) {      } elsif (!defined($found{'body'})) {
  my %add_entries;   my %add_entries;
Line 222  sub page_start { Line 226  sub page_start {
   
  my $bgcolor=&Apache::lonxml::get_param('bgcolor',$parstack,   my $bgcolor=&Apache::lonxml::get_param('bgcolor',$parstack,
        $safeeval);         $safeeval);
         if ($bgcolor eq '' ) { $bgcolor = '#FFFFFF'; }          if ($bgcolor eq '' ) { $bgcolor = '#FFFFFF'; }
   
  $body_args{'bgcolor'}        = $bgcolor;          $body_args{'bgcolor'}        = $bgcolor;
  $body_args{'no_title'}       = 1;          # $body_args{'no_title'}       = 1;
  $body_args{'force_register'} = 1;          $body_args{'force_register'} = 1;
  $body_args{'add_entries'}    = \%add_entries;          $body_args{'add_entries'}    = \%add_entries;
  if ($env{'environment.remote'} eq 'off'          if ($env{'environment.remote'} eq 'off'
     && $env{'request.state'} eq   'construct') {              && $env{'request.state'} eq   'construct') {
     $body_args{'only_body'}  = 1;              $body_args{'only_body'}  = 1;
  }          }
     }      }
     $body_args{'no_auto_mt_title'} = 1;      $body_args{'no_auto_mt_title'} = 1;
     my $page_start = &Apache::loncommon::start_page($name,$extra_head,      my $page_start = &Apache::loncommon::start_page($name,$extra_head,
     \%body_args);      \%body_args);
       $page_start .= $pageheader;
     if (!defined($found{'body'})       if (!defined($found{'body'}) 
  && $env{'request.state'} ne 'construct'   && $env{'request.state'} ne 'construct'
  && ($target eq 'web' || $target eq 'webgrade')) {   && ($target eq 'web' || $target eq 'webgrade')) {
   
  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) {
         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 419  sub problem_web_to_edit_header { Line 422  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('Show All Instances')   &mt('&nbsp;Show&nbsp;All&nbsp;Instances')
         : &mt('Show All Foils');   : &mt('&nbsp;Show&nbsp;All&nbsp;Foils');
   
     my $show_all= '<span class="LC_nobreak"><label for="showallfoils">'      my $show_all= '<span class="LC_nobreak"><label><input type="checkbox" name="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      $show_all.= ' />'.$show_all_foils_text.'</label></span>';
                .'</label></span>';  
   
   
   
Line 525  $show_all Line 526  $show_all
   
     $result.='      $result.='
    </div>     </div>
    <div class="LC_edit_problem_header_edit_row">';     <hr class="LC_edit_problem_divide" />
      <div>';
     $result.='<input type="hidden" name="problemmode" value="view" />';      $result.='<input type="hidden" name="problemmode" value="view" />';
     $result .= '<input type="button" name="submitmode" accesskey="e" value="'.&mt('Edit').'" '.      $result .= '<input type="button" name="submitmode" accesskey="e" value="'.&mt('Edit').'" '.
                'onclick="javascript:setmode(this.form,'."'edit'".')" />';                 'onclick="javascript:setmode(this.form,'."'edit'".')" />';
Line 533  $show_all Line 535  $show_all
                'onclick="javascript:setmode(this.form,'."'editxml'".')" />';                 'onclick="javascript:setmode(this.form,'."'editxml'".')" />';
     $result.='      $result.='
    </div>     </div>
      <hr class="LC_edit_problem_divide" />
    '.&Apache::lonxml::message_location().'     '.&Apache::lonxml::message_location().'
 </div>';  </div>';
     return $result;      return $result;
Line 903  sub start_problem { Line 906  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.= ' <label class="LC_nobreak">'   $form_tag_start.=
                          .'<input type="checkbox" name="showallfoils"';      ' <label><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.= ' /> '   $form_tag_start.= ' />'.&mt('&nbsp;Show&nbsp;All&nbsp;Foils').
                                  .&mt('Show All Foils')      '</label>';
                                  .'</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 1069  sub end_problem { Line 1070  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]'          my $duedate_text = &mt('Due date: [_1]'
                               ,&Apache::lonlocal::locallocaltime($duetime));                                ,&Apache::lonlocal::locallocaltime($duetime));

Removed from v.1.444.4.1  
changed lines
  Added in v.1.449


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