Diff for /loncom/interface/londocs.pm between versions 1.411.2.2 and 1.411.2.3

version 1.411.2.2, 2009/12/08 04:30:41 version 1.411.2.3, 2009/12/20 02:09:00
Line 2621  sub handler { Line 2621  sub handler {
   
     my $coursedom=$env{'course.'.$env{'request.course.id'}.'.domain'};      my $coursedom=$env{'course.'.$env{'request.course.id'}.'.domain'};
     if ($coursedom eq 'gcitest') {      if ($coursedom eq 'gcitest') {
           my $coursenum = $env{'course.'.$env{'request.course.id'}.'.num'};
         my $allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'});          my $allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'});
         if ($allowed) {          if ($allowed) {
             &concept_test_builder($r);              &concept_test_builder($r,$coursedom,$coursenum);
             return OK;              return OK;
         }          }
     }      }
Line 3542  sub generate_edit_table { Line 3543  sub generate_edit_table {
 }  }
   
 sub concept_test_builder {  sub concept_test_builder {
     my ($r) = @_;      my ($r,$cdom,$cnum) = @_;
     $r->print(&Apache::loncommon::start_page('Assemble Test'));      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();      &Apache::londocsgci::setdefaults();
     if ($env{'form.phase'} eq 'storemap') {      if ($env{'form.phase'} eq 'storemap') {
           &Apache::londocsgci::evaluate();          &Apache::lonhtmlcommon::add_breadcrumb
           &Apache::londocsgci::store($r);              ({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::load();
     &Apache::londocsgci::listresources($r);      &Apache::londocsgci::listresources($r,'edit',$cdom,$cnum);
     $r->print(&Apache::loncommon::end_page());      $r->print(&Apache::loncommon::end_page());
     return;      return;
 }  }

Removed from v.1.411.2.2  
changed lines
  Added in v.1.411.2.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>