[system] / trunk / webwork-modperl / lib / WeBWorK / ContentGenerator.pm Repository:
ViewVC logotype

Diff of /trunk/webwork-modperl/lib/WeBWorK/ContentGenerator.pm

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

Revision 561 Revision 562
120 } elsif ($function eq "else" and @ifstack > 1) { 120 } elsif ($function eq "else" and @ifstack > 1) {
121 $ifstack[-1] = not $ifstack[-1]; 121 $ifstack[-1] = not $ifstack[-1];
122 } elsif ($function eq "endif" and @ifstack > 1) { 122 } elsif ($function eq "endif" and @ifstack > 1) {
123 pop @ifstack; 123 pop @ifstack;
124 } elsif ($ifstack[-1]) { 124 } elsif ($ifstack[-1]) {
125 if ($self->can($function)) {
125 print $self->$function(@_, {@args}) if $self->can($function); 126 print $self->$function(@_, {@args});
127 }
126 } 128 }
127 } 129 }
128 130
129 if ($ifstack[-1]) { 131 if ($ifstack[-1]) {
130 print substr $line, (defined pos $line) ? pos $line : 0; 132 print substr($line, (defined pos $line) ? pos $line : 0), "\n";
131 } 133 }
132 } 134 }
133} 135}
134 136
135# cook_args(STRING) - parses a string of the form ARG1="FOO" ARG2="BAR". Returns 137# cook_args(STRING) - parses a string of the form ARG1="FOO" ARG2="BAR". Returns
364 my $ce = $self->{courseEnvironment}; 366 my $ce = $self->{courseEnvironment};
365 my $userName = $self->{r}->param("user"); 367 my $userName = $self->{r}->param("user");
366 my $courseName = $ce->{courseName}; 368 my $courseName = $ce->{courseName};
367 my $root = $ce->{webworkURLs}->{root}; 369 my $root = $ce->{webworkURLs}->{root};
368 my $permLevel = WeBWorK::DB::Auth->new($ce)->getPermissions($userName); 370 my $permLevel = WeBWorK::DB::Auth->new($ce)->getPermissions($userName);
371 return "" unless defined $permLevel;
369 372
370 my $probSets = "$root/$courseName/?" . $self->url_authen_args(); 373 my $probSets = "$root/$courseName/?" . $self->url_authen_args();
371 my $prefs = "$root/$courseName/prefs/?" . $self->url_authen_args(); 374 my $prefs = "$root/$courseName/prefs/?" . $self->url_authen_args();
372 my $prof = "$root/$courseName/prof/?" . $self->url_authen_args(); 375 my $prof = "$root/$courseName/prof/?" . $self->url_authen_args();
373 my $profLine; 376 my $profLine;

Legend:
Removed from v.561  
changed lines
  Added in v.562

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9