Diff for /loncom/publisher/testbankimport.pm between versions 1.26 and 1.30

version 1.26, 2010/11/27 22:43:32 version 1.30, 2011/03/05 22:25:09
Line 1330  sub create_mcq { Line 1330  sub create_mcq {
     my $numfoils = scalar(@{$qstnref}) - 1;       my $numfoils = scalar(@{$qstnref}) - 1; 
     my $datestamp = localtime;      my $datestamp = localtime;
     my $numansrs = scalar(@{$answerref});      my $numansrs = scalar(@{$answerref});
     my $output = '<problem>      my $output = '<problem>';
       if ($qtype eq 'MC') {
           $output .= "\n".'<parameter name="maxtries" type="int_pos" default="2" description="Maximum Number of Tries" />';
       }
       $output .= '
  <startouttext />';   <startouttext />';
     if ($res eq 'application/rtf' || $res eq 'text/html') {      if ($res eq 'application/rtf' || $res eq 'text/html') {
         if ($header ne '') {          if ($header ne '') {
Line 1800  sub print_header { Line 1804  sub print_header {
                                              {'bread_crumbs' => $brcrum,                                               {'bread_crumbs' => $brcrum,
                                               'add_entries' => $loadentries});                                                'add_entries' => $loadentries});
     if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {      if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {
         $output .= '<p class="LC_warning">'          $output .= '<p class="LC_info">'
                  .&mt('Co-Author [_1]',$uname.':'.$udom)                   .&mt('Co-Author [_1]',$uname.':'.$udom)
                  .'</p>';                   .'</p>';
     }      }
Line 1906  sub handler { Line 1910  sub handler {
     }      }
   
     $r->print(&print_header($uname,$udom,$javascript,\%loadentries,$title,      $r->print(&print_header($uname,$udom,$javascript,\%loadentries,$title,
               $current_page,\@pages,\%names));                              $current_page,\@pages,\%names));
   
     if ($env{'form.phase'} eq 'three') {      if (($env{'form.phase'} eq 'four') || ($env{'form.phase'} eq 'three')) {
         if ($env{'form.action'} eq 'upload_embedded') {          if ($env{'form.phase'} eq 'four') {
             $r->print(&Apache::lonupload::phasethree($r,$fn,$uname,$udom,'testbank'));              $r->print(&Apache::lonupload::phasefour($r,$fn,$uname,$udom,'testbank'));
               my $current_page = 0; 
               my $js;
               &jscript_zero($webpath,\$js);
               $js = '<script type="text/javascript">'."\n$js\n".'</script>';
               $r->print($js);
               &display_zero($r,$uname,$fn,$current_page,$webpath);
           } elsif ($env{'form.phase'} eq 'three') {
               if ($env{'form.action'} eq 'upload_embedded') {
                   my ($result,$flag) = 
                        &Apache::lonupload::phasethree($r,$fn,$uname,$udom,'testbank');
                   $r->print($result);
                   if ($flag eq 'modify_orightml') {
                       undef($page_name); 
                       $r->print('<form name="testbankForm" method="post" action="/adm/testbank">'.
                                 &page_footer('',$uname,$fn).'</form>');
                   }
               }
         }          }
         if ($badfile) {          if ($badfile) {
             &file_error($r,$uname,$fn,$current_page,$webpath,$res);              &file_error($r,$uname,$fn,$current_page,$webpath,$res);
         } else {                  } else {
             &display_zero ($r,$uname,$fn,$current_page,$webpath) if $page_name eq 'Welcome';              &display_zero ($r,$uname,$fn,$current_page,$webpath) if $page_name eq 'Welcome';
             &display_one ($r,$uname,$fn,$current_page,$textref,$header) if $page_name eq 'Blocks';              &display_one ($r,$uname,$fn,$current_page,$textref,$header) if $page_name eq 'Blocks';
             &display_two ($r,$uname,$fn,$current_page,$textref,$header,$qcount) if $page_name eq 'Format';              &display_two ($r,$uname,$fn,$current_page,$textref,$header,$qcount) if $page_name eq 'Format';

Removed from v.1.26  
changed lines
  Added in v.1.30


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