Diff for /loncom/auth/lonroles.pm between versions 1.177 and 1.180

version 1.177, 2007/04/17 15:44:58 version 1.180, 2007/10/22 22:16:30
Line 201  sub handler { Line 201  sub handler {
  }   }
  $r->print(<<ENDENTEREDKEY);   $r->print(<<ENDENTEREDKEY);
 $start_page  $start_page
 <script>  <script type="text/javascript">
 $swinfo  $swinfo
 </script>  </script>
 <form method="post">  <form method="post">
Line 224  ENDENTEREDKEY Line 224  ENDENTEREDKEY
  my $end_page=&Apache::loncommon::end_page();   my $end_page=&Apache::loncommon::end_page();
  $r->print(<<ENDENTERKEY);   $r->print(<<ENDENTERKEY);
 $start_page  $start_page
 <script>  <script type="text/javascript">
 $swinfo  $swinfo
 </script>  </script>
 <form method="post">  <form method="post">
Line 365  ENDENTERKEY Line 365  ENDENTERKEY
     my $start_page=&Apache::loncommon::start_page('User Roles');      my $start_page=&Apache::loncommon::start_page('User Roles');
     my $standby=&mt('Role selected. Please stand by.');      my $standby=&mt('Role selected. Please stand by.');
     $standby=~s/\n/\\n/g;      $standby=~s/\n/\\n/g;
       my $noscript='<span class="LC_error">'.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.').'<br />'.&mt('As this is not the case, most functionality in the system will ba unavailable.').'</span><br />';
   
     $r->print(<<ENDHEADER);      $r->print(<<ENDHEADER);
 $start_page  $start_page
 <br />  <br />
 <script>  <noscript>
   $noscript
   </noscript>
   <script type="text/javascript">
 $swinfo  $swinfo
 window.focus();  window.focus();
   
Line 443  ENDHEADER Line 447  ENDHEADER
   &Apache::loncommon::end_page());    &Apache::loncommon::end_page());
  return OK;   return OK;
     } else {      } else {
         if ($advanced) {  
     $r->print('<span class="LC_rolesinfo">'.&mt("Your home server is ").  
       &Apache::lonnet::hostname(&Apache::lonnet::homeserver  
                       ($env{'user.name'},$env{'user.domain'})).  
       "<br />\n");  
     $r->print(&mt(  
       "Author and Co-Author roles are not available on servers other than their respective home servers.").'</span>');  
         }  
         if (($ENV{'REDIRECT_QUERY_STRING'}) && ($fn)) {          if (($ENV{'REDIRECT_QUERY_STRING'}) && ($fn)) {
        $fn.='?'.$ENV{'REDIRECT_QUERY_STRING'};         $fn.='?'.$ENV{'REDIRECT_QUERY_STRING'};
         }          }
Line 636  ENDHEADER Line 632  ENDHEADER
 # Is there only one choice?  # Is there only one choice?
     } elsif (($countactive==1) && ($env{'request.role'} eq 'cm')) {      } elsif (($countactive==1) && ($env{'request.role'} eq 'cm')) {
  $r->print('<h3>'.&mt('Please stand by.').'</h3>'.   $r->print('<h3>'.&mt('Please stand by.').'</h3>'.
     '<input type="hidden" name="'.$possiblerole.'" value="1" />');      '<input type="hidden" name="'.$possiblerole.'" value="1" />'.
               '<noscript><br /><input type="submit" name="submit" value="'.&mt('Continue').'" /></noscript>');
  $r->print("</form>\n");   $r->print("</form>\n");
  $r->rflush();   $r->rflush();
  $r->print('<script>document.forms.rolechoice.submit();</script>');   $r->print('<script type="text/javascript">document.forms.rolechoice.submit();</script>');
  $r->print(&Apache::loncommon::end_page());   $r->print(&Apache::loncommon::end_page());
  return OK;   return OK;
     }      }
Line 934  sub courselink { Line 931  sub courselink {
   
 sub coursepick_jscript {  sub coursepick_jscript {
     my $verify_script = <<"END";      my $verify_script = <<"END";
 <script>  <script type="text/javascript">
 function verifyCoursePick(caller) {  function verifyCoursePick(caller) {
     var numbutton = getIndex(caller)      var numbutton = getIndex(caller)
     var pickedCourse = document.rolechoice.elements[numbutton+4].value      var pickedCourse = document.rolechoice.elements[numbutton+4].value
Line 968  END Line 965  END
     return $verify_script;      return $verify_script;
 }  }
   
 sub processpick {  
     my $process_pick = <<"END";  
 <script>  
 function process_pick(dom) {  
     var pickedCourse=opener.document.rolechoice.$env{'form.cnumelement'}.value;  
     var pickedDomain=opener.document.rolechoice.$env{'form.cdomelement'}.value;  
     var okDomain = 0;  
   
     if (pickedDomain == dom) {  
         if (pickedCourse != '') {  
             var courseTarget = "cc./"+pickedDomain+"/"+pickedCourse  
             opener.document.title='Role selected. Please stand by.';  
             opener.status='Role selected. Please stand by.';  
     opener.document.rolechoice.newrole.value=courseTarget  
             opener.document.rolechoice.submit()  
         }  
     } else {  
         alert("You may only use this screen to select courses in the current domain: "+dom+"\\nPlease return to the roles page window and click the 'Select Course' link for domain: "+pickedDomain+",\\n if you are a Domain Coordinator in that domain, and wish to become a Course Coordinator in a course in the domain");  
     }  
 }  
    
 </script>  
 END  
     return $process_pick;  
 }  
   
 sub display_cc_role {  sub display_cc_role {
     my $rolekey = shift;      my $rolekey = shift;
     my $roletext;      my $roletext;

Removed from v.1.177  
changed lines
  Added in v.1.180


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