Diff for /loncom/interface/lonrequestcourse.pm between versions 1.43 and 1.44

version 1.43, 2010/01/14 20:08:13 version 1.44, 2010/02/21 23:38:51
Line 176  sub handler { Line 176  sub handler {
         &get_breadcrumbs($dom,$action,\$state,\%states,\%trail);          &get_breadcrumbs($dom,$action,\$state,\%states,\%trail);
     if ($action eq 'display') {      if ($action eq 'display') {
         if (($dom eq $env{'request.role.domain'}) && (&Apache::lonnet::allowed('ccc',$dom))) {          if (($dom eq $env{'request.role.domain'}) && (&Apache::lonnet::allowed('ccc',$dom))) {
             my $namespace = 'courserequestqueue';  
             if ($env{'form.cnum'} ne '') {              if ($env{'form.cnum'} ne '') {
                 my $cnum = $env{'form.cnum'};                  my $cnum = $env{'form.cnum'};
                 my $reqkey = $cnum.'_approval';                  my $reqkey = $cnum.'_approval';
Line 2934  sub print_request_outcome { Line 2933  sub print_request_outcome {
                 }                  }
             }              }
         }          }
         my ($statusresult);          ($storeresult,my $updateresult) = 
         if ($requestkey =~ /^($match_domain)_($match_courseid)$/) {              &Apache::loncoursequeueadmin::update_coursereq_status(\%reqhash,$dom,
             $storeresult = &Apache::lonnet::store_userdata(\%reqhash,$requestkey,                  $cnum,$reqstatus,'request');
                                                            'courserequests');  
             if ($storeresult eq 'ok') {  
                 my %status = (  
                                  'status:'.$dom.':'.$cnum => $reqstatus,  
                              );  
                 $statusresult = &Apache::lonnet::put('courserequests',\%status);  
             }  
         } else {  
             $storeresult = 'error: invalid requestkey format';   
         }  
         if ($storeresult ne 'ok') {  
             $output .=  '<span class="LC_warning">'.&mt('An error occurred saving a record of the details of your request: [_1].',$storeresult).'</span><br />';  
             &Apache::lonnet::logthis("Error saving course request - $requestkey for $env{'user.name'}:$env{'user.domain'} - $storeresult");  
         } elsif ($statusresult ne 'ok') {  
             $output .= '<span class="LC_warning">'.&mt('An error occurred saving a record of the status of your request: [_1].',$statusresult).'</span><br />';  
             &Apache::lonnet::logthis("Error saving course request status for  $requestkey (for $env{'user.name'}:$env{'user.domain'}) - $statusresult");  
         }  
         if ($modified && $queued && $storeresult eq 'ok') {          if ($modified && $queued && $storeresult eq 'ok') {
             if ($crstype eq 'community') {              if ($crstype eq 'community') {
                 $output .= '<p>'.&mt('Your community request has been updated').'</p>';                  $output .= '<p>'.&mt('Your community request has been updated').'</p>';
Line 2963  sub print_request_outcome { Line 2945  sub print_request_outcome {
             $output .= &notification_information($disposition,$req_notifylist,$cnum,$now);              $output .= &notification_information($disposition,$req_notifylist,$cnum,$now);
         }          }
         if ($validationerror ne '') {          if ($validationerror ne '') {
             $output .= '<span class="LC_warning">'.&mt('An error occurred validating your request with institutional data sources: [_1].',$validationerror).'</p>';              $output .= '<p class="LC_warning">'.&mt('An error occurred validating your request with institutional data sources: [_1].',$validationerror).'</p>';
           }
           if ($updateresult) {
               $output .= $updateresult;
         }          }
     }      }
     if ($creationresult ne '') {      if ($creationresult ne '') {
Line 3139  sub notification_information { Line 3124  sub notification_information {
                    '</div>';                     '</div>';
     } else {      } else {
         $output .= '<div class="LC_warning">'.          $output .= '<div class="LC_warning">'.
                    &mt('Your request status is: [_1].',$disposition).                      &mt('Your request status is: [_1].',$disposition).
                    '</div>'                     '</div>';
     }      }
     return $output;      return $output;
 }  }

Removed from v.1.43  
changed lines
  Added in v.1.44


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