[LON-CAPA-cvs] cvs: loncom /publisher testbankimport.pm
bisitz
bisitz@source.lon-capa.org
Mon, 30 Nov 2009 16:53:54 -0000
bisitz Mon Nov 30 16:53:54 2009 EDT
Modified files:
/loncom/publisher testbankimport.pm
Log:
Replaced local topic_bar by standard topic_bar (lonhtmlcommon.pm)
Index: loncom/publisher/testbankimport.pm
diff -u loncom/publisher/testbankimport.pm:1.24 loncom/publisher/testbankimport.pm:1.25
--- loncom/publisher/testbankimport.pm:1.24 Thu May 14 14:24:18 2009
+++ loncom/publisher/testbankimport.pm Mon Nov 30 16:53:54 2009
@@ -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 @@
<li>'.&mt('Review the identified questions, choose which to convert, and (optionally) override the default filename to be used for each problem file.').'</li>
<li>'.&mt('Complete the import of questions.').'</li>
</ol><form name="info" method="post" action="/adm/testbank">'.
- &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:').
' <input type="button" name="createdir" value="'.&mt('Create sub-directory').'" onClick="javascript:createWin()" />'.
&page_footer($env{'form.newdir'},$uname,$fn,$page,$webpath).'
@@ -533,7 +533,7 @@
$r->print('<h3>'.&mt('Identification of blocks of questions').'</h3>'."\n".
'<form method="post" name="display" action="/adm/testbank">'."\n".
&show_uploaded_data($textref,$header)."\n".
- &topic_bar(2,$topics{2}).'<p>'.
+ &Apache::lonhtmlcommon::topic_bar(2,$topics{2}).'<p>'.
&mt('A number in the specified format should appear at the start of each question.').'<br />'.
&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.').'<br />'."\n".
&mt('Correct answers should be numbered in the same way as the questions and should appear after <b>all</b> the questions (including question text and possible foils for all questions).').'<br />'."\n".
@@ -556,7 +556,7 @@
3.
</pre>'.
'</blockquote></p>'.
- &topic_bar(3,$topics{3}).'<p>'.
+ &Apache::lonhtmlcommon::topic_bar(3,$topics{3}).'<p>'.
&mt('For example, you would enter <b>6</b> if your testbank file contained the following sequence of questions:').'</p><blockquote>'.
&mt('10 multiple choice questions').'<br />'.
&mt('5 essay questions').'<br />'.
@@ -608,7 +608,7 @@
&mt('You also indicated that the <b>[quant,_1,question]</b> can be divided into <b>[quant,_2,block]</b> of questions of a particular question type.',$qcount,$blocks).'</p><p>'.
&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.').'</p>'.
&show_uploaded_data($textref,$header).
- &topic_bar(4,$steptitle).'<p>'.
+ &Apache::lonhtmlcommon::topic_bar(4,$steptitle).'<p>'.
&mt('For <i>each</i> 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.','<b>'.$blocks.'</b>').' '.
&mt('If required, provide additional information about foil formats and answer formats for the question types you select.').'</p><p>'.
&Apache::loncommon::start_data_table().
@@ -721,7 +721,7 @@
$r->print('<h3>'.&mt('Review and selection of problems to convert').'</h3>'."\n".
'<form name="dataForm" method="post" action="/adm/testbank">'."\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.'<br />');
}
@@ -1032,7 +1032,7 @@
for (my $i=0; $i<$numitems; $i++) {
$r->print('<input type="hidden" name="probfile_'.$i.'" value="'.$env{'form.probfile_'.$i}.'" />'."\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 @@
return $output;
}
-sub topic_bar {
- my ($imgnum,$title) = @_;
- my $output = '
-<div class="LC_topic_bar">
- <img alt="'.&mt('Step [_1]',$imgnum).
- ' "src="/res/adm/pages/bl_step'.$imgnum.'.gif" /> '.$title.'
-</div>
-';
- return $output;
-}
-
# ---------------------------------------------------------------- Main Handler
sub handler {
my $r=shift;