Diff for /loncom/interface/lonparmset.pm between versions 1.397 and 1.401

version 1.397, 2008/05/29 01:40:12 version 1.401, 2008/06/20 17:38:51
Line 1010  sub extractResourceInformation { Line 1010  sub extractResourceInformation {
     $$mapp{$mapid}=$$mapp{$id};      $$mapp{$mapid}=$$mapp{$id};
     $$allmaps{$mapid}=$$mapp{$id};      $$allmaps{$mapid}=$$mapp{$id};
     if ($mapid eq '1') {      if ($mapid eq '1') {
  $$maptitles{$mapid}='Main Course Documents';   $$maptitles{$mapid}=&mt('Main Course Documents');
     } else {      } else {
  $$maptitles{$mapid}=   $$maptitles{$mapid}=
     &Apache::lonnet::gettitle($$mapp{$id});          &Apache::lonnet::gettitle($$mapp{$id});    
Line 1137  sub partmenu { Line 1137  sub partmenu {
     my ($r,$allparts,$psprt)=@_;      my ($r,$allparts,$psprt)=@_;
     $r->print('<select multiple name="psprt" size="8">');      $r->print('<select multiple name="psprt" size="8">');
     $r->print('<option value="all"');      $r->print('<option value="all"');
     $r->print(' selected') unless (@{$psprt});      $r->print(' selected="selected"') unless (@{$psprt});
     $r->print('>'.&mt('All Parts').'</option>');      $r->print('>'.&mt('All Parts').'</option>');
     my %temphash=();      my %temphash=();
     foreach (@{$psprt}) { $temphash{$_}=1; }      foreach (@{$psprt}) { $temphash{$_}=1; }
Line 1147  sub partmenu { Line 1147  sub partmenu {
  unless ($tempkey =~ /\./) {   unless ($tempkey =~ /\./) {
     $r->print('<option value="'.$tempkey.'"');      $r->print('<option value="'.$tempkey.'"');
     if ($$psprt[0] eq "all" ||  $temphash{$tempkey}) {      if ($$psprt[0] eq "all" ||  $temphash{$tempkey}) {
  $r->print(' selected');   $r->print(' selected="selected"');
     }      }
     $r->print('>'.$$allparts{$tempkey}.'</option>');      $r->print('>'.$$allparts{$tempkey}.'</option>');
  }   }
Line 1268  sub mapmenu { Line 1268  sub mapmenu {
     $r->print('<option value="all">'.&mt('All Maps or Folders').'</option>');      $r->print('<option value="all">'.&mt('All Maps or Folders').'</option>');
     foreach (sort {$$allmaps{$a} cmp $$allmaps{$b}} keys %{$allmaps}) {      foreach (sort {$$allmaps{$a} cmp $$allmaps{$b}} keys %{$allmaps}) {
  $r->print('<option value="'.$_.'"');   $r->print('<option value="'.$_.'"');
  if (($pschp eq $_)) { $r->print(' selected'); }   if (($pschp eq $_)) { $r->print(' selected="selected"'); }
  $r->print('>'.$$maptitles{$_}.($$allmaps{$_}!~/^uploaded/?' ['.$$allmaps{$_}.']':'').'</option>');   $r->print('>'.$$maptitles{$_}.($$allmaps{$_}!~/^uploaded/?' ['.$$allmaps{$_}.']':'').'</option>');
     }      }
     $r->print("</select>");      $r->print("</select>");
Line 1282  sub levelmenu { Line 1282  sub levelmenu {
     foreach (reverse sort keys %{$alllevs}) {      foreach (reverse sort keys %{$alllevs}) {
  $r->print('<option value="'.$$alllevs{$_}.'"');   $r->print('<option value="'.$$alllevs{$_}.'"');
  if ($parmlev eq $$alllevs{$_}) {   if ($parmlev eq $$alllevs{$_}) {
     $r->print(' selected');       $r->print(' selected="selected"'); 
  }   }
  $r->print('>'.$_.'</option>');   $r->print('>'.&mt($_).'</option>');
     }      }
     $r->print("</select>");      $r->print("</select>");
 }  }
Line 1300  sub sectionmenu { Line 1300  sub sectionmenu {
  $r->print('    <option value="'.$s.'"');   $r->print('    <option value="'.$s.'"');
  foreach (@{$selectedsections}) {   foreach (@{$selectedsections}) {
     if ($s eq $_) {      if ($s eq $_) {
  $r->print(' selected');   $r->print(' selected="selected"');
  last;   last;
     }      }
  }   }
Line 1319  sub groupmenu { Line 1319  sub groupmenu {
  $r->print('    <option value="'.$group.'"');   $r->print('    <option value="'.$group.'"');
  foreach (@{$selectedgroups}) {   foreach (@{$selectedgroups}) {
     if ($group eq $_) {      if ($group eq $_) {
  $r->print(' selected');   $r->print(' selected="selected"');
  last;   last;
     }      }
  }   }
Line 1881  ENDTABLEHEADFOUR Line 1881  ENDTABLEHEADFOUR
 #---------------------------------------------------- print header information  #---------------------------------------------------- print header information
                 my $foldermap=&mt($maptitle=~/^uploaded/?'Folder':'Map');                  my $foldermap=&mt($maptitle=~/^uploaded/?'Folder':'Map');
                 my $showtitle=$maptitles{$maptitle}.($maptitle!~/^uploaded/?' ['.$maptitle.']':'');                  my $showtitle=$maptitles{$maptitle}.($maptitle!~/^uploaded/?' ['.$maptitle.']':'');
                 $r->print(<<ENDMAPONE);                  my $tmp="";
 <center><h4>  
 Set Defaults for All Resources in $foldermap<br />  
 <font color="red"><i>$showtitle</i></font><br />  
 Specifically for  
 ENDMAPONE  
                 if ($uname) {                  if ($uname) {
     my $person=&Apache::loncommon::plainname($uname,$udom);      my $person=&Apache::loncommon::plainname($uname,$udom);
                     $r->print(&mt("User")." <font color=\"red\"><i>$uname \($person\) </i></font> ".                      $tmp.=&mt("User")." <font color=\"red\"><i>$uname \($person\) </i></font> ".
                         &mt('in')." \n");                          &mt('in')." \n";
                 } else {                  } else {
                     $r->print("<font color=\"red\"><i>".&mt('all').'</i></font> '.&mt('users in')." \n");                      $tmp.="<font color=\"red\"><i>".&mt('all').'</i></font> '.&mt('users in')." \n";
                 }                  }
                 if ($cgroup) {                  if ($cgroup) {
                     $r->print(&mt("Group")." <font color=\"red\"><i>$cgroup".                      $tmp.=&mt("Group")." <font color=\"red\"><i>$cgroup".
                               "</i></font> ".&mt('of')." \n");                                "</i></font> ".&mt('of')." \n";
                     $csec = '';                      $csec = '';
                 } elsif ($csec) {                  } elsif ($csec) {
                     $r->print(&mt("Section")." <font color=\"red\"><i>$csec".                      $tmp.=&mt("Section")." <font color=\"red\"><i>$csec".
                               "</i></font> ".&mt('of')." \n");                                "</i></font> ".&mt('of')." \n";
                 }                  }
                 $r->print("<font color=\"red\"><i>$coursename</i></font><br />");                  $r->print('<div align="center"><h4>'
                 $r->print("</h4>\n");                           .&mt('Set Defaults for All Resources in [_1]Specifically for [_2][_3]'
                                ,$foldermap.'<br /><font color="red"><i>$showtitle</i></font><br />'
                                ,$tmp
                                ,'<font color="red"><i>'.$coursename.'</i></font>'
                                )
                            ."<br /></h4>\n"
                            );
 #---------------------------------------------------------------- print table  #---------------------------------------------------------------- print table
                 $r->print('<p><table border="2">');                  $r->print('<p><table border="2">');
                 $r->print('<tr><th>'.&mt('Parameter Name').'</th>');                  $r->print('<tr><th>'.&mt('Parameter Name').'</th>');
Line 1916  ENDMAPONE Line 1917  ENDMAPONE
                            \%type,\%display,$defbgone,$defbgtwo,$defbgthree,                             \%type,\%display,$defbgone,$defbgtwo,$defbgthree,
                            $parmlev,$uname,$udom,$csec,$cgroup);                             $parmlev,$uname,$udom,$csec,$cgroup);
                 }                  }
                 $r->print("</table></center>");                  $r->print("</table></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 2340  sub crsenv { Line 2341  sub crsenv {
          => '<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>',
   
                'suppress_embed_prompt'
                    => '<b>'.&mt('Suppress prompt to upload items referenced in a web page being uploaded to portfolio, when current role is student.').'</b><br />'.
                       ' ('.&mt('[_1] to suppress, anything else to not suppress','"<tt>yes</tt>"').')',  
              );                ); 
         my @Display_Order = ('url','description','courseid','cloners','grading',          my @Display_Order = ('url','description','courseid','cloners','grading',
                              'externalsyllabus',                               'externalsyllabus',
Line 2361  sub crsenv { Line 2365  sub crsenv {
                              'receiptalg',                               'receiptalg',
                              'problem_stream_switch',                               'problem_stream_switch',
      'suppress_tries',       'suppress_tries',
                                'suppress_embed_prompt',
                              'default_paper_size',                               'default_paper_size',
      'print_header_format',       'print_header_format',
                              'disable_receipt_display',                               'disable_receipt_display',
Line 2400  sub crsenv { Line 2405  sub crsenv {
                                                         $values{$parameter},                                                          $values{$parameter},
                                                         $onchange).                                                          $onchange).
                                                         '</td>';                                                          '</td>';
               } elsif ($parameter eq 'timezone') {
                   my $includeempty = 1;
                   my $timezone = &Apache::lonlocal::gettimezone();
                   $output .= '<td>'.
                       &Apache::loncommon::select_timezone($parameter.'_value',
                                                           $timezone,
                                                           $onchange,$includeempty).'</td>';
             } else {              } else {
                 $output .= '<td>'.                  $output .= '<td>'.
                     &Apache::lonhtmlcommon::textbox($parameter.'_value',                      &Apache::lonhtmlcommon::textbox($parameter.'_value',

Removed from v.1.397  
changed lines
  Added in v.1.401


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