[LON-CAPA-cvs] cvs: loncom /interface londocs.pm
bisitz
bisitz@source.lon-capa.org
Wed, 15 Apr 2009 12:44:25 -0000
bisitz Wed Apr 15 12:44:25 2009 EDT
Modified files:
/loncom/interface londocs.pm
Log:
No content changes - removed annoying trailing blanks and tabs in script code
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.363 loncom/interface/londocs.pm:1.364
--- loncom/interface/londocs.pm:1.363 Tue Apr 7 20:48:40 2009
+++ loncom/interface/londocs.pm Wed Apr 15 12:44:24 2009
@@ -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 @@
&LONCAPA::map::storemap('/uploaded/'.$coursedom.'/'.$coursenum.'/'.
$map,1);
if ($errtext) { return ($errtext,2); }
-
+
$hadchanges=1;
return ($errtext,0);
}
@@ -427,7 +427,7 @@
field.checked = true
}
}
-
+
function uncheckAll(field) {
if (field.length > 0) {
for (i = 0; i < field.length; i++) {
@@ -442,7 +442,7 @@
if (document.exportdoc.elements[item].checked == true) {
containerCheck(item)
}
-}
+}
function containerCheck(item) {
document.exportdoc.elements[item].checked = true
@@ -465,7 +465,7 @@
for (var j=0; j<parents[item].length; j++) {
containerCheck(parents[item][j])
}
- }
+ }
}
</script>
@@ -859,7 +859,7 @@
$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 @@
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 = '<map>'."\n".
@@ -1176,7 +1176,7 @@
if ($oldname ne '' && $oldname ne $newname) {
$r->print(&LONCAPA::map::qtescape($newname));
}
- }
+ }
$r->print('<ul>');
for (my $idx=0;$idx<=$docslog{$id}{'logentry'}{'maxidx'};$idx++) {
if ($docslog{$id}{'logentry'}{'after_order_res_'.$idx}) {
@@ -1214,7 +1214,7 @@
my ($errtext,$fatal) = &mapread($coursenum,$coursedom,
$env{'form.copyfolder'});
-
+
return if ($fatal);
# Mark for copying
@@ -1402,7 +1402,7 @@
&remember_parms($idx,$which,'set',$value);
} else {
&LONCAPA::map::delparameter($idx,'parameter_'.$which);
-
+
&remember_parms($idx,$which,'del');
}
return 1;
@@ -1470,11 +1470,11 @@
$LONCAPA::map::order[0]=$idx;
$LONCAPA::map::resources[$idx]='';
}
-
+
my ($breadcrumbtrail,$randompick,$ishidden,$isencrypted,$plain,$is_random_order)=
&breadcrumbs($folder,$allowed,$type);
$r->print($breadcrumbtrail);
-
+
# ------------------------------------------------------------ Process commands
# ---------------- if they are for this folder and user allowed to make changes
@@ -1495,7 +1495,7 @@
($errtext,$fatal)=&storemap($coursenum,$coursedom,$folder.'.'.$container);
return $errtext if ($fatal);
}
-
+
if ($env{'form.pastemarked'}) {
my $paste_res =
&do_paste_from_buffer($coursenum,$coursedom,$folder);
@@ -1541,7 +1541,7 @@
return $errtext if ($fatal);
} else {
$r->print('<p><span class="LC_error">'.&mt('No map selected.').'</span></p>');
-
+
}
}
&log_differences($plain);
@@ -1556,7 +1556,7 @@
($ishidden?'<li>'.&mt('contents hidden').'</li>':'').
($isencrypted?'<li>'.&mt('URLs hidden').'</li>':'').
'</ul></p>');
- }
+ }
if ($randompick>=0) {
$r->print('<p>'.&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.').'</p>');
}
@@ -1715,7 +1715,7 @@
}
if (wantarray) {
return ($title,$foldertitle,$renametitle);
- }
+ }
return $title;
}
@@ -1736,7 +1736,7 @@
}
my $orderidx=$LONCAPA::map::order[$index];
-
+
$renametitle=~s/\\/\\\\/g;
$renametitle=~s/\"\;/\\\"/g;
@@ -1811,7 +1811,7 @@
}
my $copylink=' ';
my $cutlink=' ';
-
+
my $skip_confirm = 0;
if ( $folder =~ /^supplemental/
|| ($url =~ m{( /smppg$
@@ -1897,7 +1897,7 @@
&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 @@
}
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 @@
$hashtied=1;
}
}
- }
+ }
}
sub untiehash {
@@ -2394,7 +2394,7 @@
$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 @@
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 @@
{'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 @@
$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 @@
</span>
</form>
NSYLFORM
-
+
my $newgroupfileform=(<<NGFFORM);
<form action="/adm/coursedocs" method="post" name="newgroupfiles">
$uploadtag
@@ -3260,7 +3260,7 @@
$r->print('<p><span class="LC_error">'.$error.'</span></p>');
}
$r->print('</div>');
- }
+ }
$r->print('</div>');
if ($allowed) {
$r->print('
@@ -3283,7 +3283,7 @@
}
$r->print(&Apache::loncommon::end_page());
return OK;
-}
+}
sub generate_admin_options {
my ($containertag,$uploadtag,$help_ref,$env_ref) = @_;
@@ -3334,7 +3334,7 @@
}
}
$form .= '</div></div>';
-
+
return $form;
}