Diff for /loncom/interface/lonparmset.pm between versions 1.419 and 1.424

version 1.419, 2008/12/12 17:06:05 version 1.424, 2009/01/20 18:37:30
Line 1307  sub parmmenu { Line 1307  sub parmmenu {
 </script>  </script>
 ENDSCRIPT  ENDSCRIPT
     $r->print();      $r->print();
     $r->print("\n<table id=\"LC_parm_overview_parm_menu\"><tr>");      $r->print("\n".'<table id="LC_parm_overview_parm_menu"><tr>');
     my $cnt=0;      my $cnt=0;
     foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) {      foreach $tempkey (&keysindisplayorder($allparms,$keyorder)) {
  $r->print("\n".'<td><label><input type="checkbox" name="pscat" ');   $r->print("\n".'<td><label><input type="checkbox" name="pscat" ');
  $r->print('value="'.$tempkey.'"');   $r->print('value="'.$tempkey.'"');
  if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) {   if ($$pscat[0] eq "all" || grep $_ eq $tempkey, @{$pscat}) {
     $r->print(' checked');      $r->print(' checked="checked"');
  }   }
  $r->print('>'.($$allparms{$tempkey}=~/\S/ ? &mt($$allparms{$tempkey})   $r->print(' />'.($$allparms{$tempkey}=~/\S/ ? &mt($$allparms{$tempkey})
                                   : &mt($tempkey))                                    : &mt($tempkey))
   .'</label></td>');    .'</label></td>');
   $cnt++;    $cnt++;
Line 1325  ENDSCRIPT Line 1325  ENDSCRIPT
  }   }
     }      }
     $r->print('</tr>'      $r->print('</tr>'
              .'<tr id=\"LC_parm_overview_parm_menu_selectors\">'               .'<tr id="LC_parm_overview_parm_menu_selectors">'
              .'<td valign="top">'               .'<td valign="top">'
              .'<fieldset><legend><b>'.&mt('Parameter Selection').'</b></legend>'               .'<fieldset><legend><b>'.&mt('Parameter Selection').'</b></legend>'
              .'<span class="LC_nobreak">'               .'<span class="LC_nobreak">'
Line 1368  ENDSCRIPT Line 1368  ENDSCRIPT
   
 sub partmenu {  sub partmenu {
     my ($r,$allparts,$psprt)=@_;      my ($r,$allparts,$psprt)=@_;
     $r->print('<select multiple name="psprt" size="8">');      $r->print('<select multiple="multiple" name="psprt" size="8">');
     $r->print('<option value="all"');      $r->print('<option value="all"');
     $r->print(' selected="selected"') unless (@{$psprt});      $r->print(' selected="selected"') unless (@{$psprt});
     $r->print('>'.&mt('All Parts').'</option>');      $r->print('>'.&mt('All Parts').'</option>');
Line 1532  sub sectionmenu { Line 1532  sub sectionmenu {
     my %sectionhash = &Apache::loncommon::get_sections();      my %sectionhash = &Apache::loncommon::get_sections();
     return if (!%sectionhash);      return if (!%sectionhash);
   
     $r->print('<select name="Section" multiple="true" size="8" >');      $r->print('<select name="Section" multiple="multiple" size="8">');
     foreach my $s ('all',sort keys %sectionhash) {      foreach my $s ('all',sort keys %sectionhash) {
  $r->print('    <option value="'.$s.'"');   $r->print('    <option value="'.$s.'"');
  foreach (@{$selectedsections}) {   foreach (@{$selectedsections}) {
Line 1551  sub groupmenu { Line 1551  sub groupmenu {
     my %grouphash = &Apache::longroup::coursegroups();      my %grouphash = &Apache::longroup::coursegroups();
     return if (!%grouphash);      return if (!%grouphash);
   
     $r->print('<select name="Group" multiple="true" size="8" >');      $r->print('<select name="Group" multiple="multiple" size="8">');
     foreach my $group (sort(keys(%grouphash))) {      foreach my $group (sort(keys(%grouphash))) {
  $r->print('    <option value="'.$group.'"');   $r->print('    <option value="'.$group.'"');
  foreach (@{$selectedgroups}) {   foreach (@{$selectedgroups}) {
Line 1601  sub sortmenu { Line 1601  sub sortmenu {
     my ($r,$sortorder)=@_;      my ($r,$sortorder)=@_;
     $r->print('<br /><label><input type="radio" name="sortorder" value="realmstudent"');      $r->print('<br /><label><input type="radio" name="sortorder" value="realmstudent"');
     if ($sortorder eq 'realmstudent') {      if ($sortorder eq 'realmstudent') {
        $r->print(' checked="on"');         $r->print(' checked="checked"');
     }      }
     $r->print(' />'.&mt('Sort by realm first, then student (group/section)'));      $r->print(' />'.&mt('Sort by realm first, then student (group/section)'));
     $r->print('</label><br /><label><input type="radio" name="sortorder" value="studentrealm"');      $r->print('</label><br /><label><input type="radio" name="sortorder" value="studentrealm"');
     if ($sortorder eq 'studentrealm') {      if ($sortorder eq 'studentrealm') {
        $r->print(' checked="on"');         $r->print(' checked="checked"');
     }      }
     $r->print(' />'.&mt('Sort by student (group/section) first, then realm').      $r->print(' />'.&mt('Sort by student (group/section) first, then realm').
       '</label>');        '</label>');
Line 1816  sub assessparms { Line 1816  sub assessparms {
     if (!$pssymb) {      if (!$pssymb) {
         $r->print('<table border="1"><tr><td>');          $r->print('<table border="1"><tr><td>');
         &levelmenu($r,\%alllevs,$parmlev);          &levelmenu($r,\%alllevs,$parmlev);
           $r->print('</td>');
  if ($parmlev ne 'general') {   if ($parmlev ne 'general') {
             $r->print('<td>');              $r->print('<td>');
     &mapmenu($r,\%allmaps,$pschp,\%maptitles);      &mapmenu($r,\%allmaps,$pschp,\%maptitles);
     $r->print('</td>');      $r->print('</td>');
  }   }
         $r->print('</td></tr></table>');          $r->print('</tr></table>');
  &displaymenu($r,\%allparms,\%allparts,\@pscat,\@psprt,\%keyorder);   &displaymenu($r,\%allparms,\%allparts,\@pscat,\@psprt,\%keyorder);
     } else {      } else {
         my ($map,$id,$resource)=&Apache::lonnet::decode_symb($pssymb);          my ($map,$id,$resource)=&Apache::lonnet::decode_symb($pssymb);
Line 2112  ENDTABLEHEADFOUR Line 2113  ENDTABLEHEADFOUR
                              ,'<font color="red"><i>'.$coursename.'</i></font>'                               ,'<font color="red"><i>'.$coursename.'</i></font>'
                              )                               )
                          ."<br /></h4>\n"                           ."<br /></h4>\n"
                          );                  );
 #---------------------------------------------------------------- print table  #---------------------------------------------------------------- print table
                 $r->print('<p>'.&Apache::loncommon::start_data_table()                  $r->print('<p>'.&Apache::loncommon::start_data_table()
                          .&Apache::loncommon::start_data_table_header_row()                           .&Apache::loncommon::start_data_table_header_row()
Line 2128  ENDTABLEHEADFOUR Line 2129  ENDTABLEHEADFOUR
                            \%type,\%display,$defbgone,$defbgtwo,$defbgthree,                             \%type,\%display,$defbgone,$defbgtwo,$defbgthree,
                            $parmlev,$uname,$udom,$csec,$cgroup);                             $parmlev,$uname,$udom,$csec,$cgroup);
                 }                  }
                 $r->print(&Apache::loncommon::end_data_table().'</p>');                  $r->print(&Apache::loncommon::end_data_table().'</p>'
                            .'</div>'
                   );
             } # end each map              } # end each map
         } # end of $parmlev eq map          } # end of $parmlev eq map
 #--------------------------------- Entry for parm level general (Course level)  #--------------------------------- Entry for parm level general (Course level)
Line 2460  sub crsenv { Line 2463  sub crsenv {
              'student_classlist_view' => '<b>'.&mt('Allow students to view classlist.').'</b><br />'               'student_classlist_view' => '<b>'.&mt('Allow students to view classlist.').'</b><br />'
                                         .'('.&mt('[_1]: students can view all sections. [_2]: students can only view their own section. blank or [_3] prevents student view.','"<tt>all</tt>"','"<tt>section</tt>"','"<tt>disabled</tt>"').')',                                          .'('.&mt('[_1]: students can view all sections. [_2]: students can only view their own section. blank or [_3] prevents student view.','"<tt>all</tt>"','"<tt>section</tt>"','"<tt>disabled</tt>"').')',
              'student_classlist_portfiles' => '<b>'.&mt('Include link to accessible portfolio files').'</b><br />'               'student_classlist_portfiles' => '<b>'.&mt('Include link to accessible portfolio files').'</b><br />'
                                              .'('.&mt('[_1] for link to each a listing of each student\'s files.','"<tt>yes</tt>"').')',                                               .'('.&mt("[_1] for link to each a listing of each student's files.",'"<tt>yes</tt>"').')',
              'student_classlist_opt_in' => '<b>'.&mt("Student's agreement needed for listing in student-viewable roster").'</b><br />'               'student_classlist_opt_in' => '<b>'.&mt("Student's agreement needed for listing in student-viewable roster").'</b><br />'
                                            .'('.&mt('[_1] to require students to opt-in to listing in the roster (on the roster page).','"<tt>yes</tt>"').')',                                             .'('.&mt('[_1] to require students to opt-in to listing in the roster (on the roster page).','"<tt>yes</tt>"').')',
              'plc.roles.denied'=> '<b>'.&mt('Disallow live chatroom use for Roles').'</b><br />'               'plc.roles.denied'=> '<b>'.&mt('Disallow live chatroom use for Roles').'</b><br />'
Line 2547  sub crsenv { Line 2550  sub crsenv {
   
      'texengine'       'texengine'
          => '<b>'.&mt('Force all students in the course to use a specific math rendering engine.').'</b><br />'           => '<b>'.&mt('Force all students in the course to use a specific math rendering engine.').'</b><br />'
                    .'('.&mt('[_1], [_2] (Convert to Images), [_3] (TeX to HTML), or blank for student\'s preference','"<tt>jsMath</tt>"','"<tt>mimetex</tt>"','"<tt>tth</tt>"').')',                     .'('.&mt("[_1], [_2] (Convert to Images), [_3] (TeX to HTML), or blank for student's preference",'"<tt>jsMath</tt>"','"<tt>mimetex</tt>"','"<tt>tth</tt>"').')',
              'timezone'               'timezone'
                  => '<b>'.&mt('Timezone in which the course takes place').'</b>',                   => '<b>'.&mt('Timezone in which the course takes place').'</b>',
   
Line 3103  sub listdata { Line 3106  sub listdata {
     }      }
     if ($part ne $oldpart) {      if ($part ne $oldpart) {
  $r->print(&tableend().   $r->print(&tableend().
   "\n<span class=\"LC_parm_part\">".&mt('Part').": $part</span>");    "\n".'<span class="LC_parm_part">'.&mt('Part').": $part</span>");
  $oldpart=$part;   $oldpart=$part;
     }      }
 #  #
Line 3138  sub listdata { Line 3141  sub listdata {
  $r->print(&default_selector($thiskey,$$resourcedata{$thiskey}));   $r->print(&default_selector($thiskey,$$resourcedata{$thiskey}));
     }      }
     $r->print('<input type="hidden" name="typeof_'.$thiskey.'" value="'.      $r->print('<input type="hidden" name="typeof_'.$thiskey.'" value="'.
       $thistype.'">');        $thistype.'" />');
     $r->print('</td>'.&Apache::loncommon::end_data_table_row());      $r->print('</td>'.&Apache::loncommon::end_data_table_row());
  }   }
     }      }
Line 3882  sub output_row { Line 3885  sub output_row {
         my $multiple_checked;          my $multiple_checked;
         my $single_checked;          my $single_checked;
         if ($options =~ m/onlyone/) {          if ($options =~ m/onlyone/) {
             $multiple_checked = "";              $multiple_checked = '';
             $single_checked = " CHECKED ";              $single_checked = ' checked="checked"';
         } else {          } else {
             $multiple_checked = " CHECKED ";              $multiple_checked = ' checked="checked"';
             $single_checked = "";              $single_checked = '';
         }          }
  $output .= &Apache::loncommon::continue_data_table_row();   $output .= &Apache::loncommon::continue_data_table_row();
  $output .= '<td>'.('&nbsp;' x 10).'<span class="LC_metadata">   $output .= '<td>'.('&nbsp;' x 10).'<span class="LC_metadata">
             <input type="radio" name="'.$field_name.'_onlyone" value="multiple" '.$multiple_checked .'/>              <input type="radio" name="'.$field_name.'_onlyone" value="multiple"'.$multiple_checked .' />
             '.&mt('Student may select multiple choices from list').'</span></td>';              '.&mt('Student may select multiple choices from list').'</span></td>';
  $output .= &Apache::loncommon::end_data_table_row();   $output .= &Apache::loncommon::end_data_table_row();
  $output .= &Apache::loncommon::continue_data_table_row();   $output .= &Apache::loncommon::continue_data_table_row();
  $output .= '<td>'.('&nbsp;' x 10).'<span class="LC_metadata">   $output .= '<td>'.('&nbsp;' x 10).'<span class="LC_metadata">
             <input type="radio" name="'.$field_name.'_onlyone"  value="single" '.$single_checked.'/>              <input type="radio" name="'.$field_name.'_onlyone"  value="single"'.$single_checked.' />
             '.&mt('Student may select only one choice from list').'</span></td>';              '.&mt('Student may select only one choice from list').'</span></td>';
  $output .= &Apache::loncommon::end_data_table_row();   $output .= &Apache::loncommon::end_data_table_row();
     }      }

Removed from v.1.419  
changed lines
  Added in v.1.424


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