[LON-CAPA-cvs] cvs: loncom /publisher lonpubdisplay.pm
raeburn
raeburn at source.lon-capa.org
Sun Aug 3 12:07:38 EDT 2025
raeburn Sun Aug 3 16:07:38 2025 EDT
Modified files:
/loncom/publisher lonpubdisplay.pm
Log:
- Remove trailing whitespace.
- Coding style - replace some instances of "\" ... \"" with '" ... "'.
- break up long lines with linefeed.
Index: loncom/publisher/lonpubdisplay.pm
diff -u loncom/publisher/lonpubdisplay.pm:1.2 loncom/publisher/lonpubdisplay.pm:1.3
--- loncom/publisher/lonpubdisplay.pm:1.2 Fri Aug 1 14:02:11 2025
+++ loncom/publisher/lonpubdisplay.pm Sun Aug 3 16:07:38 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpubdisplay.pm,v 1.2 2025/08/01 14:02:11 raeburn Exp $
+# $Id: lonpubdisplay.pm,v 1.3 2025/08/03 16:07:38 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -208,7 +208,6 @@
my $target=$fn;
$target=~s{^\Q$Apache::lonnet::perlvar{'lonDocRoot'}\E/priv/}{$Apache::lonnet::perlvar{'lonDocRoot'}/res/};
-
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
@@ -236,11 +235,11 @@
if (copy($fn,$copyfile)) {
$r->print('<p>'.&mt('Copied source file').'</p>');
} else {
- $r->print("<span class=\"LC_error\">".
+ $r->print('<span class="LC_error">'.
&mt('Failed to copy source').", $!, ".&mt('FAIL').
- "</span>");
+ '</span>');
$r->print(&Apache::loncommon::end_page());
- return OK;
+ return OK;
}
# --------------------------------------------------- Send update notifications
@@ -252,7 +251,8 @@
$r->print($reply.'</p><br />');$r->rflush;
}
# ------------------------------------------------------------------- Link back
- $r->print('<a href="'.&Apache::loncfile::url($fn).'">'.&mt('Back to Metadata').'</a>');
+ $r->print('<a href="'.&Apache::loncfile::url($fn).'">'.
+ &mt('Back to Metadata').'</a>');
$r->print(&Apache::loncommon::end_page());
return OK;
}
@@ -277,7 +277,7 @@
}
# Initialize globals in Apache::lonpublisher
- &reset_globals();
+ &reset_globals();
# Get query string for limited number of parameters
@@ -290,7 +290,7 @@
# -------------------------------------------------------------- Check filename
my $fn=&unescape($env{'form.filename'});
- my ($cuname,$cudom) =
+ my ($cuname,$cudom) =
&Apache::lonnet::constructaccess($fn);
# ----------------------------------------------------- Do we have permissions?
unless (($cuname) && ($cudom)) {
@@ -314,7 +314,7 @@
$fn=~s/\.meta$//;
-# sanity test on the filename
+# sanity test on the filename
unless ($fn) {
$r->log_reason($cuname.' at '.$cudom.
@@ -442,16 +442,16 @@
,'<span class="LC_filename">'.$thisdisfn.'</span>')
.'</h2>'
);
-
+
$r->print('<h3>'.&mt('Resource Details').'</h3>');
-
+
$r->print(&Apache::lonhtmlcommon::start_pick_box());
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Type'))
.&Apache::loncommon::filedescription($thistype)
.&Apache::lonhtmlcommon::row_closure()
- );
-
+ );
+
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Link to Resource'))
.'<tt>'
);
More information about the LON-CAPA-cvs
mailing list