Diff for /loncom/interface/loncoursedata.pm between versions 1.74 and 1.77

version 1.74, 2003/06/02 17:09:09 version 1.77, 2003/06/16 15:55:27
Line 109  sub get_sequence_assessment_data { Line 109  sub get_sequence_assessment_data {
     if (!defined($navmap)) {      if (!defined($navmap)) {
         return 'Can not open Coursemap';          return 'Can not open Coursemap';
     }      }
       # We explicity grab the top level map because I am not sure we
       # are pulling it from the iterator.
       my $top_level_map = $navmap->getById('0.0');
       #
     my $iterator = $navmap->getIterator(undef, undef, undef, 1);      my $iterator = $navmap->getIterator(undef, undef, undef, 1);
     my $curRes = $iterator->next(); # Top level sequence      my $curRes = $iterator->next(); # Top level sequence
     ##      ##
Line 118  sub get_sequence_assessment_data { Line 122  sub get_sequence_assessment_data {
     ## resources.  This means we have to start out with something to look      ## resources.  This means we have to start out with something to look
     ## at.      ## at.
     my $title = $ENV{'course.'.$ENV{'request.course.id'}.'.description'};      my $title = $ENV{'course.'.$ENV{'request.course.id'}.'.description'};
     my $symb  = 'top';      my $symb  = $top_level_map->symb();
     my $src   = 'not applicable';      my $src   = $top_level_map->src();
       my $randompick = $top_level_map->randompick();
     #      #
     my @Sequences;       my @Sequences; 
     my @Assessments;      my @Assessments;
Line 130  sub get_sequence_assessment_data { Line 135  sub get_sequence_assessment_data {
                 type     => 'container',                  type     => 'container',
                 num_assess => 0,                  num_assess => 0,
                 num_assess_parts => 0,                  num_assess_parts => 0,
                 contents   => [], };                  contents   => [], 
                   randompick => $randompick,
               };
     push (@Sequences,$top);      push (@Sequences,$top);
     push (@Nested_Sequences, $top);      push (@Nested_Sequences, $top);
     #      #
Line 146  sub get_sequence_assessment_data { Line 153  sub get_sequence_assessment_data {
             $title = $previous->title();              $title = $previous->title();
             $symb  = $previous->symb();              $symb  = $previous->symb();
             $src   = $previous->src();              $src   = $previous->src();
               $randompick = $previous->randompick();
             my $newmap = { title    => $title,              my $newmap = { title    => $title,
                            src      => $src,                             src      => $src,
                            symb     => $symb,                             symb     => $symb,
                            type     => 'container',                             type     => 'container',
                            num_assess => 0,                             num_assess => 0,
                              randompick => $randompick,
                            contents   => [],                             contents   => [],
                        };                         };
             push (@{$currentmap->{'contents'}},$newmap); # this is permanent              push (@{$currentmap->{'contents'}},$newmap); # this is permanent
Line 1196  sub get_current_state { Line 1205  sub get_current_state {
     return () if (! defined($sname) || ! defined($sdom));      return () if (! defined($sname) || ! defined($sdom));
     #      #
     my ($status,$data) = &ensure_current_data($sname,$sdom,$courseid);      my ($status,$data) = &ensure_current_data($sname,$sdom,$courseid);
     &Apache::lonnet::logthis  #    &Apache::lonnet::logthis
         ('sname = '.$sname.  #        ('sname = '.$sname.
          ' domain = '.$sdom.  #         ' domain = '.$sdom.
          ' status = '.$status.  #         ' status = '.$status.
          ' data is '.(defined($data)?'defined':'undefined'));  #         ' data is '.(defined($data)?'defined':'undefined'));
 #    while (my ($symb,$hash) = each(%$data)) {  #    while (my ($symb,$hash) = each(%$data)) {
 #        &Apache::lonnet::logthis($symb."\n----------------------------------");  #        &Apache::lonnet::logthis($symb."\n----------------------------------");
 #        while (my ($key,$value) = each (%$hash)) {  #        while (my ($key,$value) = each (%$hash)) {

Removed from v.1.74  
changed lines
  Added in v.1.77


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