Diff for /loncom/homework/lonsimpleproblemedit.pm between versions 1.31 and 1.33

version 1.31, 2010/01/27 23:26:09 version 1.33, 2012/11/08 21:55:11
Line 137  sub foil { Line 137  sub foil {
     my $selectvalue=&Apache::loncommon::select_form(      my $selectvalue=&Apache::loncommon::select_form(
                         $value,                          $value,
                         'value'.$number,                          'value'.$number,
                         %values);                          \%values);
     my $selectposition=&Apache::loncommon::select_form(      my $selectposition=&Apache::loncommon::select_form(
                            $position,                             $position,
                            'position'.$number,                             'position'.$number,
                            &Apache::lonlocal::texthash(%positions));                             {&Apache::lonlocal::texthash(%positions)});
     my $text=$qparms{$prefix.'text'.$number};      my $text=$qparms{$prefix.'text'.$number};
     my %lt=&Apache::lonlocal::texthash('foil'  => 'Foil',      my %lt=&Apache::lonlocal::texthash('foil'  => 'Foil',
        'value' => 'Value',         'value' => 'Value',
Line 262  sub handler { Line 262  sub handler {
      $spell_header));       $spell_header));
     if ($symb) {      if ($symb) {
     my $title='<h1>'.&Apache::lonnet::gettitle($symb).'</h1>';      my $title='<h1>'.&Apache::lonnet::gettitle($symb).'</h1>';
         my $displaylink = &get_parent_uri($symb);          if (&get_parent_uri($symb)) {
         if ($displaylink ne '') {              $r->print($title);
             my $functions=&Apache::lonhtmlcommon::start_funclist()  
                          .&Apache::lonhtmlcommon::add_item_funclist(  
                               '<a href="'.$displaylink.'">'  
                              .&mt('Student View').'</a>')  
                              .&Apache::lonhtmlcommon::end_funclist();  
             $r->print(&Apache::loncommon::head_subbox($functions)  
                      .$title);  
         } else {          } else {
             $r->print($title              $r->print($title
                      .'<p class="LC_error">'                       .'<p class="LC_error">'
Line 309  sub handler { Line 302  sub handler {
            .&Apache::loncommon::select_form(             .&Apache::loncommon::select_form(
                 $qtype,                  $qtype,
                 'questiontype',                  'questiontype',
                 &Apache::lonlocal::texthash(%questiontypes))                  {&Apache::lonlocal::texthash(%questiontypes)})
            .'</fieldset>'             .'</fieldset>'
         );          );
         $r->print(          $r->print(
Line 343  sub handler { Line 336  sub handler {
                       &Apache::loncommon::select_form(                        &Apache::loncommon::select_form(
                           $randomize,                            $randomize,
                           'randomize',                            'randomize',
                           &Apache::lonlocal::texthash(%randomizes)).                            {&Apache::lonlocal::texthash(%randomizes)}).
   '</td></tr><tr><td bgcolor="#F0F0F0">');    '</td></tr><tr><td bgcolor="#F0F0F0">');
 # Option Response: Options  # Option Response: Options
     if ($qtype eq 'option') {      if ($qtype eq 'option') {
Line 356  sub handler { Line 349  sub handler {
                   $options.'" />'.&mt('Add new option').': '.                    $options.'" />'.&mt('Add new option').': '.
           '<input type="text" name="newopt" size="15" />'.            '<input type="text" name="newopt" size="15" />'.
           &mt('Delete an option').': '.            &mt('Delete an option').': '.
           &Apache::loncommon::select_form('','delopt',('' => '',%optionshash)).            &Apache::loncommon::select_form('','delopt',{'' => '',%optionshash}).
           '</td></tr><tr><td>');            '</td></tr><tr><td>');
     }      }
 # Foils  # Foils
Line 389  sub handler { Line 382  sub handler {
                       &Apache::loncommon::select_form(                        &Apache::loncommon::select_form(
                           $stringtype,                            $stringtype,
                           'stringtype',                            'stringtype',
                           &Apache::lonlocal::texthash(%stringtypes)).                            {&Apache::lonlocal::texthash(%stringtypes)}).
   '</td></tr></table><br />');    '</td></tr></table><br />');
 # Hint  # Hint
     $r->print(&hint());      $r->print(&hint());
Line 420  sub handler { Line 413  sub handler {
     }      }
     $r->print(&Apache::loncommon::end_page());      $r->print(&Apache::loncommon::end_page());
     return OK;      return OK;
 }   }
   
 1;  1;
 __END__  __END__

Removed from v.1.31  
changed lines
  Added in v.1.33


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