[LON-CAPA-cvs] cvs: loncom(version_2_3_X) /interface lonparmset.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 18 Jan 2007 21:14:05 -0000


albertel		Thu Jan 18 16:14:05 2007 EDT

  Modified files:              (Branch: version_2_3_X)
    /loncom/interface	lonparmset.pm 
  Log:
  - backport 1.359
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.350.2.5 loncom/interface/lonparmset.pm:1.350.2.6
--- loncom/interface/lonparmset.pm:1.350.2.5	Thu Jan 18 16:02:20 2007
+++ loncom/interface/lonparmset.pm	Thu Jan 18 16:14:04 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.350.2.5 2007/01/18 21:02:20 albertel Exp $
+# $Id: lonparmset.pm,v 1.350.2.6 2007/01/18 21:14:04 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3303,6 +3303,13 @@
     $r->print('</table>');
     return 'ok';
 }
+sub continue {
+    my $output;
+    $output .= '<form action="" method="post">';
+    $output .= '<input type="hidden" name="action" value="setrestrictmeta" />';
+    $output .= '<input type="submit" value="Continue" />';
+    return ($output);
+}
 sub addmetafield {
     my ($r)=@_;
     $r->print(&Apache::loncommon::start_page('Add Metadata Field'));
@@ -3320,9 +3327,7 @@
                                         
             $r->print('Undeleted Metadata Field <strong>'.$env{'course.'.$env{'request.course.id'}.'.metadata.'.$meta_field.'.added'}."</strong> with result ".$put_result.'<br />');
         }
-        $r->print('<form action="" method="post">');
-        $r->print('<input type="hidden" name="action" value="setrestrictmeta" />');
-        $r->print('<input type="submit" value="Continue" />');
+        $r->print(&continue());
     } elsif (exists($env{'form.fieldname'})) {
         my $meta_field = $env{'form.fieldname'};
         my $display_field = $env{'form.fieldname'};
@@ -3332,7 +3337,8 @@
                             {'metadata.'.$meta_field.'.values'=>"",
                              'metadata.'.$meta_field.'.added'=>"$display_field",
                              'metadata.'.$meta_field.'.options'=>""},$dom,$crs);
-        $r->print('Added new Metadata Field '.$env{'form.fieldname'}." with result ".$put_result);
+        $r->print('Added new Metadata Field <strong>'.$env{'form.fieldname'}."</strong> with result ".$put_result.'<br />');
+        $r->print(&continue());
     } else {
         my $fields = &get_deleted_meta_fieldnames();
         if ($fields) {