[LON-CAPA-cvs] cvs: loncom /html/adm/helper newslot.helper

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 02 Nov 2005 22:14:53 -0000


albertel		Wed Nov  2 17:14:53 2005 EDT

  Modified files:              
    /loncom/html/adm/helper	newslot.helper 
  Log:
  - uniquefy the list of proctor names
  
  
Index: loncom/html/adm/helper/newslot.helper
diff -u loncom/html/adm/helper/newslot.helper:1.7 loncom/html/adm/helper/newslot.helper:1.8
--- loncom/html/adm/helper/newslot.helper:1.7	Wed Nov  2 17:07:52 2005
+++ loncom/html/adm/helper/newslot.helper	Wed Nov  2 17:14:53 2005
@@ -229,7 +229,9 @@
 		my ($uname,$udomain)=split(/:/,$user);
 		push(@names,"$uname\@$udomain");
 	    }
-	    $slot{'proctor'}=join(',',@names);
+	    # make sure the usenrmaes are unique
+	    my %proctors = map { ($_,1) } @names;
+	    $slot{'proctor'}=join(',',sort(keys(%proctors)));
 	}
         my $cname = $env{'course.'.$env{'request.course.id'}.'.num'};
         my $cdom  = $env{'course.'.$env{'request.course.id'}.'.domain'};