--- loncom/interface/portfolio.pm 2008/06/16 23:34:12 1.195 +++ loncom/interface/portfolio.pm 2008/12/12 15:38:53 1.196.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network # portfolio browser # -# $Id: portfolio.pm,v 1.195 2008/06/16 23:34:12 raeburn Exp $ +# $Id: portfolio.pm,v 1.196.2.1 2008/12/12 15:38:53 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -227,7 +227,7 @@ sub display_directory_line { $r->print('<td>'.$size.'</td>'); $r->print('<td>'.&Apache::lonlocal::locallocaltime($mtime).'</td>'); if ($select_mode ne 'true') { - $r->print('<td><span style="white-space: nowrap">'. + $r->print('<td><span class="LC_nobreak">'. &mt($curr_access).' '); my %anchor_fields = ( 'access' => $filename, @@ -465,7 +465,7 @@ sub display_directory { $r->print('</table>'); if ($can_delete) { $r->print(' - <input type="submit" name="doit" value="'.&mt('Delete Checked Files').'" />'. + <input type="submit" name="doit" value="'.&mt('Delete Selected').'" />'. &Apache::loncommon::help_open_topic('Portfolio DeleteFile').' <input type="hidden" name="action" value="delete" /> <input type="hidden" name="currentpath" value="'.$current_path.'" /> @@ -775,13 +775,13 @@ sub display_access { $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 />'; } @@ -1474,7 +1474,7 @@ sub course_row { } $max_id ++; my $role_selects = &role_selectors($num,$role_id,$type,$content,'display'); - $r->print('<tr><td><span style="white-space: nowrap"><label><input type="checkbox" name="delete_role_'.$num.'" value="'.$role_id.'" />'.&mt('Delete').'</label></span><br /><input type="hidden" name="preserve_role_'.$num.'" value="'.$role_id.'" /></td>'.$role_selects.'</tr>'); + $r->print('<tr><td><span class="LC_nobreak"><label><input type="checkbox" name="delete_role_'.$num.'" value="'.$role_id.'" />'.&mt('Delete').'</label></span><br /><input type="hidden" name="preserve_role_'.$num.'" value="'.$role_id.'" /></td>'.$role_selects.'</tr>'); } $r->print('</table>'); } @@ -1549,7 +1549,7 @@ sub additional_item { sub actionbox { my ($status,$num,$scope) = @_; - my $output = '<span style="white-space: nowrap"><label>'; + my $output = '<span class="LC_nobreak"><label>'; if ($status eq 'new') { my $checkstate; if ($scope eq 'domains' || $scope eq 'users' || $scope eq 'course') { @@ -1560,7 +1560,7 @@ sub actionbox { &mt('Activate'); } else { $output .= '<input type="checkbox" name="delete" value="'.$num. - '" />'.&mt('Delete').'</label></span><br /><span style="white-space: nowrap">'. + '" />'.&mt('Delete').'</label></span><br /><span class="LC_nobreak">'. '<label><input type="checkbox" name="update" value="'. $num.'" />'.&mt('Update'); } @@ -1579,7 +1579,7 @@ sub dateboxes { undef,undef,1); my $enddate = &Apache::lonhtmlcommon::date_setter('portform', 'enddate_'.$num,$end,undef,undef,undef,1,undef, - undef,undef,1). ' <span style="white-space: nowrap"><label>'. + undef,undef,1). ' <span class="LC_nobreak"><label>'. '<input type="checkbox" name="noend_'. $num.'" '.$noend.' />'.&mt('No end date'). '</label></span>'; @@ -2216,6 +2216,15 @@ sub handler { $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) {