version 1.240.2.16, 2010/09/03 19:20:51
|
version 1.240.2.18, 2010/10/06 18:46:53
|
Line 138 use Apache::lonannounce;
|
Line 138 use Apache::lonannounce;
|
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonpageflip(); |
use Apache::lonpageflip(); |
use Apache::lonnavdisplay(); |
use Apache::lonnavdisplay(); |
use Apache::lonmainmenu(); |
|
use Apache::loncoursequeueadmin; |
use Apache::loncoursequeueadmin; |
use GDBM_File; |
use GDBM_File; |
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA qw(:DEFAULT :match); |
Line 593 ENDENTERKEY
|
Line 592 ENDENTERKEY
|
return OK if $r->header_only; |
return OK if $r->header_only; |
|
|
my ($crumbtext,$pagetitle,$recent,$show_course); |
my ($crumbtext,$pagetitle,$recent,$show_course); |
|
$show_course=&Apache::loncommon::show_course(); |
my $noscript='<span class="LC_error">'.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.').'<br />'.&mt('As this is not the case, most functionality in the system will be unavailable.').'</span><br />'; |
my $noscript='<span class="LC_error">'.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.').'<br />'.&mt('As this is not the case, most functionality in the system will be unavailable.').'</span><br />'; |
if ($custommenu) { |
if ($custommenu) { |
my $start_page = &Apache::loncommon::start_page('Main Menu',undef, |
my $brcrum = {'bread_crumbs' => 1}; |
{'bread_crumbs' => 1}); |
if ($env{'form.destinationurl'} eq '/adm/gci_info') { |
|
undef($brcrum); |
|
} |
|
my $start_page = &Apache::loncommon::start_page('Main Menu',undef,$brcrum); |
$r->print(<<"ENDCUSTOM"); |
$r->print(<<"ENDCUSTOM"); |
$start_page |
$start_page |
<br /> |
<br /> |
Line 608 ENDCUSTOM
|
Line 611 ENDCUSTOM
|
$crumbtext = 'User Roles'; |
$crumbtext = 'User Roles'; |
$pagetitle = 'My Roles'; |
$pagetitle = 'My Roles'; |
$recent = &mt('Recent Roles'); |
$recent = &mt('Recent Roles'); |
$show_course=&Apache::loncommon::show_course(); |
my $standby=&mt('Role selected. Please stand by.'); |
if ($show_course) { |
if ($show_course) { |
$crumbtext = 'Courses'; |
$crumbtext = 'Courses'; |
$pagetitle = 'My Courses'; |
$pagetitle = 'My Courses'; |
$recent = &mt('Recent Courses'); |
$recent = &mt('Recent Courses'); |
|
$standby = &mt('Course selected. Please stand by.'); |
} |
} |
my $brcrum =[{href=>"/adm/roles",text=>$crumbtext}]; |
my $brcrum = [{ href => '/adm/roles', |
|
text => $crumbtext,}, |
|
]; |
|
my $args; |
|
if (($env{'user.domain'} eq 'gcitest') && (!$numdc)) { |
|
$args = {bread_crumbs => $brcrum, |
|
bread_crumbs_nomenu => 1}; |
|
} else { |
|
$args = {bread_crumbs => $brcrum}; |
|
} |
|
my $start_page=&Apache::loncommon::start_page($pagetitle,undef,$args); |
my $swinfo=&Apache::lonmenu::rawconfig(); |
my $swinfo=&Apache::lonmenu::rawconfig(); |
my $start_page=&Apache::loncommon::start_page($pagetitle,undef,{bread_crumbs=>$brcrum}); |
|
my $standby=&mt('Role selected. Please stand by.'); |
|
$standby=~s/\n/\\n/g; |
$standby=~s/\n/\\n/g; |
$r->print(<<ENDHEADER); |
$r->print(<<ENDHEADER); |
$start_page |
$start_page |
Line 748 ENDHEADER
|
Line 760 ENDHEADER
|
my $numcourses = keys(%courses); |
my $numcourses = keys(%courses); |
my $switcher; |
my $switcher; |
if ($numcourses > 0) { |
if ($numcourses > 0) { |
$switcher = &Apache::lonmainmenu::gcitest_switcher('cc',%courses); |
$switcher = &Apache::loncommon::gcitest_switcher('cc',%courses); |
my $current; |
my $current; |
if ($env{'request.course.id'}) { |
if ($env{'request.course.id'}) { |
$current = 'cc./'.$env{'course.'.$env{'request.course.id'}.'.domain'}. |
$current = 'cc./'.$env{'course.'.$env{'request.course.id'}.'.domain'}. |
'/'.$env{'course.'.$env{'request.course.id'}.'.num'}; |
'/'.$env{'course.'.$env{'request.course.id'}.'.num'}; |
} |
} |
my $switcher_js = &Apache::lonmainmenu::gcitest_switcher_js($current,$numcourses); |
my $switcher_js = &Apache::loncommon::gcitest_switcher_js($current,$numcourses); |
$r->print(<<"ENDSCRIPT"); |
$r->print(<<"ENDSCRIPT"); |
<script type="text/javascript"> |
<script type="text/javascript"> |
// <![CDATA[ |
// <![CDATA[ |
Line 805 ENDSCRIPT
|
Line 817 ENDSCRIPT
|
if ($inrole) { |
if ($inrole) { |
$r->print('<h2>'.&mt('Currently no additional roles, courses or communities').'</h2>'); |
$r->print('<h2>'.&mt('Currently no additional roles, courses or communities').'</h2>'); |
} else { |
} else { |
$r->print('<h2>'.&mt('Currently no active roles, courses or communities').'</h2>'); |
if ($show_course) { |
|
if ($env{'user.domain'} eq 'gcitest') { |
|
$r->print('<h2>'.&mt('Currently no active Concept Tests').'</h2>'); |
|
} else { |
|
$r->print('<h2>'.&mt('Currently no active courses or communities').'</h2>'); |
|
} |
|
} else { |
|
$r->print('<h2>'.&mt('Currently no active roles, courses or communities').'</h2>'); |
|
} |
} |
} |
unless ($env{'user.domain'} eq 'gcitest') { |
unless ($env{'user.domain'} eq 'gcitest') { |
&findcourse_advice($r); |
&findcourse_advice($r); |
Line 813 ENDSCRIPT
|
Line 833 ENDSCRIPT
|
} |
} |
$r->print('</form>'); |
$r->print('</form>'); |
if ($countfuture) { |
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'} eq 'gcitest') { |
|
$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, |
my $doheaders = &roletable_headers($r,\%roleclass,\%sortrole, |
$nochoose); |
$nochoose); |
&print_rolerows($r,$doheaders,\%roleclass,\%sortrole,\%dcroles, |
&print_rolerows($r,$doheaders,\%roleclass,\%sortrole,\%dcroles, |
Line 862 ENDSCRIPT
|
Line 890 ENDSCRIPT
|
} |
} |
} |
} |
# ----------------------------------------------------------------------- Table |
# ----------------------------------------------------------------------- Table |
unless ((!&Apache::loncommon::show_course()) || ($nochoose) || ($countactive==1)) { |
unless ((!$show_course) || ($nochoose) || ($countactive==1)) { |
$r->print("<h2>".&mt('Select a Course to Enter')."</h2>\n"); |
$r->print("<h2>".&mt('Select a Course to Enter')."</h2>\n"); |
} |
} |
if ($env{'form.destinationurl'}) { |
if ($env{'form.destinationurl'}) { |
Line 970 sub gci_info_page {
|
Line 998 sub gci_info_page {
|
Use the tabs to navigate the WebCenter and... |
Use the tabs to navigate the WebCenter and... |
<ul> |
<ul> |
<li>Review and comment on existing GCI questions</li> |
<li>Review and comment on existing GCI questions</li> |
<li>Submit a GCI question of your own</li> |
<li>Submit GCI questions of your own</li> |
<li>Create an online test for your students</li> |
<li>Create an online test for your students</li> |
<li>View tutorials on creating online tests</li> |
<li>View tutorials on creating online tests</li> |
</ul> |
</ul> |