--- loncom/homework/structuretags.pm 2012/02/01 18:51:52 1.465.2.14.2.1 +++ loncom/homework/structuretags.pm 2010/12/18 22:49:33 1.479 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.465.2.14.2.1 2012/02/01 18:51:52 raeburn Exp $ +# $Id: structuretags.pm,v 1.479 2010/12/18 22:49:33 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -128,17 +128,8 @@ sub homework_js { &setmode_javascript(). <<'JS'; JS } @@ -162,55 +153,49 @@ JS sub setmode_javascript { return <<"ENDSCRIPT"; ENDSCRIPT } sub file_delchk_js { - my $delfilewarn = &mt('You have indicated you wish to remove some files previously included in your submission.').'\\n'. - &mt('Continue submission with these files removed?'); + my $delfilewarn = &mt('You have indicated you wish to delete some files previously included for submission.').'\\n'. + &mt('Deleted files will not be graded.').' '. + &mt('Submit Answer?'); return <<"ENDSCRIPT"; ENDSCRIPT } @@ -268,9 +253,6 @@ sub page_start { } elsif (!defined($found{'body'}) && $env{'request.state'} eq 'construct') { if ($target eq 'web' || $target eq 'edit') { - if ($env{'environment.remote'} ne 'off') { - $body_args{'only_body'} = 1; - } # Breadcrumbs for Construction Space &Apache::lonhtmlcommon::clear_breadcrumbs(); &Apache::lonhtmlcommon::add_breadcrumb({ @@ -304,8 +286,7 @@ sub page_start { # $body_args{'no_title'} = 1; $body_args{'force_register'} = 1; $body_args{'add_entries'} = \%add_entries; - if ($env{'environment.remote'} eq 'off' - && $env{'request.state'} eq 'construct') { + if ( $env{'request.state'} eq 'construct') { $body_args{'only_body'} = 1; } } @@ -406,13 +387,12 @@ sub setup_rndseed { } $env{'form.rndseed'}=$rndseed; } - if (($env{'request.state'} eq "construct") && + if (($env{'request.state'} eq "construct") && ($Apache::lonhomework::type eq 'randomizetry')) { my $tries = $Apache::lonhomework::history{"resource.$Apache::inputtags::part.tries"}; if ($tries) { $rndseed += $tries; } - $env{'form.'.$Apache::inputtags::part.'.rndseed'}=$rndseed; } if ( ($env{'form.resetdata'} eq &mt('New Problem Variation') && $env{'form.submitted'} eq 'yes') || @@ -476,48 +456,27 @@ sub remember_problem_state { '; } -sub problem_edit_action_button { - my ($name,$action,$accesskey,$text,$flag)=@_; - my $actionscript="setmode(this.form,'$action')"; - return "\n"; -} - sub problem_edit_buttons { - my ($mode)=@_; -# Buttons that do not save - my $result='