Diff for /loncom/interface/loncoursedata.pm between versions 1.67 and 1.70

version 1.67, 2003/04/09 14:51:29 version 1.70, 2003/04/21 15:12:37
Line 137  sub get_sequence_assessment_data { Line 137  sub get_sequence_assessment_data {
     # We need to keep track of which sequences contain homework problems      # We need to keep track of which sequences contain homework problems
     #       # 
     my $previous;      my $previous;
     $curRes = $iterator->next(); # BEGIN_MAP  
     $curRes = $iterator->next(); # The first item in the top level map.  
     while (scalar(@Nested_Sequences)) {      while (scalar(@Nested_Sequences)) {
         $previous = $curRes;          $previous = $curRes;
         $curRes = $iterator->next();          $curRes = $iterator->next();
Line 581  sub init_dbs { Line 579  sub init_dbs {
   
 =pod  =pod
   
   =item &delete_caches()
   
   =cut
   
   ################################################
   ################################################
   sub delete_caches {
       my $courseid = shift;
       $courseid = $ENV{'request.course.id'} if (! defined($courseid));
       #
       &setup_table_names($courseid);
       #
       my $dbh = &Apache::lonmysql::get_dbh();
       foreach my $table ($symb_table,$part_table,$student_table,
                          $updatetime_table,$performance_table,
                          $parameters_table ){
           my $command = 'DROP TABLE '.$table.';';
           $dbh->do($command);
           if ($dbh->err) {
               &Apache::lonnet::logthis($command.' resulted in error: '.$dbh->errstr);
           }
       }
       return;
   }
   
   ################################################
   ################################################
   
   =pod
   
 =item &get_part_id()  =item &get_part_id()
   
 Get the MySQL id of a problem part string.  Get the MySQL id of a problem part string.
Line 862  sub update_student_data { Line 890  sub update_student_data {
             if ($parameter !~ /(timestamp|resource\.(.*)\.(solved|tries|awarded|award|awarddetail|previous))/) {              if ($parameter !~ /(timestamp|resource\.(.*)\.(solved|tries|awarded|award|awarddetail|previous))/) {
                 $newstring = "('".join("','",                  $newstring = "('".join("','",
                                        $symb_id,$student_id,                                         $symb_id,$student_id,
                                        $parameter,$value)."'),\n";                                         $parameter)."',".
                                              $dbh->quote($value)."),\n";
                 $num_parameters ++;                  $num_parameters ++;
                 if ($newstring !~ /''/) {                  if ($newstring !~ /''/) {
                     $store_parameters_command .= $newstring;                      $store_parameters_command .= $newstring;
Line 1124  sub get_current_state { Line 1153  sub get_current_state {
     my ($status,$data) = &ensure_current_data($sname,$sdom,$courseid);      my ($status,$data) = &ensure_current_data($sname,$sdom,$courseid);
     #      #
     if (defined($data)) {      if (defined($data)) {
         return %$data;          if (defined($symb)) {
               return %{$data->{$symb}};
           } else {
               return %$data;
           }
     } elsif ($status eq 'no data') {      } elsif ($status eq 'no data') {
         return ();          return ();
     } else {      } else {

Removed from v.1.67  
changed lines
  Added in v.1.70


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>