[LON-CAPA-cvs] cvs: loncom /homework lonhomework.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 22 Dec 2004 22:05:41 -0000


albertel		Wed Dec 22 17:05:41 2004 EDT

  Modified files:              
    /loncom/homework	lonhomework.pm 
  Log:
  - BUG#3746
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.189 loncom/homework/lonhomework.pm:1.190
--- loncom/homework/lonhomework.pm:1.189	Mon Dec 20 12:24:10 2004
+++ loncom/homework/lonhomework.pm	Wed Dec 22 17:05:40 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.189 2004/12/20 17:24:10 albertel Exp $
+# $Id: lonhomework.pm,v 1.190 2004/12/22 22:05:40 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -115,7 +115,8 @@
 		} else {
 		    return ('web','answer');
 		}
-	    } elsif ( $ENV{'form.problemmode'} eq &mt('Edit') ) {
+	    } elsif ( $ENV{'form.problemmode'} eq &mt('Edit') ||
+		      $ENV{'form.problemmode'} ee 'Edit') {
 		if ( $ENV{'form.submitted'} eq 'edit' ) {
 		    if ( $ENV{'form.submit'} eq &mt('Submit Changes and View') ) {
 			return ('modified','web','answer');
@@ -821,7 +822,8 @@
 	    if ( &Apache::lonnet::mod_perl_version() == 2 ) {
 		&Apache::lonnet::cleanenv();
 	    }
-	    $request->internal_redirect('/adm/ambiguous'); return;
+	    &Apache::lonnet::logthis(&Apache::lonnet::mod_perl_version());
+	    $request->internal_redirect('/adm/ambiguous'); return OK;
 	}
     }
     if (&setupheader($request)) { return OK; }
@@ -846,7 +848,8 @@
 		#&view_or_edit_menu($request);
 		$ENV{'form.problemmode'}='View';
 		&renderpage($request,$file);
-	    } elsif ($ENV{'form.problemmode'} eq &mt('EditXML')) {
+	    } elsif ($ENV{'form.problemmode'} eq &mt('EditXML') ||
+		     $ENV{'form.problemmode'} eq 'EditXML' {
 		&editxmlmode($request,$file);
 	    } elsif ($ENV{'form.problemmode'} eq &mt('Calculate answers')) {
 		&analyze($request,$file);