[LON-CAPA-cvs] cvs: doc /loncapafiles chkconfig.piml modify_config_files.piml ntpcheck.piml picins_check.piml rpmcheck.piml loncom/interface/statistics lonstathelpers.pm lonstudentsubmissions.pm

raeburn raeburn at source.lon-capa.org
Sat Nov 30 17:06:31 EST 2013


raeburn		Sat Nov 30 22:06:31 2013 EDT

  Modified files:              
    /loncom/interface/statistics	lonstathelpers.pm 
                                	lonstudentsubmissions.pm 
    /doc/loncapafiles	chkconfig.piml modify_config_files.piml 
                     	ntpcheck.piml picins_check.piml rpmcheck.piml 
  Log:
  - Support Fedora 20
  
  
-------------- next part --------------
Index: loncom/interface/statistics/lonstathelpers.pm
diff -u loncom/interface/statistics/lonstathelpers.pm:1.59.12.1 loncom/interface/statistics/lonstathelpers.pm:1.59.12.2
--- loncom/interface/statistics/lonstathelpers.pm:1.59.12.1	Sat Sep 11 19:08:23 2010
+++ loncom/interface/statistics/lonstathelpers.pm	Fri Nov 18 22:35:33 2011
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstathelpers.pm,v 1.59.12.1 2010/09/11 19:08:23 raeburn Exp $
+# $Id: lonstathelpers.pm,v 1.59.12.2 2011/11/18 22:35:33 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -239,11 +239,31 @@
     # Header
     $Str .= <<"END";
 <script type="text/javascript" language="JavaScript">
-    function checkall(value,seqid) {
+    function checkall(value,seqid,caller) {
+        if (caller == 'allproblems') {
+            if ((value == null ) || (value == '') || (value == undefined)) {
+                if (document.forms.$formname.allproblems.checked) {
+                    document.forms.$formname.noproblems.checked = false;
+                    value = true;
+                } else {
+                    return;
+                }
+            }
+        }
+        if (caller == 'noproblems') {
+            if ((value == null ) || (value == '') || (value == undefined)) {
+                if (document.forms.$formname.noproblems.checked) {
+                    document.forms.$formname.allproblems.checked = false;
+                    value = false;
+                } else {
+                    return; 
+                }
+            }
+        }
         for (i=0; i<document.forms.$formname.elements.length; i++) {
             ele = document.forms.$formname.elements[i];
             if (ele.name == '$inputname') {
-                if (seqid != null) {
+                if ((seqid != null) && (seqid != '') && (seqid != undefined)) {
                     itemid = document.forms.$formname.elements[i].id;
                     thing = itemid.split(':');
                     if (thing[0] == seqid) {
@@ -258,9 +278,9 @@
 </script>
 END
     $Str .= 
-        '<a href="javascript:checkall(true)">'.&mt('Select All').'</a>'.
+        '<label><input type="checkbox" name="allproblems" value="true" onclick="javascript:checkall('."'','','allproblems'".')" />'.&mt('Select All').'</label>'.
         (' 'x4).
-        '<a href="javascript:checkall(false)">'.&mt('Unselect All').'</a>';
+        '<label><input type="checkbox" name="noproblems" value="true" onclick="javascript:checkall('."'','','noproblems'".')" />'.&mt('Unselect All').'</label>';
     $Str .= $/.'<table>'.$/;
     my ($iterator,$sequence_string, at Accumulator);
     my $seq_id = 0;
@@ -271,7 +291,7 @@
         my $map = $navmap->getResourceByUrl($mapurl);
         my $firstResource = $map->map_start();
         my $lastResource = $map->map_finish();
-        $iterator = $navmap->getIterator($firstResource,$lastResource,undef,1);
+        $iterator = $navmap->getIterator($firstResource,$lastResource,sub { $_[0]->is_problem() },1);
         @Accumulator = (&new_accumulator($map->compTitle,
                                          $map->src,
                                          $map->symb,
@@ -303,9 +323,12 @@
                                                $seq_id++,
                                                $inputname));
         } elsif ($curRes->is_problem) {
+            my $is_selected;
+            if (($env{'form.allproblems'})  || (exists($selected->{$curRes->symb}))) {
+                $is_selected = 1;
+            }
             if (@Accumulator && $Accumulator[-1] ne '') {
-                &{$Accumulator[-1]}($curRes,
-                                    exists($selected->{$curRes->symb}));
+                &{$Accumulator[-1]}($curRes,$is_selected);
             }
         }
     }
Index: loncom/interface/statistics/lonstudentsubmissions.pm
diff -u loncom/interface/statistics/lonstudentsubmissions.pm:1.54.10.3 loncom/interface/statistics/lonstudentsubmissions.pm:1.54.10.4
--- loncom/interface/statistics/lonstudentsubmissions.pm:1.54.10.3	Fri Nov 18 22:20:20 2011
+++ loncom/interface/statistics/lonstudentsubmissions.pm	Fri Nov 18 22:35:33 2011
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstudentsubmissions.pm,v 1.54.10.3 2011/11/18 22:20:20 raeburn Exp $
+# $Id: lonstudentsubmissions.pm,v 1.54.10.4 2011/11/18 22:35:33 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -77,7 +77,7 @@
                                    '<div class="LC_info">'.&mt('Loading student data...').'</div>');
     $r->rflush();
     #
-    if (exists($env{'form.problemchoice'}) && 
+    if ((exists($env{'form.problemchoice'}) || (exists($env{'form.allproblems'}))) && 
         ! exists($env{'form.SelectAnother'})) {
         foreach my $button (@SubmitButtons) {
             if ($button->{'name'} eq 'break') {
@@ -95,16 +95,32 @@
         $r->print('<hr />'.$/);
         $r->rflush();
         #
+
+        #
+        # Get resource objects
+        my $navmap = Apache::lonnavmaps::navmap->new();
+
         # Determine which problems we are to analyze
         my @Symbs = 
             &Apache::lonstathelpers::get_selected_symbs('problemchoice');
+        if (defined($navmap)) {
+            if ($env{'form.allproblems'}) {
+                my $iterator = $navmap->getIterator(undef, undef, undef, 1);
+                while (my $curRes = $iterator->next()) {
+                    next if (! ref($curRes));
+                    if ($curRes->is_problem) {
+                        my $symb = $curRes->symb;
+                        unless(grep(/^\Q$symb\E$/, at Symbs)) {
+                            push(@Symbs,$symb);
+                        }
+                    }
+                }
+            }
+        }
         foreach my $selected (@Symbs) {
             $r->print('<input type="hidden" name="problemchoice" value="'.
                       $selected.'" />'.$/);
         }
-        #
-        # Get resource objects
-        my $navmap = Apache::lonnavmaps::navmap->new();
         if (!defined($navmap)) {
             $r->print('<div class="LC_error">'.&mt("Internal error").'</div>');
             return;
@@ -112,7 +128,9 @@
         my %already_seen;
         my (@Problems,$show_named);
         unless (&Apache::loncommon::needs_gci_custom()) {
-            $show_named = 1;  
+            unless ($env{'form.anonymized'} eq 'true') {
+                $show_named = 1;
+            }
         }
         foreach my $symb (@Symbs) {
             my $resource = $navmap->getBySymb($symb);
@@ -136,6 +154,9 @@
                 $threshold = 10;
             }
         }
+        unless (&Apache::loncommon::needs_gci_custom()) {
+            $threshold = 0;
+        }
         # 
         $r->print('<h4>'.
                   &Apache::lonstatistics::section_and_enrollment_description().
@@ -341,6 +362,9 @@
             $prob_span += $part_span;
         }
         my $title = $prob->compTitle;
+        unless (&Apache::loncommon::needs_gci_custom()) {
+            ($title) = ($prob->src =~ m{/([^/]+)$});
+        }
         if ($prob_span > 0) {
             $headers{'problem'}.= qq{<th colspan="$prob_span">$title</th>};
         } elsif ($single_response) {
@@ -778,6 +802,9 @@
     my %start_col;
     foreach my $prob (@$Problems) {
         my $title = $prob->compTitle;
+        unless (&Apache::loncommon::needs_gci_custom()) {
+            ($title) = ($prob->src =~ m{/([^/]+)$});
+        }
         $worksheet->write($title_row,$cols_output,
                           $title,$format->{'h3'});
         foreach my $partid (@{$prob->parts}) {
@@ -867,7 +894,7 @@
                 }
             }
         }
-        # Prepend current student's user information to all rows 
+        # Fill in the remaining rows with the students data
         for (my $row = $student_row;$row<$max_row;$row++) {
             my $cols = 0;
             foreach my $field (@StudentColumns) {
@@ -1042,7 +1069,11 @@
     foreach my $prob (@$problems) {
         my %analysis = &Apache::lonstathelpers::get_problem_data($prob->src);
         $problem_analysis{$prob->src}=\%analysis;
-        $headers{'problem'}->[$max_column] = $prob->compTitle;
+        my $title = $prob->compTitle;
+        unless (&Apache::loncommon::needs_gci_custom()) {
+            ($title) = ($prob->src =~ m{/([^/]+)$});
+        }
+        $headers{'problem'}->[$max_column] = $title;
         foreach my $partid (@{$prob->parts}) {
             $headers{'part'}->[$max_column] = $prob->part_display($partid);
             my $responses = [$prob->responseIds($partid)];
@@ -1234,7 +1265,19 @@
         $prob_status_checkbox .= 'checked="checked" ';
     }
     $prob_status_checkbox .= 'value="true" />';
-    #
+    my $anon_checkbox;
+    unless (&Apache::loncommon::needs_gci_custom()) {
+        #
+        # anonymized checkbox
+        #
+        $anon_checkbox = '<input type="checkbox" name="anonymized" ';
+        if (exists($env{'form.anonymized'}) &&
+            $env{'form.anonymized'} eq 'true') {
+            $anon_checkbox .= 'checked="checked" ';
+        }
+        $anon_checkbox .= ' value="true" />';
+    }
+
     $Str .= '<td align="right" valign="top">'.
         '<label><b>'.
         &mt('Show problem').' '.$prob_checkbox.'</b></label><br />'.
@@ -1245,8 +1288,14 @@
         '</b></label><br />'.
         '<label><b>'.
         &mt('Show problem grading').' '.$prob_status_checkbox.
-        '</b></label><br />'.
-        '</td>';
+        '</b></label><br />';
+
+    unless (&Apache::loncommon::needs_gci_custom()) {
+        $Str .= '<label><b>'.
+                &mt('Anonymized').' '.$anon_checkbox.
+                '</b></label><br />';
+    }
+    $Str .= '</td>';
     #
     $Str .= '<td align="center" valign="top">'.$output_selector.'</td>';
     #
Index: doc/loncapafiles/chkconfig.piml
diff -u doc/loncapafiles/chkconfig.piml:1.27 doc/loncapafiles/chkconfig.piml:1.28
--- doc/loncapafiles/chkconfig.piml:1.27	Mon Jul 22 22:14:22 2013
+++ doc/loncapafiles/chkconfig.piml	Sat Nov 30 22:06:31 2013
@@ -3,7 +3,7 @@
 <!-- checkconfig.piml -->
 <!-- Matthew Hall -->
 
-<!-- $Id: chkconfig.piml,v 1.27 2013/07/22 22:14:22 raeburn Exp $ -->
+<!-- $Id: chkconfig.piml,v 1.28 2013/11/30 22:06:31 raeburn Exp $ -->
 
 <!--
 
@@ -56,8 +56,8 @@
 }
 if (('<DIST />' eq 'fedora16') || ('<DIST />' eq 'fedora17') || 
     ('<DIST />' eq 'fedora18') || ('<DIST />' eq 'fedora19') ||
-    ('<DIST />' eq 'suse12.1') || ('<DIST />' eq 'suse12.2') ||
-    ('<DIST />' eq 'suse12.3')) {
+    ('<DIST />' eq 'fedora20') || ('<DIST />' eq 'suse12.1') ||
+    ('<DIST />' eq 'suse12.2') || ('<DIST />' eq 'suse12.3')) {
     $use_systemctl = 1;
 }
 exit if (! -x $checker_bin);
Index: doc/loncapafiles/modify_config_files.piml
diff -u doc/loncapafiles/modify_config_files.piml:1.23 doc/loncapafiles/modify_config_files.piml:1.24
--- doc/loncapafiles/modify_config_files.piml:1.23	Mon Jul 22 22:14:22 2013
+++ doc/loncapafiles/modify_config_files.piml	Sat Nov 30 22:06:31 2013
@@ -3,7 +3,7 @@
 <!-- modify_config_files.piml -->
 <!-- Matthew Hall -->
 
-<!-- $Id: modify_config_files.piml,v 1.23 2013/07/22 22:14:22 raeburn Exp $ -->
+<!-- $Id: modify_config_files.piml,v 1.24 2013/11/30 22:06:31 raeburn Exp $ -->
 
 <!--
 
@@ -46,7 +46,8 @@
     $configfiles = 'Apt and MySQL';
     $mysqlcmd = '/etc/init.d/mysql restart';
 } elsif (('<DIST />' eq 'fedora16') || ('<DIST />' eq 'fedora17') ||
-         ('<DIST />' eq 'fedora18') || ('<DIST />' eq 'fedora19')) {
+         ('<DIST />' eq 'fedora18') || ('<DIST />' eq 'fedora19') ||
+         ('<DIST />' eq 'fedora20')) {
     $mysqlcmd = '/bin/systemctl restart mysqld.service';  
 }
 
Index: doc/loncapafiles/ntpcheck.piml
diff -u doc/loncapafiles/ntpcheck.piml:1.19 doc/loncapafiles/ntpcheck.piml:1.20
--- doc/loncapafiles/ntpcheck.piml:1.19	Mon Jul 22 22:14:22 2013
+++ doc/loncapafiles/ntpcheck.piml	Sat Nov 30 22:06:31 2013
@@ -3,7 +3,7 @@
 <!-- ntpcheck.piml -->
 <!-- Matthew Hall -->
 
-<!-- $Id: ntpcheck.piml,v 1.19 2013/07/22 22:14:22 raeburn Exp $ -->
+<!-- $Id: ntpcheck.piml,v 1.20 2013/11/30 22:06:31 raeburn Exp $ -->
 
 <!--
 
@@ -43,7 +43,7 @@
 my $is_running;
 if (('<DIST />' eq 'fedora15') || ('<DIST />' eq 'fedora16') || 
     ('<DIST />' eq 'fedora17') || ('<DIST />' eq 'fedora18') ||
-    ('<DIST />' eq 'fedora19')) {
+    ('<DIST />' eq 'fedora19') || ('<DIST />' eq 'fedora20')) {
     $NTPD = 'ntpd';
     $startntpcmd = 'systemctl start ntpd.service';
     if (!-e '/usr/sbin/ntpd') {
@@ -85,7 +85,7 @@
 }
 if (('<DIST />' eq 'fedora15') || ('<DIST />' eq 'fedora16') || 
     ('<DIST />' eq 'fedora17') || ('<DIST />' eq 'fedora18') ||
-    ('<DIST />' eq 'fedora19')) {
+    ('<DIST />' eq 'fedora19') || ('<DIST />' eq 'fedora20')) {
     if (!-l "/etc/systemd/system/multi-user.target.wants/ntpd.service") {  
         print "**** WARNING: ntpd is not configured to run at boot.  To correct this run:\nsystemctl enable ntpd.service\n";
     }
Index: doc/loncapafiles/picins_check.piml
diff -u doc/loncapafiles/picins_check.piml:1.21 doc/loncapafiles/picins_check.piml:1.22
--- doc/loncapafiles/picins_check.piml:1.21	Mon Jul 22 22:14:22 2013
+++ doc/loncapafiles/picins_check.piml	Sat Nov 30 22:06:31 2013
@@ -3,7 +3,7 @@
 <!-- picins_check.piml -->
 <!-- Stuart Raeburn -->
 
-<!-- $Id: picins_check.piml,v 1.21 2013/07/22 22:14:22 raeburn Exp $ -->
+<!-- $Id: picins_check.piml,v 1.22 2013/11/30 22:06:31 raeburn Exp $ -->
 
 <!--
 
@@ -32,7 +32,7 @@
 <piml>
 <files>
 <file>
-<perlscript mode="fg" dist="fedora9 fedora10 fedora11 fedora12 fedora13 fedora14 fedora15 fedora16 fedora17 fedora18 fedora19 rhes6 scientific6 centos6 sles11 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3 debian5 debian6 ubuntu8 ubuntu10 ubuntu12">
+<perlscript mode="fg" dist="fedora9 fedora10 fedora11 fedora12 fedora13 fedora14 fedora15 fedora16 fedora17 fedora18 fedora19 fedora20 rhes6 scientific6 centos6 sles11 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3 debian5 debian6 ubuntu8 ubuntu10 ubuntu12">
     my $picinspath = '/usr/share/texmf/tex/latex/picins'; 
     my $file = 'picins.sty';
     if (!-e "$picinspath/$file") {
Index: doc/loncapafiles/rpmcheck.piml
diff -u doc/loncapafiles/rpmcheck.piml:1.31 doc/loncapafiles/rpmcheck.piml:1.32
--- doc/loncapafiles/rpmcheck.piml:1.31	Mon Jul 22 22:14:22 2013
+++ doc/loncapafiles/rpmcheck.piml	Sat Nov 30 22:06:31 2013
@@ -3,7 +3,7 @@
 <!-- phpcheck.piml -->
 <!-- Matthew Hall -->
 
-<!-- $Id: rpmcheck.piml,v 1.31 2013/07/22 22:14:22 raeburn Exp $ -->
+<!-- $Id: rpmcheck.piml,v 1.32 2013/11/30 22:06:31 raeburn Exp $ -->
 
 <!--
 
@@ -81,7 +81,7 @@
     }
 }
 </perlscript>
-<perlscript dist="fedora1 fedora2 fedora3 fedora4 fedora5 fedora6 fedora7 fedora8 fedora9 fedora10 fedora11 fedora12 fedora13 fedora14 fedora15 fedora16 fedora17 fedora18 fedora19 rhes5 rhes6 centos5 scientific5 scientific6 centos6 suse9.2 suse9.3 suse10.1 suse10.2 suse10.3 sles9 sles10 sles11 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3" mode="fg">
+<perlscript dist="fedora1 fedora2 fedora3 fedora4 fedora5 fedora6 fedora7 fedora8 fedora9 fedora10 fedora11 fedora12 fedora13 fedora14 fedora15 fedora16 fedora17 fedora18 fedora19 fedora20 rhes5 rhes6 centos5 scientific5 scientific6 centos6 suse9.2 suse9.3 suse10.1 suse10.2 suse10.3 sles9 sles10 sles11 suse11.1 suse11.2 suse11.3 suse11.4 suse12.1 suse12.2 suse12.3" mode="fg">
 my $hasprereqs = 0;
 if (open(PIPE,"rpm -q LONCAPA-prerequisites|")) {
     my @lines = (<PIPE>);


More information about the LON-CAPA-cvs mailing list