[LON-CAPA-cvs] cvs: loncom /interface loncreateuser.pm
raeburn
raeburn at source.lon-capa.org
Fri Jan 27 21:56:41 EST 2017
raeburn Sat Jan 28 02:56:41 2017 EDT
Modified files:
/loncom/interface loncreateuser.pm
Log:
- Suppress display of first item in breadcrumbs trail ("Menu") when user
log-in/logout/role selection activity is displayed in pop-up window.
- Include header line with user's name when displaying a user's
log-in/logout/role selection activity log.
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.430 loncom/interface/loncreateuser.pm:1.431
--- loncom/interface/loncreateuser.pm:1.430 Tue Jan 24 05:34:37 2017
+++ loncom/interface/loncreateuser.pm Sat Jan 28 02:56:41 2017
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.430 2017/01/24 05:34:37 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.431 2017/01/28 02:56:41 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -6684,20 +6684,25 @@
# set breadcrumbs
my %breadcrumb_text = &singleuser_breadcrumb('','domain',$udom);
- push (@{$brcrum},
- {href => "javascript:backPage($form)",
- text => $breadcrumb_text{'search'}});
- my (@prevphases,$prevphasestr);
- if ($env{'form.prevphases'}) {
- @prevphases = split(/,/,$env{'form.prevphases'});
- $prevphasestr = $env{'form.prevphases'};
- }
- if (($env{'form.phase'} eq 'userpicked') || (grep(/^userpicked$/, at prevphases))) {
- push(@{$brcrum},
- {href => "javascript:backPage($form,'get_user_info','select')",
- text => $breadcrumb_text{'userpicked'}});
- if ($env{'form.phase'} eq 'userpicked') {
- $prevphasestr = 'userpicked';
+ my $prevphasestr;
+ if ($env{'form.popup'}) {
+ $brcrum = [];
+ } else {
+ push (@{$brcrum},
+ {href => "javascript:backPage($form)",
+ text => $breadcrumb_text{'search'}});
+ my @prevphases;
+ if ($env{'form.prevphases'}) {
+ @prevphases = split(/,/,$env{'form.prevphases'});
+ $prevphasestr = $env{'form.prevphases'};
+ }
+ if (($env{'form.phase'} eq 'userpicked') || (grep(/^userpicked$/, at prevphases))) {
+ push(@{$brcrum},
+ {href => "javascript:backPage($form,'get_user_info','select')",
+ text => $breadcrumb_text{'userpicked'}});
+ if ($env{'form.phase'} eq 'userpicked') {
+ $prevphasestr = 'userpicked';
+ }
}
}
push(@{$brcrum},
@@ -6709,6 +6714,7 @@
bread_crumbs_component => 'User Management'};
if ($env{'form.popup'}) {
$args->{'no_nav_bar'} = 1;
+ $args->{'bread_crumbs_nomenu'} = 1;
}
# set javascript
@@ -6734,8 +6740,12 @@
unless ($permission->{'activity'}) {
$r->print('<p class="LC_warning">'
.&mt('You do not have rights to display user access logs.')
- .'</p>'
- .&earlyout_accesslog_form($formname,$prevphasestr,$udom));
+ .'</p>');
+ if ($env{'form.popup'}) {
+ $r->print('<p><a href="javascript:window.close()">'.&mt('Close window').'</a></p>');
+ } else {
+ $r->print(&earlyout_accesslog_form($formname,$prevphasestr,$udom));
+ }
return;
}
@@ -6801,8 +6811,10 @@
my ($nav_script,$nav_links);
# table header
- my $tableheader =
- &Apache::loncommon::start_data_table_header_row()
+ my $tableheader = '<h3>'.
+ &mt('User access logs for: [_1]',
+ &Apache::loncommon::aboutmewrapper(&Apache::loncommon::plainname($uname,$udom),$uname,$udom)).'</h3>'
+ .&Apache::loncommon::start_data_table_header_row()
.'<th> </th>'
.'<th>'.&mt('When').'</th>'
.'<th>'.&mt('HostID').'</th>'
@@ -7001,7 +7013,7 @@
# Update Display button
$output .= '<p>'
.'<input type="submit" value="'.&mt('Update Display').'" />'
- .'</p>';
+ .'</p><hr />';
return $output;
}
More information about the LON-CAPA-cvs
mailing list