--- loncom/publisher/testbankimport.pm 2009/05/14 14:24:18 1.24 +++ loncom/publisher/testbankimport.pm 2009/11/30 16:53:54 1.25 @@ -1,5 +1,5 @@ # Handler for parsing text upload problem descriptions into .problems -# $Id: testbankimport.pm,v 1.24 2009/05/14 14:24:18 bisitz Exp $ +# $Id: testbankimport.pm,v 1.25 2009/11/30 16:53:54 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -508,7 +508,7 @@ sub display_zero {
  • '.&mt('Review the identified questions, choose which to convert, and (optionally) override the default filename to be used for each problem file.').'
  • '.&mt('Complete the import of questions.').'
  • '. - &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:'). ' '. &page_footer($env{'form.newdir'},$uname,$fn,$page,$webpath).' @@ -533,7 +533,7 @@ sub display_one { $r->print('

    '.&mt('Identification of blocks of questions').'

    '."\n". ''."\n". &show_uploaded_data($textref,$header)."\n". - &topic_bar(2,$topics{2}).'

    '. + &Apache::lonhtmlcommon::topic_bar(2,$topics{2}).'

    '. &mt('A number in the specified format should appear at the start of each question.').'
    '. &mt('For multiple choice questions, the question number must begin the line that contains the question text; foils (starting (a), (i) etc.) should occur on subsequent lines.').'
    '."\n". &mt('Correct answers should be numbered in the same way as the questions and should appear after all the questions (including question text and possible foils for all questions).').'
    '."\n". @@ -556,7 +556,7 @@ sub display_one { 3. '. '

    '. - &topic_bar(3,$topics{3}).'

    '. + &Apache::lonhtmlcommon::topic_bar(3,$topics{3}).'

    '. &mt('For example, you would enter 6 if your testbank file contained the following sequence of questions:').'

    '. &mt('10 multiple choice questions').'
    '. &mt('5 essay questions').'
    '. @@ -608,7 +608,7 @@ sub display_two { &mt('You also indicated that the [quant,_1,question] can be divided into [quant,_2,block] of questions of a particular question type.',$qcount,$blocks).'

    '. &mt('Provide additional information below, about the types of questions you have uploaded, and, if applicable, the format of answers and "foils" for specific types of questions.').'

    '. &show_uploaded_data($textref,$header). - &topic_bar(4,$steptitle).'

    '. + &Apache::lonhtmlcommon::topic_bar(4,$steptitle).'

    '. &mt('For each of the [_1] question blocks, specify the question numbers of the first and last questions in the block (e.g., 1 and 10), and the question type of the questions in the block.',''.$blocks.'').' '. &mt('If required, provide additional information about foil formats and answer formats for the question types you select.').'

    '. &Apache::loncommon::start_data_table(). @@ -721,7 +721,7 @@ sub display_three { $r->print('

    '.&mt('Review and selection of problems to convert').'

    '."\n". ''."\n". &mt('Based on your previous responses your data have been split into a total of [quant,_1,question].',$numitems). - &topic_bar(5,&mt('Choose which problems to convert and names to use for individual problem files'))); + &Apache::lonhtmlcommon::topic_bar(5,&mt('Choose which problems to convert and names to use for individual problem files'))); if ($showheader) { $r->print($showheader.'
    '); } @@ -1032,7 +1032,7 @@ sub final_display { for (my $i=0; $i<$numitems; $i++) { $r->print(''."\n"); } - $r->print(&topic_bar(6,&mt('Result of conversion of testbank questions to LON-CAPA problems'))); + $r->print(&Apache::lonhtmlcommon::topic_bar(6,&mt('Result of conversion of testbank questions to LON-CAPA problems'))); my $destdir = $dirpath; if ($destdir ne '' && $subdir ne '') { $subdir .= '/'; @@ -1780,17 +1780,6 @@ sub print_header { return $output; } -sub topic_bar { - my ($imgnum,$title) = @_; - my $output = ' -
    - '.&mt('Step [_1]',$imgnum).
-              '  '.$title.' -
    -'; - return $output; -} - # ---------------------------------------------------------------- Main Handler sub handler { my $r=shift;