--- loncom/homework/structuretags.pm 2008/06/11 13:52:35 1.423
+++ loncom/homework/structuretags.pm 2008/10/12 13:35:34 1.432
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.423 2008/06/11 13:52:35 www Exp $
+# $Id: structuretags.pm,v 1.432 2008/10/12 13:35:34 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -74,7 +74,7 @@ sub start_tex {
if ($target ne 'edit' && $target ne 'modified') {
my $bodytext=&Apache::lonxml::get_all_text("/tex",$parser,$style);
if ($target eq 'tex') {
- return $bodytext.' ';
+ return $bodytext.'{}';
}
} elsif ($target eq "edit" ) {
my $bodytext =
@@ -148,6 +148,10 @@ sub page_start {
$extra_head .= &homework_js();
+ unless ($env{'environment.wysiwygeditor'} eq 'on') {
+ $extra_head .= &Apache::lonhtmlcommon::dragmath_js();
+ }
+
my %body_args;
if (defined($found{'html'})) {
$body_args{'skip_phases'}{'head'}=1;
@@ -412,8 +416,9 @@ sub problem_web_to_edit_header {
$show_all
@@ -861,8 +866,7 @@ sub start_problem {
'';
}
if ($Apache::lonhomework::type eq 'practice') {
- $form_tag_start.=''.&mt('Practice Problem').'
'.
- ''.&mt('Submissions are not permanently recorded').'';
+ $form_tag_start.=&practice_problem_header();
}
$form_tag_start.='
'.&mt('Code ran too long. It ran for more than').' '.$Apache::lonnet::perlvar{'lonScriptTimeout'}.' '.&mt('seconds occured while running <while> on line').' '.$line.''); + &Apache::lonxml::error('
'.&mt('Code ran too long. It ran for more than').' '.$Apache::lonnet::perlvar{'lonScriptTimeout'}.' '.&mt('seconds occurred while running <while> on line').' '.$line.''); } } elsif ($target eq "edit") { $result.= &Apache::edit::tag_end($target,$token,''); @@ -1835,7 +1859,8 @@ sub start_problemtype { $result .=&Apache::edit::checked_arg('When used as type(s):','for', [ ['exam','Exam/Quiz Problem'], ['survey','Survey'], - ['problem','Homework Problem'] ] + ['problem','Homework Problem'], + ['practice','Practice Problem'] ] ,$token); $result .=&Apache::edit::end_row().&Apache::edit::start_spanning_row(); } elsif ($target eq 'modified') { @@ -1868,16 +1893,22 @@ sub end_startouttext { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; my $result=''; my $text=''; - if ($target eq 'edit') { + my $areaid = 'homework_edit_'.$Apache::lonxml::curdepth; $text=&Apache::lonxml::get_all_text("endouttext",$parser,$style); $result.=&Apache::edit::start_table($token)."