[system] / trunk / webwork2 / lib / Apache / WeBWorK.pm Repository:
ViewVC logotype

Diff of /trunk/webwork2/lib/Apache/WeBWorK.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 671 Revision 682
101 return WeBWorK::ContentGenerator::Login->new($r, $course_env)->go; 101 return WeBWorK::ContentGenerator::Login->new($r, $course_env)->go;
102 } else { 102 } else {
103 # After we are authenticated, there are some things that need to be 103 # After we are authenticated, there are some things that need to be
104 # sorted out, Authorization-wize, before we start dispatching to individual 104 # sorted out, Authorization-wize, before we start dispatching to individual
105 # content generators. 105 # content generators.
106 my $user = $r->param("user");
106 my $effectiveUser = $r->param("effectiveUser") || ""; 107 my $effectiveUser = $r->param("effectiveUser") || "";
107 my $user = $r->param("user");
108 my $su_authorized = WeBWorK::Authz->new($r, $course_env)->hasPermissions($user, "become_student", $effectiveUser); 108 my $su_authorized = WeBWorK::Authz->new($r, $course_env)->hasPermissions($user, "become_student", $effectiveUser);
109 # This hoary statement has the effect of forcing effectiveUser to equal user unless
110 # the user is otherwise authorized.
111 if (!($user ne $effectiveUser && $su_authorized) || !defined $effectiveUser) { 109 #if (!($user ne $effectiveUser && $su_authorized) || !defined $effectiveUser) {
112 $r->param("effectiveUser",$user); 110 $r->param("effectiveUser", $user) unless $su_authorized;
113 } 111
112 warn "WeBWorK: user=$user eUser=", $r->param("effectiveUser"), "\n";
114 113
115 my $arg = shift @components; 114 my $arg = shift @components;
116 if (!defined $arg) { # We want the list of problem sets 115 if (!defined $arg) { # We want the list of problem sets
117 return WeBWorK::ContentGenerator::ProblemSets->new($r, $course_env)->go; 116 return WeBWorK::ContentGenerator::ProblemSets->new($r, $course_env)->go;
118 } elsif ($arg eq "hardcopy") { 117 } elsif ($arg eq "hardcopy") {

Legend:
Removed from v.671  
changed lines
  Added in v.682

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9