version 1.548, 2016/04/04 17:24:18
|
version 1.550, 2016/09/14 02:42:43
|
Line 419 sub page_start {
|
Line 419 sub page_start {
|
$extra_head .= &homework_js(). |
$extra_head .= &homework_js(). |
&Apache::lonhtmlcommon::dragmath_js("EditMathPopup"); |
&Apache::lonhtmlcommon::dragmath_js("EditMathPopup"); |
if (&Apache::lonhtmlcommon::htmlareabrowser()) { |
if (&Apache::lonhtmlcommon::htmlareabrowser()) { |
my %textarea_args = ( |
my %textarea_args; |
|
if (($env{'request.state'} ne 'construct') || |
|
($env{'environment.nocodemirror'})) { |
|
%textarea_args = ( |
dragmath => 'math', |
dragmath => 'math', |
); |
); |
|
} |
$extra_head .= &Apache::lonhtmlcommon::htmlareaselectactive(\%textarea_args); |
$extra_head .= &Apache::lonhtmlcommon::htmlareaselectactive(\%textarea_args); |
} |
} |
my $is_task = ($env{'request.uri'} =~ /\.task$/); |
my $is_task = ($env{'request.uri'} =~ /\.task$/); |
Line 774 sub problem_edit_buttons {
|
Line 778 sub problem_edit_buttons {
|
if ($mode eq 'editxml') { |
if ($mode eq 'editxml') { |
$result.=&problem_edit_action_button('subedit','edit','e','Edit',1); |
$result.=&problem_edit_action_button('subedit','edit','e','Edit',1); |
$result.=&problem_edit_action_button('subundo','undoxml','u','Undo',1); |
$result.=&problem_edit_action_button('subundo','undoxml','u','Undo',1); |
$result.=&Apache::lonhtmlcommon::dragmath_button("LC_editxmltext",1); |
if ($env{'environment.nocodemirror'}) { |
|
$result.=&Apache::lonhtmlcommon::dragmath_button("LC_editxmltext",1); |
|
} |
} else { |
} else { |
$result.=&problem_edit_action_button('subeditxml','editxml','x','EditXML',1); |
$result.=&problem_edit_action_button('subeditxml','editxml','x','EditXML',1); |
$result.=&problem_edit_action_button('subundo','undo','u','Undo',1); |
$result.=&problem_edit_action_button('subundo','undo','u','Undo',1); |
Line 1605 sub start_problem {
|
Line 1611 sub start_problem {
|
} elsif (($env{'request.state'} ne "construct") && |
} elsif (($env{'request.state'} ne "construct") && |
($Apache::lonhomework::type eq 'randomizetry') && |
($Apache::lonhomework::type eq 'randomizetry') && |
($status eq 'CAN_ANSWER') && |
($status eq 'CAN_ANSWER') && |
($env{'course.'.$env{'request.course.id'}.'.type'} ne 'Placement')) { |
($env{'course.'.$env{'request.course.id'}.'.type'} ne 'Placement') && |
# "New Problem Variation Each Try" header suppressed for Placement Tests. |
(!$env{'request.role.adv'})) { |
|
# "New Problem Variation Each Try" header suppressed for Placement Tests, unless course personnel. |
my $reqtries = &Apache::lonnet::EXT("resource.$Apache::inputtags::part.randomizeontries"); |
my $reqtries = &Apache::lonnet::EXT("resource.$Apache::inputtags::part.randomizeontries"); |
my $problemstatus = &get_problem_status($Apache::inputtags::part); |
my $problemstatus = &get_problem_status($Apache::inputtags::part); |
$form_tag_start.=&randomizetry_problem_header($problemstatus,$reqtries); |
$form_tag_start.=&randomizetry_problem_header($problemstatus,$reqtries); |
Line 1937 sub end_problem {
|
Line 1944 sub end_problem {
|
if (ref($navmap)) { |
if (ref($navmap)) { |
my $hastries = &Apache::lonplacementtest::has_tries($symb,$navmap); |
my $hastries = &Apache::lonplacementtest::has_tries($symb,$navmap); |
# For Placement Tests test status is displayed if this is the last resource in the course |
# For Placement Tests test status is displayed if this is the last resource in the course |
# and there are no tries left; |
# and there are no tries left |
unless ($hastries) { |
unless ($hastries) { |
if (&Apache::lonplacementtest::is_lastres($symb,$navmap)) { |
if (&Apache::lonplacementtest::is_lastres($symb,$navmap)) { |
my ($score,$incomplete) = |
my ($score,$incomplete) = |
Line 3002 sub end_startouttext {
|
Line 3009 sub end_startouttext {
|
.'<td><span class="LC_nobreak">'.&mt('Delete?').' ' |
.'<td><span class="LC_nobreak">'.&mt('Delete?').' ' |
.&Apache::edit::deletelist($target,$token) |
.&Apache::edit::deletelist($target,$token) |
.'</span></td>' |
.'</span></td>' |
.'<td><span id="math_'.$areaid.'">' |
.'<td><span id="math_'.$areaid.'">'; |
.&Apache::lonhtmlcommon::dragmath_button($areaid,1) |
if ($env{'environment.nocodemirror'}) { |
.'</span></td>' |
$result.=&Apache::lonhtmlcommon::dragmath_button($areaid,1); |
|
} else { |
|
$result.=' '; |
|
} |
|
$result.='</span></td>' |
.'<td>' |
.'<td>' |
.&Apache::edit::insertlist($target,$token) |
.&Apache::edit::insertlist($target,$token) |
.'</td>' |
.'</td>' |