[LON-CAPA-cvs] cvs: loncom /enrollment Enrollment.pm /interface londropadd.pm lonpopulate.pm /lonnet/perl lonnet.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Wed, 08 Feb 2006 23:47:27 -0000


This is a MIME encoded message

--raeburn1139442447
Content-Type: text/plain

raeburn		Wed Feb  8 18:47:27 2006 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
    /loncom/interface	lonpopulate.pm londropadd.pm 
    /loncom/enrollment	Enrollment.pm 
  Log:
  $env{'internal.studentphotos'} -> $env{'internal.studentphoto'} Previous settings will now be ignored and course owners will have to indicate agreement to conditions of use of student photos, before being able to use them in a course.
  
  
--raeburn1139442447
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20060208184727.txt"

Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.707 loncom/lonnet/perl/lonnet.pm:1.708
--- loncom/lonnet/perl/lonnet.pm:1.707	Tue Feb  7 11:21:05 2006
+++ loncom/lonnet/perl/lonnet.pm	Wed Feb  8 18:47:00 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.707 2006/02/07 16:21:05 albertel Exp $
+# $Id: lonnet.pm,v 1.708 2006/02/08 23:47:00 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -948,7 +948,7 @@
     my ($udom,$unam,$ext) = @_;
     my $home=&Apache::lonnet::homeserver($unam,$udom);
     if (defined($env{'request.course.id'})) {
-        if ($env{'course.'.$env{'request.course.id'}.'.internal.showphotos'}) {
+        if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) {
             if ($udom eq $env{'course.'.$env{'request.course.id'}.'.domain'}) {
                 return(&retrievestudentphoto($udom,$unam,$ext)); 
             } else {
Index: loncom/interface/lonpopulate.pm
diff -u loncom/interface/lonpopulate.pm:1.36 loncom/interface/lonpopulate.pm:1.37
--- loncom/interface/lonpopulate.pm:1.36	Tue Feb  7 17:15:56 2006
+++ loncom/interface/lonpopulate.pm	Wed Feb  8 18:47:23 2006
@@ -1,5 +1,5 @@
 # automated enrollment configuration handler
-# $Id: lonpopulate.pm,v 1.36 2006/02/07 22:15:56 raeburn Exp $
+# $Id: lonpopulate.pm,v 1.37 2006/02/08 23:47:23 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -866,7 +866,7 @@
                   <table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">
                    <tr>
                     <td align=\"left\"><b>$$tasktitleref{$action}</b><br/>
-                       Currently: Student photo import:  <i>$photosets[$enrollvar{showphotos}]</i>
+                       Currently: Student photo import:  <i>$photosets[$enrollvar{showphoto}]</i>
                     </td>
                    </tr>
                   </table>
@@ -876,7 +876,7 @@
                          Automatic import of student photos from institutional data repository:&nbsp;&nbsp;
 
       ");
-      if ($enrollvar{showphotos}) {
+      if ($enrollvar{showphoto}) {
           $r->print("
                         <input type=\"radio\" name=\"showphotos\" value=\"1\" checked=\"true\" />&nbsp;Yes&nbsp;&nbsp;&nbsp;
                         <input type=\"radio\" name=\"showphotos\" value=\"0\" />&nbsp;No
@@ -1021,7 +1021,7 @@
                      <td align=\"left\"><b>$$tasktitleref{$action}</b>
                      </td>
                     </tr><tr><td>");
-      if ($enrollvar{'showphotos'}) {
+      if ($enrollvar{'showphoto'}) {
           my ($update,$commentary) = &Apache::lonnet::auto_photochoice($crs,
 								       $dom);
           $r->print('<br />'.$commentary.'<br /><br />
@@ -2114,7 +2114,7 @@
     my %settings = &Apache::lonnet::get('environment',
 					['internal.courseowner',
 					 'internal.photopermission',
-					 'internal.showphotos'],
+					 'internal.showphoto'],
 					$dom,$crs);
     my ($showphotos,$response);
     if (exists($env{'form.cancel_agreement'})) {
@@ -2248,9 +2248,9 @@
             }
         }
     }
-    my %settings = &Apache::lonnet::get('environment',['internal.showphotos'],
+    my %settings = &Apache::lonnet::get('environment',['internal.showphoto'],
 					$dom,$crs);
-    my $currphotos = $settings{'internal.showphotos'};
+    my $currphotos = $settings{'internal.showphoto'};
     my $response = "";
     if (defined($photopermission)) {
         if ($photopermission eq 'yes') {
@@ -2260,7 +2260,7 @@
             $showphotos = 0;
         }
     }
-    my %cenv = ('internal.showphotos' => $showphotos);
+    my %cenv = ('internal.showphoto' => $showphotos);
     my $reply = &Apache::lonnet::put('environment',\%cenv,$dom,$crs);
     if ($reply !~ /^ok$/) {
 	$response .= "There was a problem processing your requested change. The student photo retrieval setting for this course has been left unchanged.<br/>";
@@ -2392,11 +2392,11 @@
     my $logmsg = '';
     my $newusermsg = '';
     my %phototypes = ();
-    my %settings = &Apache::lonnet::get('environment',['internal.coursecode','internal.sectionnums','internal.crosslistings','internal.authtype','internal.autharg','internal.showphotos'],$dom,$crs);
+    my %settings = &Apache::lonnet::get('environment',['internal.coursecode','internal.sectionnums','internal.crosslistings','internal.authtype','internal.autharg','internal.showphoto'],$dom,$crs);
     my $coursecode = $settings{'internal.coursecode'};
     my $authtype = $settings{'internal.authtype'};
     my $autharg = $settings{'internal.autharg'};
-    my $showphotos = $settings{'internal.showphotos'};
+    my $showphotos = $settings{'internal.showphoto'};
     my ($startaccess,$endaccess) = &get_dates_from_form();
     if ( exists($env{'form.updateadds'}) ) {
         $updateadds = $env{'form.updateadds'};
Index: loncom/interface/londropadd.pm
diff -u loncom/interface/londropadd.pm:1.135 loncom/interface/londropadd.pm:1.136
--- loncom/interface/londropadd.pm:1.135	Tue Feb  7 11:21:26 2006
+++ loncom/interface/londropadd.pm	Wed Feb  8 18:47:23 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to drop and add students in courses 
 #
-# $Id: londropadd.pm,v 1.135 2006/02/07 16:21:26 albertel Exp $
+# $Id: londropadd.pm,v 1.136 2006/02/08 23:47:23 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1295,7 +1295,7 @@
 <input type="hidden" name="sdom"   value="" />
 END
         }
-        if ($env{'course.'.$env{'request.course.id'}.'.internal.showphotos'}) {
+        if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) {
             $r->print('
 <script type="text/javascript">
 function photowindow(photolink) {
@@ -1339,7 +1339,7 @@
        <a href="javascript:document.studentform.sortby.value='end';document.studentform.submit();">$lt{'end'}</a>
     </th>
 END
-        if ($env{'course.'.$env{'request.course.id'}.'.internal.showphotos'}) {
+        if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) {
             my %photo_options = &Apache::lonlocal::texthash(
                                                             'on' => 'Show',
                                                             'off' => 'Hide',
@@ -1494,7 +1494,7 @@
     <td>$end</td>
 END
             if ($env{'course.'.$env{'request.course.id'}.
-			 '.internal.showphotos'}) {
+			 '.internal.showphoto'}) {
                 if ($displayphotos eq 'on') {
                     my $imgurl = 
 			&Apache::lonnet::retrievestudentphoto($domain,
Index: loncom/enrollment/Enrollment.pm
diff -u loncom/enrollment/Enrollment.pm:1.30 loncom/enrollment/Enrollment.pm:1.31
--- loncom/enrollment/Enrollment.pm:1.30	Tue Feb  7 12:56:41 2006
+++ loncom/enrollment/Enrollment.pm	Wed Feb  8 18:47:26 2006
@@ -1,5 +1,5 @@
 # Automated Enrollment manager
-# $Id: Enrollment.pm,v 1.30 2006/02/07 17:56:41 raeburn Exp $
+# $Id: Enrollment.pm,v 1.31 2006/02/08 23:47:26 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -326,7 +326,7 @@
                     } else {
                         &execute_add($context,'newstudent',$uname,$dom,$auth,$authparam,$first,$middle,$last,$gene,$pid,$usec,$end,$start,$emailenc,$cid,\$addresult,\$enrollcount,$linefeed,$logmsg);
                     }
-                    if ($courseinfo{'showphotos'}) {
+                    if ($courseinfo{'showphoto'}) {
                         my ($result,$resulttype) = 
                            &Apache::lonnet::auto_checkphotos($uname,$dom,$pid);
                         if ($resulttype) {
@@ -337,7 +337,7 @@
             }
         }
     }
-    if ($courseinfo{'showphotos'}) {
+    if ($courseinfo{'showphoto'}) {
         if (keys(%{$phototypes})>0) {
             my %lt = &photo_response_types();
             foreach my $type (sort(keys(%{$phototypes}))) {
@@ -826,15 +826,15 @@
     my ($dom,$crs,$courseinfo) = @_;
     my $owner;
     if (defined($dom) && defined($crs)) {
-        my %settings = &Apache::lonnet::get('environment',['internal.coursecode','internal.showphotos','description'],$dom,$crs);
+        my %settings = &Apache::lonnet::get('environment',['internal.coursecode','internal.showphoto','description'],$dom,$crs);
         if ( defined($settings{'internal.coursecode'}) ) {
             $$courseinfo{'inst_code'} = $settings{'internal.coursecode'};
         }
         if ( defined($settings{'description'}) ) {
             $$courseinfo{'description'} = $settings{'description'};
         }
-        if ( defined($settings{'internal.showphotos'}) ) {
-            $$courseinfo{'showphotos'} = $settings{'internal.showphotos'};
+        if ( defined($settings{'internal.showphoto'}) ) {
+            $$courseinfo{'showphoto'} = $settings{'internal.showphoto'};
         }
     }
     return;

--raeburn1139442447--