Diff for /loncom/interface/loncourserespicker.pm between versions 1.1 and 1.6

version 1.1, 2012/03/31 12:02:21 version 1.6, 2013/05/21 18:54:15
Line 50  window used to display the Course Conten Line 50  window used to display the Course Conten
 =head1 OVERVIEW  =head1 OVERVIEW
   
 The main subroutine: &create_picker() will display the hierarchy of folders,  The main subroutine: &create_picker() will display the hierarchy of folders,
 sub-folders, and resources in the Main Course Documents area.  Items can be  sub-folders, and resources in the Main Content area.  Items can be selected
 selected using checkboxes, and/or a "Check All" button.  Selection of a folder  using checkboxes, and/or a "Check All" button.  Selection of a folder
 causes the contents of the folder to also be selected automatically. The  causes the contents of the folder to also be selected automatically. The
 propagation of check status is recursive into sub-folders.  Likewise, if an  propagation of check status is recursive into sub-folders.  Likewise, if an
 item deep in a nested set of folders and sub-folders is unchecked, the   item deep in a nested set of folders and sub-folders is unchecked, the 
Line 148  use Apache::lonnet; Line 148  use Apache::lonnet;
 use Apache::loncommon;  use Apache::loncommon;
 use Apache::lonhtmlcommon;  use Apache::lonhtmlcommon;
 use Apache::lonnavmaps;  use Apache::lonnavmaps;
   use Apache::londocs;
 use Apache::lonlocal;  use Apache::lonlocal;
 use LONCAPA qw(:DEFAULT :match);  use LONCAPA qw(:DEFAULT :match);
   
Line 218  sub create_picker { Line 219  sub create_picker {
                 ' onclick="javascript:checkAll(document.'.$formname.'.discussion)" />'.                  ' onclick="javascript:checkAll(document.'.$formname.'.discussion)" />'.
                 '&nbsp;&nbsp;<input type="button" value="'.&mt('uncheck all').'"'.                  '&nbsp;&nbsp;<input type="button" value="'.&mt('uncheck all').'"'.
                 ' onclick="javascript:uncheckAll(document.'.$formname.'.discussion)" />'.                  ' onclick="javascript:uncheckAll(document.'.$formname.'.discussion)" />'.
                 '</fieldset></div>';                  '</fieldset>';
         }          }
           $display .= '</div>';      
     }      }
     my $curRes;  
     my $lastcontainer = $startcount;      my $lastcontainer = $startcount;
     $display .= &Apache::loncommon::start_data_table()      $display .= &Apache::loncommon::start_data_table()
                .&Apache::loncommon::start_data_table_header_row();                 .&Apache::loncommon::start_data_table_header_row();
Line 281  sub create_picker { Line 282  sub create_picker {
             }              }
             my $icon = 'src="'.$location.'/unknown.gif" alt=""';              my $icon = 'src="'.$location.'/unknown.gif" alt=""';
             if ($curRes->is_sequence()) {              if ($curRes->is_sequence()) {
                 $icon = 'src="'.$location.'/navmap.folder.open.gif" alt="'.&mt('"Folder').'"';                  $icon = 'src="'.$location.'/navmap.folder.open.gif" alt="'.&mt('Folder').'"';
             } elsif ($curRes->is_page()) {              } elsif ($curRes->is_page()) {
                 $icon = 'src="'.$location.'/navmap.page.open.gif" alt="'.&mt('Composite Page').'"';                  $icon = 'src="'.$location.'/navmap.page.open.gif" alt="'.&mt('Composite Page').'"';
             } elsif ($curRes->is_problem()) {              } elsif ($curRes->is_problem()) {
Line 340  sub create_picker { Line 341  sub create_picker {
     } elsif ($context eq 'examblock') {      } elsif ($context eq 'examblock') {
         $display .=          $display .=
             '<input type="submit" name="resourceblocks" value="'.              '<input type="submit" name="resourceblocks" value="'.
             &mt('Copy Choices to Main Window ').'" />';              &mt('Copy Choices to Main Window').'" />';
     }      }
     $display .= '</p></form>';      $display .= '</p></form>';
     my $numcount = $count + $boards + $startcount;      my $numcount = $count + $boards + $startcount;
Line 356  sub create_picker { Line 357  sub create_picker {
                  'add_entries' => { onload => 'javascript:recurseFolders();' },                    'add_entries' => { onload => 'javascript:recurseFolders();' }, 
                 };                  };
     }      }
     my $output = &Apache::loncommon::start_page($title,$scripttag,$args);      $output = &Apache::loncommon::start_page($title,$scripttag,$args);
     if ($context eq 'imsexport') {      if ($context eq 'imsexport') {
         $output .= &Apache::lonhtmlcommon::breadcrumbs('IMS Export');          $output .= &Apache::lonhtmlcommon::breadcrumbs('IMS Export').
                      &Apache::londocs::startContentScreen('tools');
     }      }
     $output .= $display;      $output .= $display;
     if ($context eq 'examblock') {      if ($context eq 'examblock') {
         $output .= &Apache::loncommon::end_page();          $output .= &Apache::loncommon::end_page();
       } elsif ($context eq 'imsexport') {
           $output .= &Apache::londocs::endContentScreen();
     }      }
     return $output;      return $output;
 }  }
Line 552  sub get_navmap_object { Line 556  sub get_navmap_object {
                 $outcome .= &mt('Return to Course Editor');                  $outcome .= &mt('Return to Course Editor');
             }              }
             $outcome .= '</a>';              $outcome .= '</a>';
             &logthis('IMS export failed - could not create navmap object in '.lc($crstype).':'.$env{'request.course.id'});              &Apache::lonnet::logthis('IMS export failed - could not create navmap object in '.lc($crstype).':'.$env{'request.course.id'});
         } elsif ($context eq 'examblock') {          } elsif ($context eq 'examblock') {
             $outcome .=  '<href="javascript:window.close();">'.&mt('Close window').'</a>';                       $outcome .=  '<href="javascript:window.close();">'.&mt('Close window').'</a>';         
         }          }

Removed from v.1.1  
changed lines
  Added in v.1.6


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