version 1.315, 2008/11/17 14:46:10
|
version 1.318, 2008/12/10 21:46:58
|
Line 27
|
Line 27
|
# |
# |
|
|
|
|
=head1 NAME |
|
|
|
Apache::londocs |
|
|
|
=head1 SYNOPSIS |
|
|
|
This is part of the LearningOnline Network with CAPA project |
|
described at http://www.lon-capa.org. |
|
|
|
=head1 SUBROUTINES |
|
|
|
=over |
|
|
|
=cut |
|
|
|
package Apache::londocs; |
package Apache::londocs; |
|
|
Line 70 my %alreadyseen=();
|
Line 56 my %alreadyseen=();
|
my $hadchanges; |
my $hadchanges; |
|
|
|
|
=pod |
|
|
|
=item %help=() |
|
|
|
Available help topics |
|
|
|
=cut |
|
|
|
my %help=(); |
my %help=(); |
|
|
=pod |
|
|
|
=item mapread() |
|
|
|
Mapread read maps into LONCAPA::map:: global arrays |
|
@order and @resources, determines status |
|
sets @order - pointer to resources in right order |
|
sets @resources - array with the resources with correct idx |
|
|
|
=cut |
|
|
|
sub mapread { |
sub mapread { |
my ($coursenum,$coursedom,$map)=@_; |
my ($coursenum,$coursedom,$map)=@_; |
Line 110 sub storemap {
|
Line 79 sub storemap {
|
} |
} |
|
|
|
|
=pod |
|
|
|
=item authorhosts() |
|
|
|
Return hash with valid author names |
|
|
|
=cut |
|
|
|
sub authorhosts { |
sub authorhosts { |
my %outhash=(); |
my %outhash=(); |
Line 151 sub authorhosts {
|
Line 113 sub authorhosts {
|
} |
} |
return ($home,$other,%outhash); |
return ($home,$other,%outhash); |
} |
} |
=pod |
|
|
|
=item dumpbutton() |
|
|
|
Generate "dump" button |
|
|
|
=cut |
|
|
|
sub dumpbutton { |
sub dumpbutton { |
my ($home,$other,%outhash)=&authorhosts(); |
my ($home,$other,%outhash)=&authorhosts(); |
Line 183 sub clean {
|
Line 139 sub clean {
|
return $title; |
return $title; |
} |
} |
|
|
=pod |
|
|
|
=item dumpcourse() |
|
|
|
Actually dump course |
|
|
|
=cut |
|
|
|
sub dumpcourse { |
sub dumpcourse { |
my ($r) = @_; |
my ($r) = @_; |
Line 311 sub dumpcourse {
|
Line 261 sub dumpcourse {
|
} |
} |
} |
} |
|
|
=pod |
|
|
|
=item exportbutton() |
|
|
|
Generate "export" button |
|
|
|
=cut |
|
|
|
sub exportbutton { |
sub exportbutton { |
my $type = &Apache::loncommon::course_type(); |
my $type = &Apache::loncommon::course_type(); |
Line 327 sub exportbutton {
|
Line 271 sub exportbutton {
|
&Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'</div>'; |
&Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'</div>'; |
} |
} |
|
|
=pod |
|
|
|
=item exportcourse() |
|
|
|
=cut |
|
|
|
sub exportcourse { |
sub exportcourse { |
my $r=shift; |
my $r=shift; |
Line 971 sub store_template {
|
Line 911 sub store_template {
|
} |
} |
} |
} |
|
|
=pod |
|
|
|
=item group_import() |
|
|
|
Imports the given (name, url) resources into the course |
|
coursenum, coursedom, and folder must precede the list |
|
|
|
=cut |
|
|
|
sub group_import { |
sub group_import { |
my ($coursenum, $coursedom, $folder, $container, $caller, @files) = @_; |
my ($coursenum, $coursedom, $folder, $container, $caller, @files) = @_; |
Line 1140 sub log_docs {
|
Line 1072 sub log_docs {
|
} |
} |
} |
} |
|
|
=pod |
|
|
|
=item docs_change_log() |
|
|
|
=cut |
|
|
|
sub docs_change_log { |
sub docs_change_log { |
my ($r)=@_; |
my ($r)=@_; |
Line 2066 sub untiehash {
|
Line 1996 sub untiehash {
|
} |
} |
|
|
|
|
=pod |
|
|
|
=item checkonthis() |
|
|
|
check on this |
|
|
|
=cut |
|
|
|
|
|
sub checkonthis { |
sub checkonthis { |
Line 2171 sub list_symbs {
|
Line 2094 sub list_symbs {
|
} |
} |
|
|
|
|
=pod |
|
|
|
=item verifycontent() |
|
|
|
Verify Content |
|
|
|
=cut |
|
|
|
sub verifycontent { |
sub verifycontent { |
my ($r) = @_; |
my ($r) = @_; |
Line 2208 sub verifycontent {
|
Line 2124 sub verifycontent {
|
&mt('Return to DOCS').'</a>'); |
&mt('Return to DOCS').'</a>'); |
} |
} |
|
|
=pod |
|
|
|
=item devalidateversioncache() & checkversions() |
|
|
|
Check Versions |
|
|
|
=cut |
|
|
|
sub devalidateversioncache { |
sub devalidateversioncache { |
my $src=shift; |
my $src=shift; |
Line 2518 sub changewarning {
|
Line 2427 sub changewarning {
|
$help{'Caching'}.'</span></h3></form>'."\n\n"); |
$help{'Caching'}.'</span></h3></form>'."\n\n"); |
} |
} |
|
|
=pod |
|
|
|
=item init_breadcrumbs() |
|
|
|
Breadcrumbs for special functions |
|
|
|
=cut |
|
|
|
sub init_breadcrumbs { |
sub init_breadcrumbs { |
my ($form,$text)=@_; |
my ($form,$text)=@_; |
Line 2541 sub init_breadcrumbs {
|
Line 2443 sub init_breadcrumbs {
|
} |
} |
|
|
|
|
=pod |
|
|
|
=item handler() |
|
|
|
Main Handler |
|
|
|
=cut |
|
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
Line 2682 sub handler {
|
Line 2578 sub handler {
|
} |
} |
# -------------------------------------------------------------------- Body tag |
# -------------------------------------------------------------------- Body tag |
$script = '<script type="text/javascript">'."\n".$script."\n".'</script>'; |
$script = '<script type="text/javascript">'."\n".$script."\n".'</script>'; |
|
my @brcrum = [{href=>"/adm/createuser",text=>"$type Documents"}]; |
$r->print(&Apache::loncommon::start_page("$type Documents", $script, |
$r->print(&Apache::loncommon::start_page("$type Documents", $script, |
{'force_register' => $showdoc,}). |
{'force_register' => $showdoc, bread_crumbs => @brcrum}). |
&Apache::loncommon::help_open_menu('','',273,'RAT')); |
&Apache::loncommon::help_open_menu('','',273,'RAT')); |
|
|
my %allfiles = (); |
my %allfiles = (); |
Line 3454 ENDNEWSCRIPT
|
Line 3351 ENDNEWSCRIPT
|
1; |
1; |
__END__ |
__END__ |
|
|
=pod |
|
|
=head1 NAME |
|
|
|
Apache::londocs.pm |
|
|
|
=head1 SYNOPSIS |
|
|
|
This is part of the LearningOnline Network with CAPA project |
|
described at http://www.lon-capa.org. |
|
|
|
=head1 SUBROUTINES |
|
|
|
=over |
|
|
|
=item %help=() |
|
|
|
Available help topics |
|
|
|
=item mapread() |
|
|
|
Mapread read maps into LONCAPA::map:: global arrays |
|
@order and @resources, determines status |
|
sets @order - pointer to resources in right order |
|
sets @resources - array with the resources with correct idx |
|
|
|
=item authorhosts() |
|
|
|
Return hash with valid author names |
|
|
|
=item dumpbutton() |
|
|
|
Generate "dump" button |
|
|
|
=item clean() |
|
|
|
=item dumpcourse() |
|
|
|
Actually dump course |
|
|
|
|
|
=item exportbutton() |
|
|
|
Generate "export" button |
|
|
|
=item exportcourse() |
|
|
|
=item create_ims_store() |
|
|
|
=item build_package() |
|
|
|
=item get_dependencies() |
|
|
|
=item process_content() |
|
|
|
=item replicate_content() |
|
|
|
=item extract_media() |
|
|
|
=item store_template() |
|
|
|
=item group_import() |
|
|
|
Imports the given (name, url) resources into the course |
|
coursenum, coursedom, and folder must precede the list |
|
|
|
=item breadcrumbs() |
|
|
|
=item log_docs() |
|
|
|
=item docs_change_log() |
|
|
|
=item update_paste_buffer() |
|
|
|
=item print_paste_buffer() |
|
|
|
=item do_paste_from_buffer() |
|
|
|
=item update_parameter() |
|
|
|
=item handle_edit_cmd() |
|
|
|
=item editor() |
|
|
|
=item process_file_upload() |
|
|
|
=item process_secondary_uploads() |
|
|
|
=item is_supplemental_title() |
|
|
|
=item parse_supplemental_title() |
|
|
|
=item entryline() |
|
|
|
=item tiehash() |
|
|
|
=item untiehash() |
|
|
|
=item checkonthis() |
|
|
|
check on this |
|
|
|
=item verifycontent() |
|
|
|
Verify Content |
|
|
|
=item devalidateversioncache() & checkversions() |
|
|
|
Check Versions |
|
|
|
=item mark_hash_old() |
|
|
|
=item is_hash_old() |
|
|
|
=item changewarning() |
|
|
|
=item init_breadcrumbs() |
|
|
|
Breadcrumbs for special functions |
|
|
=back |
=back |
|
|