Diff for /loncom/interface/lonnavmaps.pm between versions 1.331 and 1.332

version 1.331, 2005/06/28 21:21:54 version 1.332, 2005/06/28 21:41:43
Line 57  my %statusIconMap = Line 57  my %statusIconMap =
      $resObj->CLOSED       => '',       $resObj->CLOSED       => '',
      $resObj->OPEN         => 'navmap.open.gif',       $resObj->OPEN         => 'navmap.open.gif',
      $resObj->CORRECT      => 'navmap.correct.gif',       $resObj->CORRECT      => 'navmap.correct.gif',
        $resObj->PARTIALLY_CORRECT      => 'navmap.ellipsis.gif',
      $resObj->INCORRECT    => 'navmap.wrong.gif',       $resObj->INCORRECT    => 'navmap.wrong.gif',
      $resObj->ATTEMPTED    => 'navmap.ellipsis.gif',       $resObj->ATTEMPTED    => 'navmap.ellipsis.gif',
      $resObj->ERROR        => ''       $resObj->ERROR        => ''
Line 81  my %colormap = Line 82  my %colormap =
       $resObj->OPEN                   => '',        $resObj->OPEN                   => '',
       $resObj->NOTHING_SET            => '',        $resObj->NOTHING_SET            => '',
       $resObj->ATTEMPTED              => '',        $resObj->ATTEMPTED              => '',
       $resObj->ANSWER_SUBMITTED       => ''        $resObj->ANSWER_SUBMITTED       => '',
         $resObj->PARTIALLY_CORRECT      => '#006600'
       );        );
 # And a special case in the nav map; what to do when the assignment  # And a special case in the nav map; what to do when the assignment
 # is not yet done and due in less then 24 hours  # is not yet done and due in less then 24 hours
Line 507  sub getDescription { Line 509  sub getDescription {
     if ($status == $res->PAST_DUE_NO_ANSWER) {      if ($status == $res->PAST_DUE_NO_ANSWER) {
         return &mt("Was due")." " . timeToHumanString($res->duedate($part));          return &mt("Was due")." " . timeToHumanString($res->duedate($part));
     }      }
     if ($status == $res->ANSWER_OPEN) {      if ($status == $res->ANSWER_OPEN || $status == $res->PARTIALLY_CORRECT) {
         return &mt("Answer available");          return &mt("Answer available");
     }      }
     if ($status == $res->EXCUSED) {      if ($status == $res->EXCUSED) {
Line 1426  sub render { Line 1428  sub render {
         # Step two: Locate what kind of here marker is necessary          # Step two: Locate what kind of here marker is necessary
         # Determine where the "here" marker is and where the screen jumps to.          # Determine where the "here" marker is and where the screen jumps to.
   
         if ($env{'form.postsymb'}) {          if ($env{'form.postsymb'} ne '') {
             $here = $jump = &Apache::lonnet::symbclean($env{'form.postsymb'});              $here = $jump = &Apache::lonnet::symbclean($env{'form.postsymb'});
         } elsif ($env{'form.postdata'}) {          } elsif ($env{'form.postdata'} ne '') {
             # couldn't find a symb, is there a URL?              # couldn't find a symb, is there a URL?
             my $currenturl = $env{'form.postdata'};              my $currenturl = $env{'form.postdata'};
             #$currenturl=~s/^http\:\/\///;              #$currenturl=~s/^http\:\/\///;
Line 4374  sub ATTEMPTED             { return 16; } Line 4376  sub ATTEMPTED             { return 16; }
   
 sub getCompletionStatus {  sub getCompletionStatus {
     my $self = shift;      my $self = shift;
       my $part = shift;
     return $self->NETWORK_FAILURE if ($self->{NAV_MAP}->{NETWORK_FAILURE});      return $self->NETWORK_FAILURE if ($self->{NAV_MAP}->{NETWORK_FAILURE});
   
     my $status = $self->queryRestoreHash('solved', shift);      my $status = $self->queryRestoreHash('solved', $part);
   
     # Left as separate if statements in case we ever do more with this      # Left as separate if statements in case we ever do more with this
     if ($status eq 'correct_by_student') {return $self->CORRECT;}      if ($status eq 'correct_by_student') {return $self->CORRECT;}
     if ($status eq 'correct_by_scantron') {return $self->CORRECT;}      if ($status eq 'correct_by_scantron') {return $self->CORRECT;}
     if ($status eq 'correct_by_override') {return $self->CORRECT_BY_OVERRIDE; }      if ($status eq 'correct_by_override') {
    return $self->CORRECT_BY_OVERRIDE;
       }
     if ($status eq 'incorrect_attempted') {return $self->INCORRECT; }      if ($status eq 'incorrect_attempted') {return $self->INCORRECT; }
     if ($status eq 'incorrect_by_override') {return $self->INCORRECT_BY_OVERRIDE; }      if ($status eq 'incorrect_by_override') {return $self->INCORRECT_BY_OVERRIDE; }
     if ($status eq 'excused') {return $self->EXCUSED; }      if ($status eq 'excused') {return $self->EXCUSED; }
Line 4485  An answer has been submitted, but the st Line 4490  An answer has been submitted, but the st
   
 sub TRIES_LEFT       { return 20; }  sub TRIES_LEFT       { return 20; }
 sub ANSWER_SUBMITTED { return 21; }  sub ANSWER_SUBMITTED { return 21; }
   sub PARTIALLY_CORRECT{ return 22; }
   
 sub status {  sub status {
     my $self = shift;      my $self = shift;
Line 4511  sub status { Line 4517  sub status {
     # There are a few whole rows we can dispose of:      # There are a few whole rows we can dispose of:
     if ($completionStatus == CORRECT ||      if ($completionStatus == CORRECT ||
         $completionStatus == CORRECT_BY_OVERRIDE ) {          $completionStatus == CORRECT_BY_OVERRIDE ) {
         return $suppressFeedback? ANSWER_SUBMITTED : CORRECT;    if ( $suppressFeedback ) { return ANSWER_SUBMITTED }
    my $awarded=$self->awarded($part);
    if ($awarded < 1 && $awarded > 0) {
               return PARTIALLY_CORRECT;
    } elsif ($awarded<1) {
       return INCORRECT;
    }
    return CORRECT; 
     }      }
   
     if ($completionStatus == ATTEMPTED) {      if ($completionStatus == ATTEMPTED) {
Line 4598  my %compositeToSimple = Line 4611  my %compositeToSimple =
       NETWORK_FAILURE()       => ERROR,        NETWORK_FAILURE()       => ERROR,
       NOTHING_SET()           => CLOSED,        NOTHING_SET()           => CLOSED,
       CORRECT()               => CORRECT,        CORRECT()               => CORRECT,
         PARTIALLY_CORRECT()     => PARTIALLY_CORRECT,
       EXCUSED()               => CORRECT,        EXCUSED()               => CORRECT,
       PAST_DUE_NO_ANSWER()    => INCORRECT,        PAST_DUE_NO_ANSWER()    => INCORRECT,
       PAST_DUE_ANSWER_LATER() => INCORRECT,        PAST_DUE_ANSWER_LATER() => INCORRECT,

Removed from v.1.331  
changed lines
  Added in v.1.332


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