[LON-CAPA-cvs] cvs: loncom /interface lonsyllabus.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 01 Aug 2006 13:55:07 -0000


albertel		Tue Aug  1 09:55:07 2006 EDT

  Modified files:              
    /loncom/interface	lonsyllabus.pm 
  Log:
  - validate that the course to be editted is the current course
  
  
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.52 loncom/interface/lonsyllabus.pm:1.53
--- loncom/interface/lonsyllabus.pm:1.52	Thu May 11 12:29:20 2006
+++ loncom/interface/lonsyllabus.pm	Tue Aug  1 09:55:07 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Syllabus
 #
-# $Id: lonsyllabus.pm,v 1.52 2006/05/11 16:29:20 www Exp $
+# $Id: lonsyllabus.pm,v 1.53 2006/08/01 13:55:07 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -177,7 +177,9 @@
 # ----------------------------------------------------- Only if not public call
     if ($env{'user.environment'}) {
 # does this user have privileges to post, etc?
-       if ($env{'request.course.id'}) {
+       if ($env{'request.course.id'}
+	   && $cdom eq $env{'course.'.$env{'request.course.id'}.'.domain'}
+	   && $cnum eq $env{'course.'.$env{'request.course.id'}.'.num'}) {
           $allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'});
 	  $privileged=$allowed;
 	  if (($syllabus{'uploaded.lastmodified'}) && (!$forceedit)) {