[LON-CAPA-cvs] cvs: loncom(GCI_3) /auth lonroles.pm
raeburn
raeburn@source.lon-capa.org
Sun, 05 Dec 2010 17:22:18 -0000
raeburn Sun Dec 5 17:22:18 2010 EDT
Modified files: (Branch: GCI_3)
/loncom/auth lonroles.pm
Log:
- Customization for GCI_3.
- Different functionality for different Concept Inventories.
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.240.2.21 loncom/auth/lonroles.pm:1.240.2.22
--- loncom/auth/lonroles.pm:1.240.2.21 Sun Dec 5 16:35:58 2010
+++ loncom/auth/lonroles.pm Sun Dec 5 17:22:18 2010
@@ -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.22 2010/12/05 17:22:18 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -743,8 +743,8 @@
}
}
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 @@
&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'});
}
}
@@ -972,24 +972,44 @@
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 => '<p>For more information about writing and reviewing Concept Inventory questions please refer to the <a href="/res/gci/gci/internal/pdfs/GCIWorkbook.pdf">GCI Workbook</a>.</p>',
+ );
+ my $output = <<"END";
<br clear="all">
<div>
-<h2>Welcome to the Geoscience Concept Inventory WebCenter</h2>
+<h2>Welcome to the $longname{$inventory} WebCenter</h2>
<p>
Use the tabs to navigate the WebCenter and...
<ul>
-<li>Review and comment on existing GCI questions</li>
-<li>Submit GCI questions of your own</li>
-<li>Create an online test for your students</li>
-<li>View tutorials on creating online tests</li>
+END
+ if (ref($tabs) eq 'ARRAY') {
+ foreach my $tab (@{$tabs}) {
+ if ($features{$tab}) {
+ $output .= '<li>'.$features{$tab}.'</li>'."\n";
+ }
+ }
+ }
+ $output .= <<"END";
</ul>
</p>
-<p>For more information about writing and reviewing Concept Inventory questions
-please refer to the <a href="/res/gci/gci/internal/pdfs/GCIWorkbook.pdf">GCI Workbook</a>.
+$info{$inventory}
</div>
END
+
}
sub gather_roles {