[LON-CAPA-cvs] cvs: loncom /interface portfolio.pm
raeburn
raeburn@source.lon-capa.org
Mon, 08 Dec 2008 23:15:56 -0000
raeburn Mon Dec 8 23:15:56 2008 EDT
Modified files:
/loncom/interface portfolio.pm
Log:
- Bug 5839. DCs can set availability of User Tools.
Display appropriate message if Portfolio is unavailable for the user.
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.200 loncom/interface/portfolio.pm:1.201
--- loncom/interface/portfolio.pm:1.200 Fri Dec 5 10:23:56 2008
+++ loncom/interface/portfolio.pm Mon Dec 8 23:15:56 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network
# portfolio browser
#
-# $Id: portfolio.pm,v 1.200 2008/12/05 10:23:56 bisitz Exp $
+# $Id: portfolio.pm,v 1.201 2008/12/08 23:15:56 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -801,13 +801,13 @@
$info .= '</li><li>'.&mt('Passphrase-protected files do not require log-in, but will require the viewer to enter the passphrase you set.');
$info .= '</li><li>'.&explain_conditionals();
$info .= '</li></ul>'.
- &mt('A listing of files viewable without log-in is available at: ')."<a href=\"/adm/$udom/$uname/aboutme/portfolio\">http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme/portfolio</a>.<br />";
+ &mt('A listing of files viewable without log-in is available at: ')."<a href=\"/adm/$udom/$uname/aboutme/portfolio\">".&Apache::lonnet::absolute_url($ENV{'SERVER_NAME'})."/adm/$udom/$uname/aboutme/portfolio</a>.<br />";
if ($group eq '') {
$info .= &mt("For logged in users a 'Display file listing' link will also appear (when there are viewable files) on your personal information page:");
} else {
$info .= &mt("For logged in users a 'Display file listing' link will also appear (when there are viewable files) on the course information page:");
}
- $info .= "<br /><a href=\"/adm/$udom/$uname/aboutme\">http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme</a><br />";
+ $info .= "<br /><a href=\"/adm/$udom/$uname/aboutme\">".&Apache::lonnet::absolute_url($ENV{'SERVER_NAME'})."/adm/$udom/$uname/aboutme</a><br />";
if ($group ne '') {
$info .= &mt("Users with privileges to edit course contents may add a course information page to a course using the 'Course Info' button in DOCS").'<br />';
}
@@ -2255,6 +2255,15 @@
$r->print(&Apache::loncommon::start_page($title));
}
$r->rflush();
+ if (!&Apache::lonnet::usertools_access($uname,$udom,'portfolio')) {
+ $r->print('<h2>'.&mt('No user portfolio available') .'</h2>'.
+ &mt('This is a result of one of the following:').'<ul>'.
+ '<li>'.&mt('The administrator of this domain has disabled portfolio functionality for this specific user.').'</li>'.
+ '<li>'.&mt('The domain has been configured to disable, by default, portfolio functionality for all users in the domain.').'</li>'.
+ '</ul>');
+ $r->print(&Apache::loncommon::end_page());
+ return OK;
+ }
my ($blocked,$blocktext) =
&Apache::loncommon::blocking_status('port',$uname,$udom);
if ($blocked) {