--- loncom/homework/structuretags.pm 2010/12/20 21:40:55 1.465.2.8 +++ loncom/homework/structuretags.pm 2011/02/06 18:43:10 1.487 @@ -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.8 2010/12/20 21:40:55 raeburn Exp $ +# $Id: structuretags.pm,v 1.487 2011/02/06 18:43:10 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -128,6 +128,7 @@ sub homework_js { &setmode_javascript(). <<'JS'; JS } @@ -153,49 +154,55 @@ JS sub setmode_javascript { return <<"ENDSCRIPT"; ENDSCRIPT } sub file_delchk_js { - 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?'); + 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?'); return <<"ENDSCRIPT"; ENDSCRIPT } @@ -253,9 +260,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({ @@ -289,8 +293,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; } } @@ -391,7 +394,7 @@ 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) { @@ -461,27 +464,48 @@ 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 { - return ' -