version 1.405, 2007/10/17 00:22:51
|
version 1.406, 2007/10/30 00:09:30
|
Line 332 sub option {
|
Line 332 sub option {
|
|
|
sub problem_web_to_edit_header { |
sub problem_web_to_edit_header { |
my ($rndseed)=@_; |
my ($rndseed)=@_; |
my $result.='<input type="hidden" name="problemmode" value="'.&mt('View').'" />'; |
my $result .= '<div class="LC_edit_problem_header">'; |
|
|
|
$result.='<div class="LC_edit_problem_header_edit_row">'; |
|
$result.='<input type="hidden" name="problemmode" value="'.&mt('View').'" />'; |
$result .= '<input type="submit" name="problemmode" accesskey="e" value="'.&mt('Edit').'" />'; |
$result .= '<input type="submit" name="problemmode" accesskey="e" value="'.&mt('Edit').'" />'; |
$result .= '<input type="submit" name="problemmode" accesskey="x" value="'.&mt('EditXML').'" /> |
$result .= '<input type="submit" name="problemmode" accesskey="x" value="'.&mt('EditXML').'" />'; |
<input type="submit" name="newrandomization" accesskey="a" value="'.&mt('New Randomization').'" /> |
$result.='</div>'; |
<input type="submit" name="resetdata" accesskey="r" value="'.&mt('Reset Submissions').'" /> |
|
<nobr><input type="submit" name="changerandseed" value="'.&mt('Change Random Seed To:').'" /> |
if (!$Apache::lonhomework::parsing_a_task) { |
<input type="text" name="rndseed" size="10" value="'. |
$result .= |
$rndseed.'" |
'<div class="LC_edit_problem_header_title">'. |
onchange="javascript:document.lonhomework.changerandseed.click()" /></nobr> |
&mt('Problem Testing'). |
<span class="LC_nobreak"><label><input type="checkbox" name="showallfoils" '; |
&Apache::loncommon::help_open_topic('Problem_Editor_Testing_Area'). |
|
'</div>'; |
|
} else { |
|
$result .= |
|
'<div class="LC_edit_problem_header_title">'. |
|
&mt('Task Testing'). |
|
'</div>'; |
|
} |
|
|
my $show_all_foils_text = |
my $show_all_foils_text = |
($Apache::lonhomework::parsing_a_task) ? |
($Apache::lonhomework::parsing_a_task) ? |
&mt(' Show All Instances') |
&mt(' Show All Instances') |
: &mt(' Show All Foils'); |
: &mt(' Show All Foils'); |
|
|
if (defined($env{'form.showallfoils'})) { $result.='checked="on"'; } |
my $show_all= '<span class="LC_nobreak"><label><input type="checkbox" name="showallfoils" '; |
$result.= ' />'.$show_all_foils_text.'</label></span>'. |
if (defined($env{'form.showallfoils'})) { $show_all.='checked="checked"'; } |
&Apache::loncommon::help_open_topic('Problem_Editor_Testing_Area','Testing Problems'). |
$show_all.= ' />'.$show_all_foils_text.'</label></span>'; |
'<hr />'; |
|
$result.=&mt('Apply style file: ').' |
|
<input type="text" name="style_file" value="'.&HTML::Entities::encode($env{'construct.style'},'"<>&').'" /> |
|
<a href="javascript:openbrowser(\'lonhomework\',\'style_file\',\'sty\')">'.&mt('Select').'</a> |
|
<input type="submit" name="clear_style_file" value="'.&mt('Clear').'" /> |
|
<br />'; |
|
|
|
|
|
|
|
|
$result .= '<div class="LC_edit_problem_header_status_row">'; |
if (!$Apache::lonhomework::parsing_a_task) { |
if (!$Apache::lonhomework::parsing_a_task) { |
$result.=" |
$result.=" |
<nobr> |
<div class='LC_edit_problem_header_row1'> |
|
<span class=\"LC_nobreak\"> |
".&mt("Problem Status:")." |
".&mt("Problem Status:")." |
<select name='problemstate'> |
<select name='problemstate'> |
<option value=''></option> |
<option value=''></option> |
Line 369 sub problem_web_to_edit_header {
|
Line 378 sub problem_web_to_edit_header {
|
".&option('CANNOT_ANSWER_correct','problemstate').&mt("Open and correct")."</option> |
".&option('CANNOT_ANSWER_correct','problemstate').&mt("Open and correct")."</option> |
".&option('SHOW_ANSWER' ,'problemstate').&mt("Show Answer")."</option> |
".&option('SHOW_ANSWER' ,'problemstate').&mt("Show Answer")."</option> |
</select> |
</select> |
</nobr> |
</span> |
<nobr> |
<span class=\"LC_nobreak\"> |
".&mt("Problem Type:")." |
".&mt("Problem Type:")." |
<select name='problemtype'> |
<select name='problemtype'> |
<option value=''></option> |
<option value=''></option> |
Line 378 sub problem_web_to_edit_header {
|
Line 387 sub problem_web_to_edit_header {
|
".&option('problem','problemtype').&mt("Homework problem")."</option> |
".&option('problem','problemtype').&mt("Homework problem")."</option> |
".&option('survey' ,'problemtype').&mt("Survey Question")."</option> |
".&option('survey' ,'problemtype').&mt("Survey Question")."</option> |
</select> |
</select> |
</nobr> |
</span> |
<nobr> |
$show_all |
|
</div> |
|
<div class='LC_edit_problem_header_row2'> |
|
<span class=\"LC_nobreak\"> |
".&mt("Feedback Mode:")." |
".&mt("Feedback Mode:")." |
<select name='problemstatus'> |
<select name='problemstatus'> |
<option value=''></option> |
<option value=''></option> |
Line 387 sub problem_web_to_edit_header {
|
Line 399 sub problem_web_to_edit_header {
|
".&option('no', 'problemstatus').&mt("Don't Show Incorect/Correct Feedback")."</option> |
".&option('no', 'problemstatus').&mt("Don't Show Incorect/Correct Feedback")."</option> |
".&option('no_feedback_ever', 'problemstatus').&mt("Don't Show Any Feedback")."</option> |
".&option('no_feedback_ever', 'problemstatus').&mt("Don't Show Any Feedback")."</option> |
</select> |
</select> |
</nobr> |
</span> |
<input type='submit' name='changeproblemmode' value='".&mt("Change")."' /> |
"; |
<hr />"; |
|
my $numtoanalyze=$env{'form.numtoanalyze'}; |
|
if (!$numtoanalyze) { $numtoanalyze=20; } |
|
$result.= '<input type="submit" name="problemmode" value='. |
|
&mt('"Calculate answers').'" /> for |
|
<input type="text" name="numtoanalyze" value="'. |
|
$numtoanalyze.'" size="5" /> '.&mt('versions of this problem'). |
|
'.'.&Apache::loncommon::help_open_topic("Analyze_Problem", |
|
'',undef,undef,300). |
|
'<hr />'; |
|
} elsif ($Apache::lonhomework::parsing_a_task) { |
} elsif ($Apache::lonhomework::parsing_a_task) { |
$result.=" |
$result.=" |
<nobr> |
<div class='LC_edit_problem_header_row1'> |
|
<span class=\"LC_nobreak\"> |
".&mt("Problem Status:")." |
".&mt("Problem Status:")." |
<select name='problemstate'> |
<select name='problemstate'> |
<option value=''></option> |
<option value=''></option> |
Line 410 sub problem_web_to_edit_header {
|
Line 414 sub problem_web_to_edit_header {
|
".&option('WEB_GRADE' ,'problemstate').&mt("Criteria Grading")."</option> |
".&option('WEB_GRADE' ,'problemstate').&mt("Criteria Grading")."</option> |
".&option('SHOW_ANSWER' ,'problemstate').&mt("Show Feedback")."</option> |
".&option('SHOW_ANSWER' ,'problemstate').&mt("Show Feedback")."</option> |
</select> |
</select> |
</nobr> |
</span> |
<input type='submit' name='changeproblemmode' value='".&mt("Change")."' /> |
$show_all |
<hr />"; |
"; |
} |
} |
|
|
|
$result.=' |
|
<span class="LC_nobreak"> |
|
'.&mt('Apply style file: ').' |
|
<input type="text" name="style_file" value="'.&HTML::Entities::encode($env{'construct.style'},'"<>&').'" /> |
|
<a href="javascript:openbrowser(\'lonhomework\',\'style_file\',\'sty\')">'.&mt('Select').'</a> |
|
</span> |
|
</div> |
|
<input type="submit" name="changeproblemmode" value="'.&mt("Change View").'" /> |
|
<input type="submit" name="clear_style_file" accesskey="d" value="'.&mt('Show Default View').'" /> |
|
<input type="submit" name="resetdata" accesskey="r" value="'.&mt('Reset Submissions').'" /> |
|
</div> |
|
<hr class="LC_edit_problem_divide" /> |
|
<div class="LC_edit_problem_header_randomize_row"> |
|
<input type="submit" name="newrandomization" accesskey="a" value="'.&mt('New Randomization').'" /> |
|
<input type="submit" name="changerandseed" value="'.&mt('Change Random Seed To:').'" /> |
|
<input type="text" name="rndseed" size="10" value="'. |
|
$rndseed.'" |
|
onchange="javascript:document.lonhomework.changerandseed.click()" />'; |
|
|
|
if (!$Apache::lonhomework::parsing_a_task) { |
|
my $numtoanalyze=$env{'form.numtoanalyze'}; |
|
if (!$numtoanalyze) { $numtoanalyze=20; } |
|
$result .= &mt('[_1] for [_2] versions of this problem.', |
|
'<input type="submit" name="problemmode" value='.&mt('"Calculate answers').'" />', |
|
'<input type="text" name="numtoanalyze" value="'. |
|
$numtoanalyze.'" size="5" />'). |
|
&Apache::loncommon::help_open_topic("Analyze_Problem", |
|
'',undef,undef,300); |
|
} |
|
|
|
$result.=' |
|
</div> |
|
<hr class="LC_edit_problem_divide" /> |
|
</div>'; |
return $result; |
return $result; |
} |
} |
|
|