[system] / trunk / webwork2 / lib / WeBWorK / ContentGenerator / Instructor / SetsAssignedToUser.pm Repository:
ViewVC logotype

Diff of /trunk/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetsAssignedToUser.pm

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

Revision 1840 Revision 1841
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/SetsAssignedToUser.pm,v 1.6 2004/01/28 03:31:44 gage Exp $ 4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/SetsAssignedToUser.pm,v 1.7 2004/02/06 18:01:51 sh002i Exp $
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
28use warnings; 28use warnings;
29use CGI qw(); 29use CGI qw();
30use WeBWorK::Utils qw(formatDateTime); 30use WeBWorK::Utils qw(formatDateTime);
31 31
32sub initialize { 32sub initialize {
33 my ($self, $userID) = @_; 33 my ($self) = @_;
34 my $r = $self->{r}; 34 my $r = $self->{r};
35 my $userID = $r->urlpath->arg("userID");
35 my $db = $self->{db}; 36 my $db = $self->{db};
36 my $authz = $self->{authz}; 37 my $authz = $self->{authz};
37 my $user = $r->param("user"); 38 my $user = $r->param("user");
38 39
39 # check authorization 40 # check authorization
94 return $pathUserName; 95 return $pathUserName;
95} 96}
96 97
97sub path { 98sub path {
98 my $self = shift; 99 my $self = shift;
99 my @components = @_;
100 my $args = $_[-1]; 100 my $args = $_[-1];
101 101
102 my $ce = $self->{ce}; 102 my $ce = $self->{ce};
103 my $root = $ce->{webworkURLs}->{root}; 103 my $root = $ce->{webworkURLs}->{root};
104 my $courseName = $ce->{courseName}; 104 my $courseName = $ce->{courseName};
105 my $userID = $self->getUserName($components[0]); 105 my $r = $self->{r};
106 my $userID = $r->urlpath->arg("userID");
106 107
107 return $self->pathMacro($args, 108 return $self->pathMacro($args,
108 "Home" => "$root", 109 "Home" => "$root",
109 $courseName => "$root/$courseName", 110 $courseName => "$root/$courseName",
110 "Instructor Tools" => "$root/$courseName/instructor", 111 "Instructor Tools" => "$root/$courseName/instructor",
113 "Assigned Sets" => "", # "$root/$courseName/instructor/users/$userID/sets" 114 "Assigned Sets" => "", # "$root/$courseName/instructor/users/$userID/sets"
114 ); 115 );
115} 116}
116 117
117sub title { 118sub title {
118 my ($self, @components) = @_; 119 my ($self) = @_;
119 my $userID = $self->getUserName($components[0]); 120 my $r = $self->{r};
121 my $userID = $r->urlpath->arg("userID");
120 122
121 return "Assigned Sets for user $userID"; 123 return "Assigned Sets for user $userID";
122} 124}
123 125
124sub body { 126sub body {
125 my ($self, $userID) = @_; 127 my ($self) = @_;
126 my $r = $self->{r}; 128 my $r = $self->{r};
129 my $userID = $r->urlpath->arg("userID");
127 my $authz = $self->{authz}; 130 my $authz = $self->{authz};
128 my $db = $self->{db}; 131 my $db = $self->{db};
129 my $ce = $self->{ce}; 132 my $ce = $self->{ce};
130 my $webworkRoot = $ce->{webworkURLs}->{root}; 133 my $webworkRoot = $ce->{webworkURLs}->{root};
131 my $courseName = $ce->{courseName}; 134 my $courseName = $ce->{courseName};

Legend:
Removed from v.1840  
changed lines
  Added in v.1841

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9