Diff for /loncom/publisher/testbankimport.pm between versions 1.39 and 1.42

version 1.39, 2013/06/04 22:20:16 version 1.42, 2013/07/15 14:32:59
Line 89  function createWin() { Line 89  function createWin() {
     newWindow.document.write("<input type='hidden' name='callingmode' value='testbank' />")      newWindow.document.write("<input type='hidden' name='callingmode' value='testbank' />")
     newWindow.document.write("<input type='hidden' name='inhibitmenu' value='yes' />")      newWindow.document.write("<input type='hidden' name='inhibitmenu' value='yes' />")
     newWindow.document.write("$webpath<input type='text' name='newfilename' value='' />")      newWindow.document.write("$webpath<input type='text' name='newfilename' value='' />")
     newWindow.document.write("<input type='button' value='$lt{'go'}' onClick='document.fileaction.submit();' /></form>")      newWindow.document.write("<input type='button' value='$lt{'go'}' onclick='document.fileaction.submit();' /></form>")
     newWindow.document.write('$end_page')      newWindow.document.write('$end_page')
     newWindow.document.close()      newWindow.document.close()
     newWindow.focus()      newWindow.focus()
Line 487  sub display_zero { Line 487  sub display_zero {
     my ($r,$fn,$page,$webpath) = @_;      my ($r,$fn,$page,$webpath) = @_;
     my $go_default = 'NextPage';       my $go_default = 'NextPage'; 
     if ($fn eq '') {      if ($fn eq '') {
         $r->print('<b>'.&mt('Incomplete file upload').'</b> '.&mt('Return to the [_1]construction space menu[_2] to upload a file','<a href="'.$webpath.'">','</a>'));          $r->print('<b>'.&mt('Incomplete file upload').'</b> '.&mt('Return to the [_1]Authoring Space menu[_2] to upload a file','<a href="'.$webpath.'">','</a>'));
     }      }
     $r->print(&mt('The [_1]Testbank Upload[_2] utility can be used by LON-CAPA authors to generate LON-CAPA problem files from a testbank file of questions/answers.','<b>','</b>').'<br />'.      $r->print(&mt('The [_1]Testbank Upload[_2] utility can be used by LON-CAPA authors to generate LON-CAPA problem files from a testbank file of questions/answers.','<b>','</b>').'<br />'.
               &mt('The following question types can be converted:').'                &mt('The following question types can be converted:').'
Line 510  sub display_zero { Line 510  sub display_zero {
         </ol><form name="info" method="post" action="/adm/testbank">'.          </ol><form name="info" method="post" action="/adm/testbank">'.
         &Apache::lonhtmlcommon::topic_bar(1,&mt('Optional: create a sub-directory in which the testbank questions will be saved')).          &Apache::lonhtmlcommon::topic_bar(1,&mt('Optional: create a sub-directory in which the testbank questions will be saved')).
         &mt('By default, LON-CAPA problems generated from the testbank file will be stored in the current directory.').' '.&mt('To store them in a new sub-directory:').           &mt('By default, LON-CAPA problems generated from the testbank file will be stored in the current directory.').' '.&mt('To store them in a new sub-directory:'). 
        ' <input type="button" name="createdir" value="'.&mt('Create sub-directory').'" onClick="javascript:createWin()" />'.         ' <input type="button" name="createdir" value="'.&mt('Create sub-directory').'" onclick="javascript:createWin()" />'.
        &page_footer($env{'form.newdir'},$fn,$page,$webpath).'         &page_footer($env{'form.newdir'},$fn,$page,$webpath).'
        </form>');         </form>');
 }  }
Line 627  sub display_two { Line 627  sub display_two {
                  '<td valign="top">&nbsp;<input type="text" name="start_'.$i.'" value="'.$bl1st.'" size="5" />&nbsp;</td>'."\n".                   '<td valign="top">&nbsp;<input type="text" name="start_'.$i.'" value="'.$bl1st.'" size="5" />&nbsp;</td>'."\n".
                  '<td valign="top">&nbsp;<input type="text" name="end_'.$i.'" value="'.$bl1end.'" size="5" />&nbsp;</td>'."\n".                   '<td valign="top">&nbsp;<input type="text" name="end_'.$i.'" value="'.$bl1end.'" size="5" />&nbsp;</td>'."\n".
                  '<td valign="top">                   '<td valign="top">
    <select name="qtype_'.$i.'" onChange="colSet('.$i.')">     <select name="qtype_'.$i.'" onchange="colSet('.$i.')">
     <option value="-1" selected="selected">'.&mt('Select').'</option>'."\n");      <option value="-1" selected="selected">'.&mt('Select').'</option>'."\n");
         foreach my $qtype (@types) {          foreach my $qtype (@types) {
             $r->print('<option value="'.$qtype.'">'.$typenames{$qtype}.'</option>'."\n");              $r->print('<option value="'.$qtype.'">'.$typenames{$qtype}.'</option>'."\n");
Line 1947  sub handler { Line 1947  sub handler {
                       &page_footer('',$fn).'</form>');                        &page_footer('',$fn).'</form>');
         }          }
     } else {      } else {
         &Apache::lonupload::phaseone($r,$fn,'testbank');          &Apache::lonupload::phaseone($r,$fn,'testbank',$uname,$udom);
     }      }
     $r->print(&Apache::loncommon::end_page());      $r->print(&Apache::loncommon::end_page());
     return OK;      return OK;

Removed from v.1.39  
changed lines
  Added in v.1.42


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