[LON-CAPA-cvs] cvs: modules /msu localstudentphoto.pm
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Fri, 04 Jan 2008 18:56:28 -0000
raeburn Fri Jan 4 13:56:28 2008 EDT
Modified files:
/modules/msu localstudentphoto.pm
Log:
- read-only permission in studentphoto source being preserved during copy.
- make the destination file writable, so it can be updated when a newer one is available in the institutional source.
Index: modules/msu/localstudentphoto.pm
diff -u modules/msu/localstudentphoto.pm:1.3 modules/msu/localstudentphoto.pm:1.4
--- modules/msu/localstudentphoto.pm:1.3 Mon Jul 17 14:04:07 2006
+++ modules/msu/localstudentphoto.pm Fri Jan 4 13:56:28 2008
@@ -1,6 +1,6 @@
# The LON-CAPA dummy student photo fetch mechnism
#
-# $Id: localstudentphoto.pm,v 1.3 2006/07/17 18:04:07 albertel Exp $
+# $Id: localstudentphoto.pm,v 1.4 2008/01/04 18:56:28 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -149,8 +149,12 @@
}
my $dest=$userdir.$filepath;
my $dest_tn=$userdir.$thumbnail;
+ if (-e "$dest") {
+ system('/bin/chmod','0600',"$dest");
+ }
$errorcode=system("/bin/cp $source $dest");
unless ($errorcode) {
+ system('/bin/chmod','0600',"$dest");
my ($fullsize,$thumbsize)=&localstudentphoto::thumbsettings($udom);
if ($fullsize && $thumbsize) {
system("convert -size $fullsize $dest -thumbnail $thumbsize $dest_tn");