Diff for /loncom/interface/lonparmset.pm between versions 1.494 and 1.499

version 1.494, 2010/02/21 01:10:49 version 1.499, 2010/07/01 00:08:28
Line 1685  sub displaymenu { Line 1685  sub displaymenu {
 }  }
   
 sub mapmenu {  sub mapmenu {
     my ($r,$allmaps,$pschp,$maptitles, $symbp)=@_;      my ($r,$allmaps,$pschp,$maptitles,$symbp)=@_;
     my %allmaps_inverted = reverse %$allmaps;      my %allmaps_inverted = reverse %$allmaps;
     my $navmap = Apache::lonnavmaps::navmap->new();      my $navmap = Apache::lonnavmaps::navmap->new();
     my $tree=[];      my $tree=[];
     my $treeinfo={};      my $treeinfo={};
     if (defined($navmap)) {      if (defined($navmap)) {
         my $it=$navmap->getIterator(undef,undef,undef,1,undef,undef);          my $it=$navmap->getIterator(undef,undef,undef,1,1,undef);
         my $curRes;          my $curRes;
         my $depth = 0;          my $depth = 0;
         my %parent = ();          my %parent = ();
Line 1736  sub mapmenu { Line 1736  sub mapmenu {
     $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Enclosing Map or Folder'),'','',' id="mapmenu"'));      $r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Enclosing Map or Folder'),'','',' id="mapmenu"'));
     if ((ref($tree) eq 'ARRAY') && (ref($treeinfo) eq 'HASH')) {      if ((ref($tree) eq 'ARRAY') && (ref($treeinfo) eq 'HASH')) {
         my $icon = '<img src="/adm/lonIcons/navmap.folder.open.gif" alt="" />';          my $icon = '<img src="/adm/lonIcons/navmap.folder.open.gif" alt="" />';
         $r->print(&Apache::loncommon::start_data_table()          my $whitespace =
                  .&Apache::loncommon::start_data_table_row()              '<img src="'
                  .'<td>'.$icon             .&Apache::loncommon::lonhttpdurl('/adm/lonIcons/whitespace_21.gif')
                  .'<label>&nbsp;'             .'" alt="" />';
                  .'<input type="radio" name="pschp" checked="checked" value="all" />'  
                  .&mt('All Maps or Folders')          # Info about selectable folders/maps
                  .'</label></td>'          $r->print(
                  .&Apache::loncommon::end_data_table_row()              '<div class="LC_info">'
              .&mt('You can only select those maps and folders which can be currently parameterized.')
            # .' '.&Apache::loncommon::help_open_topic('...') # Later: Add further help
              .'</div>'
           );
   
   
           $r->print(&Apache::loncommon::start_data_table());
   
           # Display row: "All Maps or Folders"
           $r->print(
               &Apache::loncommon::start_data_table_row()
              .'<td>'
              .'<label>'
              .'<input type="radio" name="pschp"'
           );
           $r->print(' checked="checked"') if ($pschp eq 'all' || !$pschp);
           $r->print(
               ' value="all" />&nbsp;'.$icon.'&nbsp;'
              .&mt('All Maps or Folders')
              .'</label>'
              .'<hr /></td>'
              .&Apache::loncommon::end_data_table_row()
         );          );
         my $whitespace = '<img src="'  
                         .&Apache::loncommon::lonhttpdurl("/adm/lonIcons/whitespace_21.gif")          # Display row: "Main Course Documents"
                         .'" alt="" />';  
         if (exists($$allmaps{1})) {          if (exists($$allmaps{1})) {
             $r->print(&Apache::loncommon::start_data_table_row()              $r->print(
                 .'<td>'.$icon                  &Apache::loncommon::start_data_table_row()
                 .'<label>&nbsp;'                 .'<td>'
                 .'<input type="radio" name="pschp" value="1"'                 .'<label>'
                  .'<input type="radio" name="pschp" value="1"'
             );              );
             if ($pschp eq 1) {              $r->print(' checked="checked"') if ($pschp eq '1');
                 $r->print(' checked="checked"');              $r->print(
             }                  '/>&nbsp;'.$icon.'&nbsp;'
             $r->print('/>'                 .$$maptitles{1}
                 .$$maptitles{1}                 .($$allmaps{1} !~/^uploaded/?' ['.$$allmaps{1}.']':'')
                 .($$allmaps{1} !~/^uploaded/?' ['.$$allmaps{1}.']':'')                 .'</label>'
                 .'</label>'                 .'</td>'
                 .'</td>'                 .&Apache::loncommon::end_data_table_row()
                 .&Apache::loncommon::end_data_table_row()  
             );              );
         }          }
   
           # Display rows for all course maps and folders
         foreach my $id (@{$tree}) {          foreach my $id (@{$tree}) {
             my ($mapid,$resid)=split(/\./,$id);              my ($mapid,$resid)=split(/\./,$id);
             # Indentation              # Indentation
Line 1780  sub mapmenu { Line 1803  sub mapmenu {
             my $symb_name = $$symbp{$id};              my $symb_name = $$symbp{$id};
             my ($front, $tail) = split (/___${resid}___/, $symb_name);              my ($front, $tail) = split (/___${resid}___/, $symb_name);
             $symb_name = $tail;              $symb_name = $tail;
             $r->print(&Apache::loncommon::start_data_table_row()              $r->print(
                      .'<td>'.$indent.$icon                  &Apache::loncommon::start_data_table_row()
                      .'<label>&nbsp;'                 .'<td>'
                      .'<input type ="radio" name="pschp" value="'.$allmaps_inverted{$symb_name}.'"'                 .'<label>'
             );              );
             if ($pschp eq $allmaps_inverted{$symb_name}) {              # Only offer radio button for folders/maps which can be parameterized
                 $r->print(' checked="checked"');              if ($allmaps_inverted{$symb_name}) {
                   $r->print(
                       '<input type ="radio" name="pschp"'
                      .' value="'.$allmaps_inverted{$symb_name}.'"'
                   );
                   $r->print(' checked="checked"') if ($allmaps_inverted{$symb_name} eq $pschp);
                   $r->print('/>');
               } else {
                   $r->print($whitespace);
             }              }
             $r->print('/>'              $r->print(
                      .$treeinfo->{$id}->{name}                  $indent.$icon.'&nbsp;'
                      .($$allmaps{$mapid}!~/^uploaded/?' ['.$$allmaps{$mapid}.']':'')                 .$treeinfo->{$id}->{name}
                      .'</label>'                 .($$allmaps{$mapid}!~/^uploaded/?' ['.$$allmaps{$mapid}.']':'')
                      .'</td>'                 .'</label>'
                      .&Apache::loncommon::end_data_table_row()                 .'</td>'
                  .&Apache::loncommon::end_data_table_row()
             );              );
         }          }
   
         $r->print(&Apache::loncommon::end_data_table());          $r->print(&Apache::loncommon::end_data_table());
     }      }
 }  }
Line 2989  sub date_interval_selector { Line 3022  sub date_interval_selector {
     my %select = ((map {$_ => $_} (0..$max)),      my %select = ((map {$_ => $_} (0..$max)),
               'select_form_order' => [0..$max]);                'select_form_order' => [0..$max]);
     $result .= &Apache::loncommon::select_form($amount,$name.'_'.$thiskey,      $result .= &Apache::loncommon::select_form($amount,$name.'_'.$thiskey,
                            %select);                             \%select);
     $result .= ' '.&mt($name);      $result .= ' '.&mt($name);
     }      }
     $result .= '<input type="hidden" name="dateinterval_'.$thiskey.'" />';      $result .= '<input type="hidden" name="dateinterval_'.$thiskey.'" />';
Line 3505  ENDMAINFORMHEAD Line 3538  ENDMAINFORMHEAD
             linktitle => "Restrict metadata for this $lc_crstype." ,              linktitle => "Restrict metadata for this $lc_crstype." ,
             icon =>'contact-new.png'   ,              icon =>'contact-new.png'   ,
             },              },
           { linktext => "Manage $crstype Slots",  
             url => '/adm/slotrequest?command=showslots',  
             permission => $vgr,  
             linktitle => "Manage slots for this $lc_crstype."  ,  
             icon => 'rsrv.png'  ,  
             },  
           { linktext => 'Reset Student Access Times',            { linktext => 'Reset Student Access Times',
             url => '/adm/helper/resettimes.helper',              url => '/adm/helper/resettimes.helper',
             permission => $mgr,              permission => $mgr,

Removed from v.1.494  
changed lines
  Added in v.1.499


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