| … | |
… | |
| 359 | my $r = $self->{r}; |
359 | my $r = $self->{r}; |
| 360 | $r->content_type('text/html'); |
360 | $r->content_type('text/html'); |
| 361 | $r->send_http_header(); |
361 | $r->send_http_header(); |
| 362 | } |
362 | } |
| 363 | |
363 | |
|
|
364 | sub loginstatus { |
|
|
365 | my $self = shift; |
|
|
366 | my $r = $self->{r}; |
|
|
367 | my $user = $r->param("user"); |
|
|
368 | my $eUser = $r->param("effectiveUser"); |
|
|
369 | my $key = $r->param("key"); |
|
|
370 | return "" unless $key; |
|
|
371 | warn "user=$user eUser=$eUser\n"; |
|
|
372 | print CGI::small("Logged in as:", CGI::br(), "$user"); |
|
|
373 | if ($user ne $eUser) { |
|
|
374 | print CGI::br(), CGI::font({-color=>'red'}, CGI::small("Acting as:", CGI::br(), "$eUser")); |
|
|
375 | } |
|
|
376 | return ""; |
|
|
377 | } |
|
|
378 | |
| 364 | # drunk code. rewrite. |
379 | # *** drunk code. rewrite. |
| 365 | # also, this should be structured s.t. subclasses can add items to the links |
380 | # also, this should be structured s.t. subclasses can add items to the links |
| 366 | # area, i.e. "stacking" |
381 | # area, i.e. "stacking" |
| 367 | sub links { |
382 | sub links { |
| 368 | my $self = shift; |
383 | my $self = shift; |
| 369 | my $ce = $self->{courseEnvironment}; |
384 | my $ce = $self->{courseEnvironment}; |