version 1.410, 2009/11/02 12:10:34
|
version 1.411.2.3, 2009/12/20 02:09:00
|
Line 41 use Apache::lonratedt();
|
Line 41 use Apache::lonratedt();
|
use Apache::lonxml; |
use Apache::lonxml; |
use Apache::lonclonecourse; |
use Apache::lonclonecourse; |
use Apache::lonnavmaps; |
use Apache::lonnavmaps; |
|
use Apache::londocsgci; |
use HTML::Entities; |
use HTML::Entities; |
use GDBM_File; |
use GDBM_File; |
use Apache::lonlocal; |
use Apache::lonlocal; |
Line 2478 ENDHEADERS
|
Line 2479 ENDHEADERS
|
('select_form_order' => |
('select_form_order' => |
['',1..$currentversion,'mostrecent'], |
['',1..$currentversion,'mostrecent'], |
'' => '', |
'' => '', |
'mostrecent' => 'most recent', |
'mostrecent' => &mt('most recent'), |
map {$_,$_} (1..$currentversion)))); |
map {$_,$_} (1..$currentversion)))); |
$r->print('</span></td></tr><tr><td></td>'); |
$r->print('</span></td></tr><tr><td></td>'); |
my $lastold=1; |
my $lastold=1; |
Line 2618 sub handler {
|
Line 2619 sub handler {
|
return OK if $r->header_only; |
return OK if $r->header_only; |
my $crstype = &Apache::loncommon::course_type(); |
my $crstype = &Apache::loncommon::course_type(); |
|
|
|
my $coursedom=$env{'course.'.$env{'request.course.id'}.'.domain'}; |
|
if ($coursedom eq 'gcitest') { |
|
my $coursenum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
my $allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'}); |
|
if ($allowed) { |
|
&concept_test_builder($r,$coursedom,$coursenum); |
|
return OK; |
|
} |
|
} |
|
|
# --------------------------------------------- Initialize help topics for this |
# --------------------------------------------- Initialize help topics for this |
foreach my $topic ('Adding_Course_Doc','Main_Course_Documents', |
foreach my $topic ('Adding_Course_Doc','Main_Course_Documents', |
Line 3532 sub generate_edit_table {
|
Line 3542 sub generate_edit_table {
|
return $form; |
return $form; |
} |
} |
|
|
|
sub concept_test_builder { |
|
my ($r,$cdom,$cnum) = @_; |
|
my $js = ' |
|
<script type="text/javascript"> |
|
// <![CDATA[ |
|
'. |
|
&Apache::londocsgci::builder_javascript(). |
|
' |
|
// ]]> |
|
</script> |
|
'; |
|
my $starthash = { |
|
add_entries => {'onload' => "javascript:setInitialVisibility();"}, |
|
}; |
|
|
|
$r->print(&Apache::loncommon::start_page('Assemble Test',$js,$starthash)); |
|
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/coursedocs', |
|
text=>"Assemble Test"}); |
|
&Apache::londocsgci::setdefaults(); |
|
if ($env{'form.phase'} eq 'storemap') { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/coursedocs?phase=storemap', |
|
text=>"Validate Test"}); |
|
&Apache::londocsgci::evaluate(); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
('Build Concept Test','Concept_Test_Assembly')); |
|
$r->print(&Apache::londocsgci::store('edit',$cdom,$cnum)); |
|
} elsif ($env{'form.phase'} eq 'storeparms') { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/coursedocs?phase=storeparms', |
|
text=>"Set Availability"}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
('Build Concept Test','Concept_Test_Assembly')); |
|
$r->print(&Apache::londocsgci::store_dates_parms($cdom,$cnum)); |
|
$r->print(&Apache::loncommon::end_page()); |
|
return; |
|
} else { |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
('Build Concept Test','Concept_Test_Assembly')); |
|
} |
|
&Apache::londocsgci::load(); |
|
&Apache::londocsgci::listresources($r,'edit',$cdom,$cnum); |
|
$r->print(&Apache::loncommon::end_page()); |
|
return; |
|
} |
|
|
sub editing_js { |
sub editing_js { |
my ($udom,$uname) = @_; |
my ($udom,$uname) = @_; |
my $now = time(); |
my $now = time(); |