'.
- ''.
- ''.
- ' '.&mt('Utilities').''.
- ' ';
- if ($context eq 'gcicustom') {
- my $createtext = &mt('Create Concept Test');
- if ($switcher) {
- $createtext = &mt('Create New Test');
+ if ($context eq 'gcicustom') {
+ my (%can_request,%request_domains,$canreq,$createtext);
+ my $role = 'st';
+ my $custommenu = &Apache::loncommon::needs_gci_custom();
+ if ($custommenu) {
+ $role = 'cc';
+ }
+ my %courses = &Apache::loncommon::existing_gcitest_courses($role);
+ my $numcourses = keys(%courses);
+ my ($switcher_js,$switcher);
+ my $formname = 'testpicker';
+ if ($numcourses > 0) {
+ $switcher = &Apache::loncommon::gcitest_switcher($role,$formname,%courses);
+ my $current;
+ my $cid = $env{'request.course.id'};
+ if ($cid) {
+ $current = $role.'./'.$env{'course.'.$cid.'.domain'}.
+ '/'.$env{'course.'.$cid.'.num'};
+ }
+ $switcher_js = &Apache::loncommon::gcitest_switcher_js($current,$numcourses,$formname);
+ if ($switcher_js) {
+ $switcher_js= <<"ENDSCRIPT";
+
+
+ENDSCRIPT
}
- $output .= ' | ';
+ $switcher = $switcher_js.$switcher;
}
- if ($switcher) {
- $output .= ' | ';
+ if ($env{'user.domain'} eq 'gci') {
+ $canreq =
+ &Apache::lonnet::check_can_request('gcitest',\%can_request,\%request_domains);
+ $createtext = &mt('Create Concept Test');
+ if ($numcourses) {
+ $createtext = &mt('Create New Test');
+ }
}
- $output .= ' | '.
-' | ';
if ($env{'request.course.id'}) {
- if (($context eq 'gcicustom') && (&Apache::lonnet::allowed('mdc',$env{'request.course.id'}))) {
- $output.= ' | '.
- ''.
- ' | ';
+ if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) {
+ my $navlink;
+ if ($env{'environment.remotenavmap'} eq 'on') {
+ $navlink = "javascript:gonav('/adm/navmaps')";
+ } else {
+ $navlink = '/adm/navmaps';
+ }
+ $output .=
+ '
';
} else {
my $navtext = &mt('Table of Contents');
+ my $navdesc = &mt('Display Table of Contents for Geoscience Concept Inventory');
if ($env{'request.role.domain'} eq 'gcitest') {
$navtext = &mt('Display Test Contents');
+ $navdesc = &mt('Display the table of contents for this Concept Test');
+ }
+ my $navlink;
+ if ($env{'environment.remotenavmap'} eq 'on') {
+ $navlink = "javascript:gonav('/adm/navmaps');"
+ } else {
+ $navlink = '/adm/navmaps';
+ }
+ $output .=
+ '
';
+ }
+ } elsif ($switcher || $canreq) {
+ $output .= '
'.
+ '
';
- }
- if ($context eq 'gcinorole') {
- my $queued = &Apache::loncoursequeueadmin::queued_selfenrollment('notitle');
- if ($queued) {
- $output .= ''.
- ' '.
- ' '.&mt('Pending Enrollment Requests').''.
- $queued.
- ' | ';
+ if ($switcher) {
+ $output .= '