--- loncom/interface/londocs.pm 2009/04/07 20:48:40 1.363 +++ loncom/interface/londocs.pm 2009/04/15 12:44:24 1.364 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.363 2009/04/07 20:48:40 ehlerst Exp $ +# $Id: londocs.pm,v 1.364 2009/04/15 12:44:24 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -72,7 +72,7 @@ sub storemap { &LONCAPA::map::storemap('/uploaded/'.$coursedom.'/'.$coursenum.'/'. $map,1); if ($errtext) { return ($errtext,2); } - + $hadchanges=1; return ($errtext,0); } @@ -427,7 +427,7 @@ function checkAll(field) { field.checked = true } } - + function uncheckAll(field) { if (field.length > 0) { for (i = 0; i < field.length; i++) { @@ -442,7 +442,7 @@ function propagateCheck(item) { if (document.exportdoc.elements[item].checked == true) { containerCheck(item) } -} +} function containerCheck(item) { document.exportdoc.elements[item].checked = true @@ -465,7 +465,7 @@ function containerCheck(item) { for (var j=0; j @@ -859,7 +859,7 @@ sub extract_media { $repstatus = 'ok'; } } elsif ($caller eq 'uploaded') { - + $repstatus = &Apache::lonnet::getuploaded('GET',$embed_url,$cdom,$cnum,\$embed_content,$rtncode); } if ($repstatus eq 'ok') { @@ -924,7 +924,7 @@ sub group_import { if (($url =~ m{^/uploaded/\Q$coursedom\E/\Q$coursenum\E/(default_\d+\.)(page|sequence)$}) && ($caller eq 'londocs') && (!&Apache::lonnet::stat_file($url))) { - + my $errtext = ''; my $fatal = 0; my $newmapstr = ''."\n". @@ -1176,7 +1176,7 @@ sub docs_change_log { if ($oldname ne '' && $oldname ne $newname) { $r->print(&LONCAPA::map::qtescape($newname)); } - } + } $r->print('

'); - } + } if ($randompick>=0) { $r->print('

'.&mt('Caution: this folder is set to randomly pick a subset of resources. Adding or removing resources from this folder will change the set of resources that the students see, resulting in spurious or missing credit for completed problems, not limited to ones you modify. Do not modify the contents of this folder if it is in active student use.').'

'); } @@ -1715,7 +1715,7 @@ sub parse_supplemental_title { } if (wantarray) { return ($title,$foldertitle,$renametitle); - } + } return $title; } @@ -1736,7 +1736,7 @@ sub entryline { } my $orderidx=$LONCAPA::map::order[$index]; - + $renametitle=~s/\\/\\\\/g; $renametitle=~s/\"\;/\\\"/g; @@ -1811,7 +1811,7 @@ sub entryline { } my $copylink=' '; my $cutlink=' '; - + my $skip_confirm = 0; if ( $folder =~ /^supplemental/ || ($url =~ m{( /smppg$ @@ -1897,7 +1897,7 @@ END &Apache::lonnet::allowuploaded('/adm/coursedoc',$url); } } - + my $orig_url = $url; $orig_url=~s{http(:|:)//https(:|:)//}{https$2//}; my $external = ($url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/}); @@ -1932,7 +1932,7 @@ END } if ($container eq 'page') { my $symb=$env{'form.pagesymb'}; - + $url=&Apache::lonnet::clutter((&Apache::lonnet::decode_symb($symb))[2]); $url.=(($url=~/\?/)?'&':'?').'symb='.&escape($symb); } @@ -2045,7 +2045,7 @@ sub tiehash { $hashtied=1; } } - } + } } sub untiehash { @@ -2394,7 +2394,7 @@ ENDHEADERS $lastold=$prevvers; } } - # + # # Code to figure out how many version entries should go in # each of the four columns my $entries_per_col = 0; @@ -2619,7 +2619,7 @@ sub handler { if (($env{'form.folder'}=~/^(?:group|default)_/) || ($env{'form.folder'} =~ m:^\d+/(pages|sequences)/:)) { $forcestandard = 1; - } + } $forcesupplement=($env{'form.folder'}=~/^supplemental_/); if ($allowed) { @@ -2653,7 +2653,7 @@ sub handler { {'force_register' => $showdoc, 'bread_crumbs' => $brcrum}). &Apache::loncommon::help_open_menu('','',273,'RAT')); - + my %allfiles = (); my %codebase = (); my ($upload_result,$upload_output); @@ -2722,7 +2722,7 @@ sub handler { $attrib_regexp = $attribs{$item}[0]; } if ($content =~ m#($attrib_regexp\s*=\s*['"]?)\Q$origname{$item}\E(['"]?)#) { - } + } $content =~ s#($attrib_regexp\s*=\s*['"]?)\Q$origname{$item}\E(['"]?)#$1$newname{$item}$2#gi; } if (exists($codebase{$item})) { @@ -3100,7 +3100,7 @@ NFFORM NSYLFORM - + my $newgroupfileform=(< $uploadtag @@ -3260,7 +3260,7 @@ my $error = &editor($r,$coursenum,$cours $r->print('

'.$error.'

'); } $r->print(''); - } + } $r->print(''); if ($allowed) { $r->print(' @@ -3283,7 +3283,7 @@ $r->print(''); } $r->print(&Apache::loncommon::end_page()); return OK; -} +} sub generate_admin_options { my ($containertag,$uploadtag,$help_ref,$env_ref) = @_; @@ -3334,7 +3334,7 @@ sub generate_edit_table { } } $form .= ''; - + return $form; }