--- loncom/interface/londocs.pm 2003/11/04 19:18:16 1.94
+++ loncom/interface/londocs.pm 2004/02/04 20:53:54 1.102
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.94 2003/11/04 19:18:16 www Exp $
+# $Id: londocs.pm,v 1.102 2004/02/04 20:53:54 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -425,14 +425,11 @@ END
# Figure out what kind of a resource this is
my ($extension)=($url=~/\.(\w+)$/);
my $uploaded=($url=~/^\/*uploaded\//);
- my $icon='unknown';
- if (-e "/home/httpd/html/adm/lonIcons/$extension.gif") {
- $icon=$extension;
- }
+ my $icon=&Apache::loncommon::icon($url);
my $isfolder=0;
if ($uploaded) {
if ($extension eq 'sequence') {
- $icon='folder_closed';
+ $icon=$iconpath.'/folder_closed.gif';
$url=~/\/(\w+)\.sequence/;
$url='/adm/coursedocs?folder='.$1;
$isfolder=1;
@@ -454,8 +451,7 @@ END
if ($isfolder) { $url.='&foldername='.
&Apache::lonnet::escape($foldertitle); }
$line.='
 | '.
+ '">
'.
"$title | ";
return $line;
}
@@ -515,7 +511,7 @@ sub checkonthis {
if (($Apache::lonxml::errorcount) ||
($Apache::lonxml::warningcount)) {
if ($Apache::lonxml::errorcount) {
- $r->print(''.
+ $r->print('
'.
$Apache::lonxml::errorcount.' '.
&mt('error(s)').' ');
}
@@ -539,7 +535,11 @@ sub checkonthis {
} elsif ($result==HTTP_SERVICE_UNAVAILABLE) {
$r->print(''.&mt('connection down').'');
} elsif ($result==HTTP_NOT_FOUND) {
- $r->print(''.&mt('not found').'');
+ unless ($url=~/\$/) {
+ $r->print(''.&mt('not found').'');
+ } else {
+ $r->print(''.&mt('unable to verify variable URL').'');
+ }
} else {
$r->print(''.&mt('access denied').'');
}
@@ -727,7 +727,10 @@ ENDHEADERS
&Apache::lonnet::gettitle($linkurl).
'
'.$linkurl.
''.
- &Apache::lonlocal::locallocaltime($changes{$_}).
+ &Apache::lonlocal::locallocaltime(
+ &Apache::lonnet::metadata($root.'.'.$extension,
+ 'lastrevisiondate')
+ ).
' | '.
$currentversion.' | ');
# Used in course
@@ -796,7 +799,6 @@ sub handler {
$r->send_http_header;
return OK if $r->header_only;
- &Apache::lonlocal::clearreroutetrans();
# --------------------------------------------- Initialize help topics for this
foreach ('Adding_Course_Doc','Main_Course_Documents',
'Adding_External_Resource','Navigate_Content',
@@ -934,6 +936,21 @@ function makebulboard() {
}
}
+function makeabout() {
+ var user=prompt("Enter user\@domain for User's 'About Me' Page");
+ if (user) {
+ var comp=new Array();
+ comp=user.split('\@');
+ if ((typeof(comp[0])!=undefined) && (typeof(comp[1])!=undefined)) {
+ if ((comp[0]) && (comp[1])) {
+ this.document.forms.newaboutsomeone.importdetail.value=
+ 'About '+user+'=/adm/'+comp[1]+'/'+comp[0]+'/aboutme';
+ this.document.forms.newaboutsomeone.submit();
+ }
+ }
+ }
+}
+
function finishpick() {
var title=this.document.forms.extimport.title.value;
var url=this.document.forms.extimport.url.value;
@@ -967,7 +984,9 @@ ENDNEWSCRIPT
# -------------------------------------------------------------------- Body tag
$r->print(''.
&Apache::loncommon::bodytag('Course Documents','',$events,
- '','',$showdoc));
+ '','',$showdoc).
+ &Apache::loncommon::help_open_faq(273).
+ &Apache::loncommon::help_open_bug('RAT'));
unless ($showdoc) {
# -----------------------------------------------------------------------------
my %lt=&Apache::lonlocal::texthash(
@@ -988,7 +1007,11 @@ ENDNEWSCRIPT
'sipr' => 'Simple Problem',
'scuf' => 'Score Upload Form',
'bull' => 'Bulletin Board',
- 'mypi' => 'My Personal Info'
+ 'mypi' => 'My Personal Info',
+ 'abou' => 'About User',
+ 'file' => 'File',
+ 'title' => 'Title',
+ 'comment' => 'Comment'
);
# -----------------------------------------------------------------------------
if ($allowed) {
@@ -1018,7 +1041,7 @@ $dumpbut
ENDCOURSEVERIFY
$r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',
- 'Editing the Table of Contents for your Course'));
+ &mt('Editing the Table of Contents for your Course')));
}
# --------------------------------------------------------- Standard documents
$r->print('');
@@ -1047,11 +1070,11 @@ ENDCOURSEVERIFY
$lt{'spec'} |
-File:
+$lt{'file'}:
+
|
ENDFORM
@@ -1197,7 +1229,7 @@ ENDFORM
| |