version 1.118, 2005/04/07 06:56:21
|
version 1.121, 2005/06/05 07:57:28
|
Line 39 use Apache::loncommon;
|
Line 39 use Apache::loncommon;
|
use Apache::lonhtmlcommon; |
use Apache::lonhtmlcommon; |
use Apache::lonannounce; |
use Apache::lonannounce; |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use GDBM_File; |
|
|
sub redirect_user { |
sub redirect_user { |
my ($r,$title,$url,$msg,$launch_nav) = @_; |
my ($r,$title,$url,$msg,$launch_nav) = @_; |
Line 232 ENDENTERKEY
|
Line 233 ENDENTERKEY
|
if (($env{'form.orgurl'}) && |
if (($env{'form.orgurl'}) && |
($env{'form.orgurl'}!~/^\/adm\/flip/)) { |
($env{'form.orgurl'}!~/^\/adm\/flip/)) { |
my $dest=$env{'form.orgurl'}; |
my $dest=$env{'form.orgurl'}; |
if ( &Apache::lonnet::mod_perl_version() == 2 ) { |
|
&Apache::lonnet::cleanenv(); |
|
} |
|
if (&Apache::lonnet::allowed('adv') eq 'F') { $tadv=1; } |
if (&Apache::lonnet::allowed('adv') eq 'F') { $tadv=1; } |
&Apache::lonnet::appenv('request.role.adv'=>$tadv); |
&Apache::lonnet::appenv('request.role.adv'=>$tadv); |
$r->internal_redirect($dest); |
$r->internal_redirect($dest); |
Line 341 ENDHEADER
|
Line 339 ENDHEADER
|
$r->print("<hr><pre>Access : ". |
$r->print("<hr><pre>Access : ". |
Apache::lonnet::plaintext($priv)."\n"); |
Apache::lonnet::plaintext($priv)."\n"); |
$r->print("Resource: ".&Apache::lonenc::check_encrypt($fn)."\n"); |
$r->print("Resource: ".&Apache::lonenc::check_encrypt($fn)."\n"); |
$r->print("Action : $msg\n</pre><hr>"); |
$r->print("Action : $msg\n</pre><hr />"); |
|
my $url=$fn; |
|
my $last; |
|
if (tie(my %hash,'GDBM_File',$env{'request.course.fn'}.'_symb.db', |
|
&GDBM_READER(),0640)) { |
|
$last=$hash{'last_known'}; |
|
untie(%hash); |
|
} |
|
if ($last) { $fn.='?symb='.&Apache::lonnet::escape($last); } |
|
|
|
&Apache::londocs::changewarning($r,undef,'You have modified your course recently, [_1] may fix this access problem.', |
|
&Apache::lonenc::check_encrypt($fn)); |
} else { |
} else { |
if ($env{'user.error.msg'}) { |
if ($env{'user.error.msg'}) { |
$r->print( |
$r->print( |
Line 502 ENDHEADER
|
Line 511 ENDHEADER
|
$sortkey=$role; |
$sortkey=$role; |
} elsif ($trest) { |
} elsif ($trest) { |
$ttype='Course'; |
$ttype='Course'; |
if ($tsection) { |
|
$ttype.='<br>'.&mt('Section/Group').': '.$tsection; |
|
} |
|
my $tcourseid=$tdom.'_'.$trest; |
my $tcourseid=$tdom.'_'.$trest; |
if ($env{'course.'.$tcourseid.'.description'}) { |
if ($env{'course.'.$tcourseid.'.description'}) { |
$twhere=$env{'course.'.$tcourseid.'.description'}; |
$twhere=$env{'course.'.$tcourseid.'.description'}; |
Line 529 ENDHEADER
|
Line 535 ENDHEADER
|
$sortkey=$role."\0".$tdom."\0".$twhere."\0".$envkey; |
$sortkey=$role."\0".$tdom."\0".$twhere."\0".$envkey; |
} |
} |
} |
} |
|
if ($tsection) { |
|
$twhere.='<br />'.&mt('Section/Group').': '.$tsection; |
|
} |
|
|
if ($role ne 'st') { $twhere.="<br />".&mt('Domain').":".$tdom; } |
if ($role ne 'st') { $twhere.="<br />".&mt('Domain').":".$tdom; } |
} elsif ($tdom) { |
} elsif ($tdom) { |
$ttype='Domain'; |
$ttype='Domain'; |
Line 574 ENDHEADER
|
Line 584 ENDHEADER
|
} |
} |
$r->print('<br /><table><tr>'); |
$r->print('<br /><table><tr>'); |
unless ($nochoose) { $r->print('<th> </th>'); } |
unless ($nochoose) { $r->print('<th> </th>'); } |
$r->print('<th>'.&mt('User Role').'</th><th colspan=2>'.&mt('Extent'). |
$r->print('<th>'.&mt('User Role').'</th><th>'.&mt('Extent'). |
'</th><th>'.&mt('Start').'</th><th>'.&mt('End').'</th><th>'. |
'</th><th>'.&mt('Start').'</th><th>'.&mt('End').'</th><th>'. |
&mt('Remarks and Calendar Announcements').'</th></tr>'."\n"); |
&mt('Remarks and Calendar Announcements').'</th></tr>'."\n"); |
my $doheaders=-1; |
my $doheaders=-1; |
Line 602 ENDHEADER
|
Line 612 ENDHEADER
|
} |
} |
} |
} |
if ($output) { |
if ($output) { |
$r->print("<tr bgcolor='#BBffBB'><td align='center' colspan='7'>". |
$r->print("<tr bgcolor='#BBffBB'><td align='center' colspan='6'>". |
&mt('Recent Roles')."</td>"); |
&mt('Recent Roles')."</td>"); |
$r->print($output); |
$r->print($output); |
$r->print("</tr>"); |
$r->print("</tr>"); |
Line 629 ENDHEADER
|
Line 639 ENDHEADER
|
if ($output) { |
if ($output) { |
if ($doheaders > 0) { |
if ($doheaders > 0) { |
$r->print("<tr bgcolor='#BBffBB'>". |
$r->print("<tr bgcolor='#BBffBB'>". |
"<td align='center' colspan='7'>".&mt($type)."</td></tr>"); |
"<td align='center' colspan='6'>".&mt($type)."</td></tr>"); |
} |
} |
$r->print($output); |
$r->print($output); |
} |
} |
Line 651 ENDHEADER
|
Line 661 ENDHEADER
|
$r->print('<td> </td>'); |
$r->print('<td> </td>'); |
} |
} |
} |
} |
$r->print('<td colspan=5><font color="'.$tfont.'">'.&mt('No role specified'). |
$r->print('<td colspan="4"><font color="'.$tfont.'">'.&mt('No role specified'). |
'</font></td><td><font color="'.$tfont.'">'.$tremark. |
'</font></td><td><font color="'.$tfont.'">'.$tremark. |
' </font></td></tr>'."\n"); |
' </font></td></tr>'."\n"); |
|
|
Line 780 sub build_roletext {
|
Line 790 sub build_roletext {
|
|
|
|
|
$roletext.='<td><font color="'.$tfont.'">'.$trole. |
$roletext.='<td><font color="'.$tfont.'">'.$trole. |
'</font></td><td><font color="'.$tfont.'">'.$ttype. |
'</font></td><td><font color="'.$tfont.'">'.$twhere. |
'</font></td><td><font color="'.$tfont.'">'.$twhere. |
|
'</font></td><td><font color="'.$tfont.'">'.$tpstart. |
'</font></td><td><font color="'.$tfont.'">'.$tpstart. |
'</font></td><td><font color="'.$tfont.'">'.$tpend. |
'</font></td><td><font color="'.$tfont.'">'.$tpend. |
'</font></td><td><font color="'.$tfont.'">'.$tremark. |
'</font></td><td><font color="'.$tfont.'">'.$tremark. |
Line 944 sub allcourses_row {
|
Line 953 sub allcourses_row {
|
'onClick="verifyCoursePick(this)">'. |
'onClick="verifyCoursePick(this)">'. |
'<input type="hidden" name="pick_'.$dcdom.'" value="1"></td>'. |
'<input type="hidden" name="pick_'.$dcdom.'" value="1"></td>'. |
'<td><font color="#002200">'. |
'<td><font color="#002200">'. |
$ccrole.'</font></td><td>'.&mt('Course').'</td>'. |
$ccrole.'</font></td>'. |
'<td><font color="#002200">'.&mt('All courses').':<b> '. |
'<td><font color="#002200">'.&mt('All courses').':<b> '. |
$selectlink.'</b>'. |
$selectlink.'</b>'. |
'<br />'.&mt('Domain').':'.$dcdom.'</font>'. |
'<br />'.&mt('Domain').':'.$dcdom.'</font>'. |
'<td colspan="4"><font color="#002200">'. |
'<td colspan="3"><font color="#002200">'. |
&mt('Course Coordinator access to all courses in domain'). |
&mt('Course Coordinator access to all courses in domain'). |
': <b>'.$dcdom.'</b></font></td></tr>'."\n"; |
': <b>'.$dcdom.'</b></font></td></tr>'."\n"; |
return $output; |
return $output; |