'.&mt('Currently not assigned as a [_1] contributor',$inventory).'
');
+ }
+ } else {
+ $r->print('
'.&mt('Currently no active roles, courses or communities').'
');
+ }
}
- &findcourse_advice($r);
- &requestcourse_advice($r);
+ unless ($env{'user.domain'} =~ /^\w+citest$/) {
+ &findcourse_advice($r);
+ &requestcourse_advice($r);
+ }
$r->print('');
if ($countfuture) {
- $r->print(&mt('The following [quant,_1,role,roles] will become active in the future:',$countfuture));
+ if ($show_course) {
+ if ($env{'user.domain'} =~ /^\w+citest$/) {
+ $r->print(&mt('The following [quant,_1,Concept Test] will be available in the future:',$countfuture));
+ } else {
+ $r->print(&mt('The following [quant,_1,course] will become active in the future:',$countfuture));
+ }
+ } else {
+ $r->print(&mt('The following [quant,_1,role,roles] will become active in the future:',$countfuture));
+ }
my $doheaders = &roletable_headers($r,\%roleclass,\%sortrole,
$nochoose);
&print_rolerows($r,$doheaders,\%roleclass,\%sortrole,\%dcroles,
@@ -836,7 +872,7 @@ ENDSCRIPT
}
}
# ----------------------------------------------------------------------- Table
- unless ((!&Apache::loncommon::show_course()) || ($nochoose) || ($countactive==1)) {
+ unless ((!$show_course) || ($nochoose) || ($countactive==1)) {
$r->print("
".&mt('Select a Course to Enter')."
\n");
}
if ($env{'form.destinationurl'}) {
@@ -937,6 +973,46 @@ ENDSCRIPT
return OK;
}
+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 $longname{$inventory} WebCenter
+
+Use the tabs to navigate the WebCenter and...
+
+END
+ if (ref($tabs) eq 'ARRAY') {
+ foreach my $tab (@{$tabs}) {
+ if ($features{$tab}) {
+ $output .= '
'.$features{$tab}.'
'."\n";
+ }
+ }
+ }
+ $output .= <<"END";
+
+
+$info{$inventory}
+
+END
+
+}
+
sub gather_roles {
my ($then,$refresh,$now,$reinit,$nochoose,$roletext,$sortrole,$roleclass,$futureroles,$timezones) = @_;
my ($countactive,$countfuture,$inrole,$possiblerole) = (0,0,0,'');
@@ -1042,7 +1118,7 @@ sub gather_roles {
} elsif ($trest) {
my $tcourseid=$tdom.'_'.$trest;
$ttype = &Apache::loncommon::course_type($tcourseid);
- $trole = &Apache::lonnet::plaintext($role,$ttype);
+ $trole = &Apache::lonnet::plaintext($role,$ttype,$tcourseid);
if ($env{'course.'.$tcourseid.'.description'}) {
$twhere=$env{'course.'.$tcourseid.'.description'};
$sortkey=$role."\0".$tdom."\0".$twhere."\0".$envkey;
@@ -1061,7 +1137,7 @@ sub gather_roles {
&Apache::loncommon::syllabuswrapper(&mt('Syllabus'),$trest,$tdom).
'';
$ttype = $newhash{'type'};
- $trole = &Apache::lonnet::plaintext($role,$ttype);
+ $trole = &Apache::lonnet::plaintext($role,$ttype,$tcourseid);
} else {
$twhere=&mt('Currently not available');
$env{'course.'.$tcourseid.'.description'}=$twhere;
@@ -1239,10 +1315,15 @@ sub findcourse_advice {
} else {
$r->print(&mt('If you were expecting to see an active role listed for a particular course, that course may not have been created yet.').' ');
}
- $r->print('
'.&mt('Self-Enrollment').'
'.
- '
'.&mt('The [_1]Course/Community Catalog[_2] provides information about all [_3] classes for which LON-CAPA courses have been created, as well as any communities in the domain.','','',$domdesc).' ');
- $r->print(&mt('You can search for courses and communities which permit self-enrollment, if you would like to enroll in one.').'
');
- &queued_selfenrollment($r);
+ my $queued = &Apache::loncoursequeueadmin::queued_selfenrollment();
+ if ($queued) {
+ $r->print($queued);
+ } else {
+ $r->print(&mt('You have no request for contributor access pending approval by the GCI WebCenter team.').'
'.
+ '
'.&mt('This may mean that action was taken on your request in the time since your most recent log-in.[_1]View [_2]Message[_3] to see if this is the case.',' ','','').'
'.
+ '
'.&mt('If you logout and log-in again you may find you now have access to the Geoscience Concept Inventory, as a contributor.').'
'.
+ '
');
+ }
return;
}
@@ -1299,49 +1380,6 @@ sub requestcourse_advice {
return;
}
-sub queued_selfenrollment {
- my ($r) = @_;
- my %selfenrollrequests = &Apache::lonnet::dump('selfenrollrequests');
- my %reqs_by_date;
- foreach my $item (keys(%selfenrollrequests)) {
- if (ref($selfenrollrequests{$item}) eq 'HASH') {
- if ($selfenrollrequests{$item}{'status'} eq 'request') {
- if ($selfenrollrequests{$item}{'timestamp'}) {
- push(@{$reqs_by_date{$selfenrollrequests{$item}{'timestamp'}}},$item);
- }
- }
- }
- }
- if (keys(%reqs_by_date)) {
- my $rolename = &Apache::lonnet::plaintext('st');
- $r->print(''.&mt('Enrollment requests pending Course Coordinator approval').' '.
- &Apache::loncommon::start_data_table().
- &Apache::loncommon::start_data_table_header_row().
- '
'.&mt('Date requested').'
'.&mt('Course title').'
'.
- '
'.&mt('User role').'
'.&mt('Section').'
'.
- &Apache::loncommon::end_data_table_header_row());
- my @sorted = sort { $a <=> $b } (keys(%reqs_by_date));
- foreach my $item (@sorted) {
- if (ref($reqs_by_date{$item}) eq 'ARRAY') {
- foreach my $crs (@{$reqs_by_date{$item}}) {
- my %courseinfo = &Apache::lonnet::coursedescription($crs);
- my $usec = $selfenrollrequests{$crs}{'section'};
- if ($usec eq '') {
- $usec = &mt('No section');
- }
- $r->print(&Apache::loncommon::start_data_table_row().
- '
'.&Apache::lonlocal::locallocaltime($item).'
'.
- '
'.$courseinfo{'description'}.'
'.
- '
'.$rolename.'
'.$usec.'
'.
- &Apache::loncommon::end_data_table_row());
- }
- }
- }
- $r->print(&Apache::loncommon::end_data_table());
- }
- return;
-}
-
sub privileges_info {
my ($which) = @_;
my $output;
@@ -1682,7 +1720,7 @@ sub display_cc_role {
$twhere=&mt('Currently not available');
$env{'course.'.$tcourseid.'.description'}=$twhere;
}
- my $trole = &Apache::lonnet::plaintext($ccrole,$ttype);
+ my $trole = &Apache::lonnet::plaintext($ccrole,$ttype,$tcourseid);
$twhere.=" ".&mt('Domain').":".$1;
($roletext,$roletext_end) = &build_roletext($trolecode,$1,$2,'is',$tryagain,$advanced,'',$tbg,$trole,$twhere,'','','',1,'');
}