version 1.314, 2009/07/03 14:52:47
|
version 1.322, 2010/11/01 16:19:49
|
Line 47 use Apache::externalresponse();
|
Line 47 use Apache::externalresponse();
|
use Apache::rankresponse(); |
use Apache::rankresponse(); |
use Apache::matchresponse(); |
use Apache::matchresponse(); |
use Apache::chemresponse(); |
use Apache::chemresponse(); |
|
use Apache::functionplotresponse(); |
use Apache::drawimage(); |
use Apache::drawimage(); |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
use Apache::loncommon(); |
use Apache::loncommon(); |
Line 111 sub get_target {
|
Line 112 sub get_target {
|
} elsif ( $env{'form.grade_target'} eq 'webgrade' |
} elsif ( $env{'form.grade_target'} eq 'webgrade' |
&& ($Apache::lonhomework::queuegrade eq 'F' )) { |
&& ($Apache::lonhomework::queuegrade eq 'F' )) { |
return ($env{'form.grade_target'}); |
return ($env{'form.grade_target'}); |
} |
} elsif ($env{'form.grade_target'} eq 'answer') { |
|
if ($env{'form.answer_output_mode'} eq 'tex') { |
|
return ($env{'form.grade_target'}); |
|
} |
|
} |
if ($env{'form.webgrade'} && |
if ($env{'form.webgrade'} && |
($Apache::lonhomework::modifygrades eq 'F' |
($Apache::lonhomework::modifygrades eq 'F' |
|| $Apache::lonhomework::queuegrade eq 'F' )) { |
|| $Apache::lonhomework::queuegrade eq 'F' )) { |
Line 170 sub setup_vars {
|
Line 175 sub setup_vars {
|
# return ';$external::target='.$target.';'; |
# return ';$external::target='.$target.';'; |
} |
} |
|
|
sub createmenu { |
|
my ($which,$request)=@_; |
|
if ($which eq 'grade') { |
|
$request->print('<script type="text/javascript" language="JavaScript"> |
|
hwkmenu=window.open("/res/adm/pages/homeworkmenu.html","homeworkremote", |
|
"height=350,width=150,menubar=no"); |
|
</script>'); |
|
} |
|
} |
|
|
|
sub proctor_checked_in { |
sub proctor_checked_in { |
my ($slot_name,$slot,$type)=@_; |
my ($slot_name,$slot,$type)=@_; |
my @possible_proctors=split(",",$slot->{'proctor'}); |
my @possible_proctors=split(",",$slot->{'proctor'}); |
Line 265 sub check_slot_access {
|
Line 260 sub check_slot_access {
|
} |
} |
if ($slotstatus eq 'NEEDS_CHECKIN' && |
if ($slotstatus eq 'NEEDS_CHECKIN' && |
&proctor_checked_in($slot_name,$returned_slot,$type)) { |
&proctor_checked_in($slot_name,$returned_slot,$type)) { |
&Apache::lonxml::debug("protoctor checked in"); |
&Apache::lonxml::debug("proctor checked in"); |
$slotstatus='CAN_ANSWER'; |
$slotstatus=$status; |
} |
} |
|
|
my ($is_correct,$got_grade,$checkedin); |
my ($is_correct,$got_grade,$checkedin); |
Line 923 sub editxmlmode {
|
Line 918 sub editxmlmode {
|
&Apache::loncommon::resize_textarea_js(). |
&Apache::loncommon::resize_textarea_js(). |
&Apache::structuretags::setmode_javascript(). |
&Apache::structuretags::setmode_javascript(). |
&Apache::lonhtmlcommon::dragmath_js("EditMathPopup"); |
&Apache::lonhtmlcommon::dragmath_js("EditMathPopup"); |
my $only_body = ($env{'environment.remote'} eq 'off')? 0 : 1; |
|
my $dragmath_button = |
my $dragmath_button = |
&Apache::lonhtmlcommon::dragmath_button("LC_editxmltext",1); |
&Apache::lonhtmlcommon::dragmath_button("LC_editxmltext",1); |
|
|
Line 936 sub editxmlmode {
|
Line 930 sub editxmlmode {
|
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page(&mt("EditXML [_1]",$file),$js, |
&Apache::loncommon::start_page(&mt("EditXML [_1]",$file),$js, |
{'no_auto_mt_title' => 1, |
{'no_auto_mt_title' => 1, |
'only_body' => $only_body, |
'only_body' => 0, |
'add_entries' => { |
'add_entries' => { |
'onresize' => q[resize_textarea('LC_editxmltext','LC_aftertextarea')], |
'onresize' => q[resize_textarea('LC_editxmltext','LC_aftertextarea')], |
'onload' => q[resize_textarea('LC_editxmltext','LC_aftertextarea')], |
'onload' => q[resize_textarea('LC_editxmltext','LC_aftertextarea')], |
Line 953 sub editxmlmode {
|
Line 947 sub editxmlmode {
|
&Apache::structuretags::remember_problem_state().' |
&Apache::structuretags::remember_problem_state().' |
<div class="LC_edit_problem_editxml_header"> |
<div class="LC_edit_problem_editxml_header"> |
<table class="LC_edit_problem_header_title"><tr><td> |
<table class="LC_edit_problem_header_title"><tr><td> |
'.&mt('Problem Editing').&Apache::loncommon::help_open_topic('Problem_Editor_XML_Index').' |
<h2>'.&mt('Problem Editing').' '.&Apache::loncommon::help_open_topic('Problem_Editor_XML_Index').'</h2> |
</td><td align="right"> |
</td><td align="right"> |
'.&Apache::loncommon::helpLatexCheatsheet('Problem_LON-CAPA_Functions','Script Functions').' |
'.&Apache::loncommon::helpLatexCheatsheet('Problem_LON-CAPA_Functions','Script Functions').' |
</td></tr> |
</td></tr> |
Line 971 sub editxmlmode {
|
Line 965 sub editxmlmode {
|
<input type="submit" name="submitbutton" accesskey="s" value="'.&mt('Save').'" /> |
<input type="submit" name="submitbutton" accesskey="s" value="'.&mt('Save').'" /> |
<input type="submit" name="submitbutton" accesskey="v" value="'.&mt('Save and View').'" /> |
<input type="submit" name="submitbutton" accesskey="v" value="'.&mt('Save and View').'" /> |
</div> |
</div> |
<hr /> |
<hr style="clear:both;" /> |
'.&Apache::lonxml::message_location().' |
'.&Apache::lonxml::message_location().' |
</div> |
</div> |
' . ' |
' . ' |
Line 1127 sub get_template_list {
|
Line 1121 sub get_template_list {
|
my $filename=$file->[0]; |
my $filename=$file->[0]; |
$filename=~s/^\/home\/httpd\/html//; |
$filename=~s/^\/home\/httpd\/html//; |
$result.=' <span class="LC_fontsize_small">' |
$result.=' <span class="LC_fontsize_small">' |
.'<a href="'.$filename.'" target="sample">'.&mt('Example').'</a>' |
.'<a href="'.$filename.'?inhibitmenu=yes" target="sample">'.&mt('Example').'</a>' |
.'</span><br />'."\n"; |
.'</span><br />'."\n"; |
$count ++; |
$count ++; |
} |
} |