[LON-CAPA-cvs] cvs: loncom /publisher lonpublisher.pm

www www@source.lon-capa.org
Thu, 27 May 2010 18:27:43 -0000


www		Thu May 27 18:27:43 2010 EDT

  Modified files:              
    /loncom/publisher	lonpublisher.pm 
  Log:
  Clean way to cancel publication
  
  
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.265 loncom/publisher/lonpublisher.pm:1.266
--- loncom/publisher/lonpublisher.pm:1.265	Thu Dec  3 17:23:00 2009
+++ loncom/publisher/lonpublisher.pm	Thu May 27 18:27:43 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.265 2009/12/03 17:23:00 www Exp $
+# $Id: lonpublisher.pm,v 1.266 2010/05/27 18:27:43 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1223,12 +1223,14 @@
     my $intr_scrout.='<br />'
                     .'<form name="pubform" action="/adm/publish" method="post">';
     unless ($env{'form.makeobsolete'}) {
+       my $thissrc=$source;
+       $thissrc=~s{^/home/($match_username)/public_html}{/priv/$1};
        $intr_scrout.='<p class="LC_warning">'
                     .&mt('Searching for your resource will be based on the following metadata. Please provide as much data as possible.')
                     .'</p>'
                     .'<p><input type="submit" value="'
                     .&mt('Finalize Publication')
-                    .'" /></p>';
+                    .'" /> <a href="'.$thissrc.'">'.&mt('Cancel').'</a></p>';
     }
     $intr_scrout.=&Apache::lonhtmlcommon::start_pick_box();
     $intr_scrout.=