version 1.11, 2006/12/06 22:22:39
|
version 1.14, 2008/06/05 01:24:59
|
Line 393 function createWin() {
|
Line 393 function createWin() {
|
newWindow.document.write("<td><h3>Location: <tt>$fullpath</tt></h3><h3>New Directory</h3></td></tr>\\n") |
newWindow.document.write("<td><h3>Location: <tt>$fullpath</tt></h3><h3>New Directory</h3></td></tr>\\n") |
newWindow.document.write("<tr><td width='2'> </td><td width='3'> </td>\\n") |
newWindow.document.write("<tr><td width='2'> </td><td width='3'> </td>\\n") |
newWindow.document.write("<td><form name='fileaction' action='/adm/cfile' method='post'>\\n") |
newWindow.document.write("<td><form name='fileaction' action='/adm/cfile' method='post'>\\n") |
newWindow.document.write("<font face='arial,helvetica,sans-serif'>Enter the name of the new directory where you will store the converted testbank questions<br /><br />") |
newWindow.document.write("<font face='arial,helvetica,sans-serif'>Enter the name of the new directory where you will save the converted testbank questions<br /><br />") |
newWindow.document.write("<input type='hidden' name='filename' value='$fullpath'>") |
newWindow.document.write("<input type='hidden' name='filename' value='$fullpath'>") |
newWindow.document.write("<input type='hidden' name='action' value='newdir'>") |
newWindow.document.write("<input type='hidden' name='action' value='newdir'>") |
newWindow.document.write("<input type='hidden' name='callingmode' value='testbank'>") |
newWindow.document.write("<input type='hidden' name='callingmode' value='testbank'>") |
Line 456 The <b>Testbank Upload</b> utility can b
|
Line 456 The <b>Testbank Upload</b> utility can b
|
<li>All questions (including question text and all foils) must occur before any of the answers. Each question should begin on a new line, and should start with the question number. Questions should be numbered sequentially using a number followed immediately by a space, a period, or enclosed in parentheses, i.e., 1 , 1., (1), 1), or (1 .</li> |
<li>All questions (including question text and all foils) must occur before any of the answers. Each question should begin on a new line, and should start with the question number. Questions should be numbered sequentially using a number followed immediately by a space, a period, or enclosed in parentheses, i.e., 1 , 1., (1), 1), or (1 .</li> |
<li><i>Multiple choice</i> and <i>multiple answer correct</i> questions should consist of: (i) the question number followed by (ii) the question text beginning on the same line and (iii) two or more foils, with each foil beginning on a new line and prefixed by a unique letter, or Roman numeral, listed in alphabetic or numeric order, beginning at a (alphabetic) or i (Roman numeral), followed by a period, or enclosed in parentheses, i.e., a., (a), i., or (i).</li> |
<li><i>Multiple choice</i> and <i>multiple answer correct</i> questions should consist of: (i) the question number followed by (ii) the question text beginning on the same line and (iii) two or more foils, with each foil beginning on a new line and prefixed by a unique letter, or Roman numeral, listed in alphabetic or numeric order, beginning at a (alphabetic) or i (Roman numeral), followed by a period, or enclosed in parentheses, i.e., a., (a), i., or (i).</li> |
<li>One or more correct answers should be provided for all questions (although blank answers may be provided for <i>essay</i> questions). Answers should be numbered sequentially, using the same scheme as used for the questions, and must occur after <b>all</b> the questions. |
<li>One or more correct answers should be provided for all questions (although blank answers may be provided for <i>essay</i> questions). Answers should be numbered sequentially, using the same scheme as used for the questions, and must occur after <b>all</b> the questions. |
<li>If <i>fill-in-the-blank</i> or <i>multiple answer</i> questions have more than one correct answer, each answer should appear in a comma-, tab-, space-, or new line-delimited list. For a <i>ranking/ordering</i> question, the "answer" should contain the foil identifiers correctly ordered in a similarly delimited list.</li> |
<li>If <i>fill-in-the-blank</i> or <i>multiple answer</i> questions have more than one correct answer, each answer should appear in a comma-, tab-, space-, or new line-delimited list. For a <i>ranking/ordering</i> question, the "answer" should contain the foil identifiers correctly ordered in a similarly delimited list. If two or more foils have the same ranking, they should occur together, with an equals sign separating equally ranked foils [e.g., (b),(e)=(a),(d),(c)].</li> |
</ol> |
</ol> |
Five steps are involved in the import process. |
Five steps are involved in the import process. |
<ol> |
<ol> |
<li>Upload your text file to the server.|); |
<li>Upload your text file to the server.|); |
Line 470 Five steps are involved in the import pr
|
Line 470 Five steps are involved in the import pr
|
$r->print(qq|</li> |
$r->print(qq|</li> |
<li>Provide information about the question format - i.e., question numbering style, and the number of blocks of questions of each question type.</li> |
<li>Provide information about the question format - i.e., question numbering style, and the number of blocks of questions of each question type.</li> |
<li>Provide information about the questions in each block, including question type, start and end question numbers for each block, and foil labelling style and answer format where required.</li> |
<li>Provide information about the questions in each block, including question type, start and end question numbers for each block, and foil labelling style and answer format where required.</li> |
<li>Create a new directory where you will store the converted testbank questions.</li> |
<li>Create a new directory where you will save the converted testbank questions.</li> |
<li>Complete the import of questions to the selected pool.</li> |
<li>Complete the import of questions to the selected pool.</li> |
</ol> |
</ol> |
</font> |
</font> |
Line 1030 END_OF_ONE
|
Line 1030 END_OF_ONE
|
<td width='30' align='top'><img src='/res/adm/pages/bl_step4.gif'> |
<td width='30' align='top'><img src='/res/adm/pages/bl_step4.gif'> |
</td> |
</td> |
<td width='100%' align='left'> |
<td width='100%' align='left'> |
<font size='+1' face='arial,helvetica,sans-serif'><b>Create a directory to store your testbank questions.</b></font> |
<font size='+1' face='arial,helvetica,sans-serif'><b>Create a directory to save your testbank questions.</b></font> |
</td> |
</td> |
</tr> |
</tr> |
<tr> |
<tr> |
Line 1040 END_OF_ONE
|
Line 1040 END_OF_ONE
|
<td> </td> |
<td> </td> |
<td> |
<td> |
<font face='Arial,Helvetica,sans-serif'> |
<font face='Arial,Helvetica,sans-serif'> |
Please choose a destination LON-CAPA directory in which to store your uploaded questions. |
Please choose a destination LON-CAPA directory in which to save your uploaded questions. |
<input type="button" name="createdir" value="Create Directory" onClick="javascript:createWin()"><input type="hidden" name="newdir" value=""></font></td> |
<input type="button" name="createdir" value="Create Directory" onClick="javascript:createWin()"><input type="hidden" name="newdir" value=""></font></td> |
</tr> |
</tr> |
<tr> |
<tr> |
Line 1188 sub final_display {
|
Line 1188 sub final_display {
|
$items[$k] =~ tr/A-Z/a-z/; |
$items[$k] =~ tr/A-Z/a-z/; |
my @corrects = split/$patterns{$ansrtypes[$i]}/,$items[$k]; |
my @corrects = split/$patterns{$ansrtypes[$i]}/,$items[$k]; |
foreach my $correct (@corrects) { |
foreach my $correct (@corrects) { |
$correct =~s/\W//g; |
my @tied; |
|
if ($qtype[$i] eq "Ord") { |
|
if ($correct =~ /=/) { |
|
@tied = split(/=/,$correct); |
|
for (my $j=0; $j<@tied; $j++) { |
|
$tied[$j] =~ s/\W//g; |
|
} |
|
} else { |
|
$correct =~s/\W//g; |
|
} |
|
} else { |
|
$correct =~s/\W//g; |
|
} |
if ($foilformats[$i] eq "lcperiod" || $foilformats[$i] eq "lcparen" || $foilformats[$i] eq "ucparen" || $foilformats[$i] eq "ucperiod") { |
if ($foilformats[$i] eq "lcperiod" || $foilformats[$i] eq "lcparen" || $foilformats[$i] eq "ucparen" || $foilformats[$i] eq "ucperiod") { |
for (my $j=0; $j<@alphabet; $j++) { |
if (($qtype[$i] eq "Ord") && (@tied > 0)) { |
if ($alphabet[$j] eq $correct) { |
my @ties; |
push @{$answers{$k}}, $j; |
foreach my $tie (@tied) { |
last; |
for (my $j=0; $j<@alphabet; $j++) { |
|
if ($alphabet[$j] eq $tie) { |
|
push(@ties,$j); |
|
last; |
|
} |
|
} |
|
} |
|
my $ans = join('=',@ties); |
|
push(@{$answers{$k}},$ans); |
|
} else { |
|
for (my $j=0; $j<@alphabet; $j++) { |
|
if ($alphabet[$j] eq $correct) { |
|
push @{$answers{$k}}, $j; |
|
last; |
|
} |
} |
} |
} |
} |
} elsif (($foilformats[$i] eq "romparen") || ($foilformats[$i] eq "romperiod") || ($foilformats[$i] eq "romoneparen") || ($foilformats[$i] eq "romdotparen")) { |
} elsif (($foilformats[$i] eq "romparen") || ($foilformats[$i] eq "romperiod") || ($foilformats[$i] eq "romoneparen") || ($foilformats[$i] eq "romdotparen")) { |
for (my $j=0; $j<@romans; $j++) { |
if (($qtype[$i] eq "Ord") && (@tied > 0)) { |
if ($romans[$j] eq $correct) { |
my @ties; |
push @{$answers{$k}}, $j; |
foreach my $tie (@tied) { |
last; |
for (my $j=0; $j<@romans; $j++) { |
|
if ($romans[$j] eq $tie) { |
|
push(@ties,$j); |
|
last; |
|
} |
|
} |
|
} |
|
push(@{$answers{$k}},join('=',@ties)); |
|
} else { |
|
for (my $j=0; $j<@romans; $j++) { |
|
if ($romans[$j] eq $correct) { |
|
push @{$answers{$k}}, $j; |
|
last; |
|
} |
} |
} |
} |
} |
} |
} |
Line 1451 sub file_split {
|
Line 1490 sub file_split {
|
my %multparts = (); |
my %multparts = (); |
for (my $i=0; $i<$blocks; $i++) { |
for (my $i=0; $i<$blocks; $i++) { |
if (${$numsref}[$i] > 0) { |
if (${$numsref}[$i] > 0) { |
if ((${$qtyperef}[$i] eq "MC") || (${$qtyperef}[$i] eq "MA")) { |
if ((${$qtyperef}[$i] eq "MC") || (${$qtyperef}[$i] eq "MA") || (${$qtyperef}[$i] eq "Ord")) { |
my $splitstr = ''; |
my $splitstr = ''; |
if (${$foilsref}[$i] eq "lcperiod") { |
if (${$foilsref}[$i] eq "lcperiod") { |
$splitstr = '[a-z]\.'; |
$splitstr = '[a-z]\.'; |
Line 1568 sub create_mcq {
|
Line 1607 sub create_mcq {
|
<foilgroup> |
<foilgroup> |
|; |
|; |
for (my $k=0; $k<@{$qstnref}-1; $k++) { |
for (my $k=0; $k<@{$qstnref}-1; $k++) { |
$output .= " <foil location=\"random\" name=\"foil".$k."\" value=\"".$$answerref[$k]."\><startouttext />".${$qstnref}[$k+1]."<endouttext /></foil>\n"; |
my $ansval; |
|
my $num = 0; |
|
for (my $i=0; $i<@{$answerref}; $i++) { |
|
if ($$answerref[$i] =~ /=/) { |
|
my @tied = split(/=/,$$answerref[$i]); |
|
foreach my $tie (@tied) { |
|
if ($k == $tie) { |
|
$ansval = $num + 1; |
|
last; |
|
} |
|
} |
|
$num += scalar(@tied); |
|
} elsif ($k == $$answerref[$i]) { |
|
$ansval = $num + 1; |
|
last; |
|
} else { |
|
$num ++; |
|
} |
|
} |
|
$output .= " <foil location=\"random\" name=\"foil".$k."\" value=\"".$ansval."\"><startouttext />".${$qstnref}[$k+1]."<endouttext /></foil>\n"; |
} |
} |
chomp($output); |
chomp($output); |
$output .= qq| |
$output .= qq| |
Line 1666 sub create_ess {
|
Line 1724 sub create_ess {
|
<textfield></textfield> |
<textfield></textfield> |
</essayresponse> |
</essayresponse> |
<postanswerdate> |
<postanswerdate> |
|
<startouttext /> |
$answertxt |
$answertxt |
|
<endouttext /> |
</postanswerdate> |
</postanswerdate> |
</problem>|; |
</problem>|; |
} elsif ($qtype eq "TF") { |
} elsif ($qtype eq "TF") { |