--- loncom/auth/lonroles.pm 2010/12/05 16:35:58 1.240.2.21
+++ loncom/auth/lonroles.pm 2010/12/08 06:48:56 1.240.2.23
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.240.2.21 2010/12/05 16:35:58 raeburn Exp $
+# $Id: lonroles.pm,v 1.240.2.23 2010/12/08 06:48:56 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -743,8 +743,8 @@ ENDHEADER
}
}
if ($custommenu) {
- if ($env{'form.destinationurl'} eq '/adm/gci_info') {
- $r->print(&gci_info_page()).
+ if ($env{'form.destinationurl'} eq '/adm/ci_info') {
+ $r->print(&ci_info_page()).
&Apache::loncommon::end_page();
return OK;
}
@@ -760,7 +760,7 @@ ENDHEADER
&Apache::loncommon::end_page());
return OK;
} else {
- if ($env{'form.destinationurl'} eq '/adm/gci_info') {
+ if ($env{'form.destinationurl'} eq '/adm/ci_info') {
delete($env{'form.destinationurl'});
}
}
@@ -801,8 +801,9 @@ ENDHEADER
if ($show_course) {
if ($env{'user.domain'} =~ /^\w+citest$/) {
$r->print('
'.&mt('Currently no active Concept Tests').'
');
- } elsif ($env{'user.domain'} =~ /ci$/) {
- $r->print(''.&mt('Currently not assigned as a GCI contributor').'
');
+ } elsif ($env{'user.domain'} =~ /^\w+ci$/) {
+ my $inventory = uc($env{'user.domain'});
+ $r->print(''.&mt('Currently not assigned as a [_1] contributor',$inventory).'
');
}
} else {
$r->print(''.&mt('Currently no active roles, courses or communities').'
');
@@ -972,24 +973,44 @@ ENDHEADER
return OK;
}
-sub gci_info_page {
- return <<"END";
+sub ci_info_page {
+ my %longname = (
+ GCI => 'Geoscience Concept Inventory',
+ SLCI => 'Science Literacy Concept Inventory',
+ );
+ my $inventory = uc($env{'user.domain'});
+ my %features = (
+ review => "Review and comment on existing $inventory questions",
+ submit => "Submit $inventory questions of your own",
+ managetest => 'Create an online test for your students',
+ tutorial => 'View tutorials on creating online tests',
+ );
+ my $tabs = &Apache::loncommon::ci_tabs($env{'user.domain'});
+ my %info = (
+ GCI => 'For more information about writing and reviewing Concept Inventory questions please refer to the GCI Workbook.
',
+ );
+ my $output = <<"END";
-
Welcome to the Geoscience Concept Inventory WebCenter
+
Welcome to the $longname{$inventory} WebCenter
Use the tabs to navigate the WebCenter and...
-- Review and comment on existing GCI questions
-- Submit GCI questions of your own
-- Create an online test for your students
-- View tutorials on creating online tests
+END
+ if (ref($tabs) eq 'ARRAY') {
+ foreach my $tab (@{$tabs}) {
+ if ($features{$tab}) {
+ $output .= '- '.$features{$tab}.'
'."\n";
+ }
+ }
+ }
+ $output .= <<"END";
-
For more information about writing and reviewing Concept Inventory questions
-please refer to the GCI Workbook.
+$info{$inventory}
END
+
}
sub gather_roles {