version 1.1195, 2012/11/09 17:27:18
|
version 1.1196, 2012/11/10 13:58:31
|
Line 2653 sub allowuploaded {
|
Line 2653 sub allowuploaded {
|
# (b) When displaying folder contents in course editor, used to determine if |
# (b) When displaying folder contents in course editor, used to determine if |
# "Edit" link will be displayed alongside resource. |
# "Edit" link will be displayed alongside resource. |
# |
# |
# input: 3 args -- filename (decluttered), course number and course domain. |
# input: six args -- filename (decluttered), course number, course domain, |
# output: array of four scalars -- |
# url, symb (if registered) and group (if this is a group |
|
# item -- e.g., bulletin board, group page etc.). |
|
# output: array of five scalars -- |
# $cfile -- url for file editing if editable on current server |
# $cfile -- url for file editing if editable on current server |
# $home -- homeserver of resource (i.e., for author if published, |
# $home -- homeserver of resource (i.e., for author if published, |
# or course if uploaded.). |
# or course if uploaded.). |
# $switchserver -- 1 if server switch will be needed. |
# $switchserver -- 1 if server switch will be needed. |
# $uploaded -- 1 if resource is a file uploaded to a course. |
# $forceedit -- 1 if icon/link should be to go to edit mode |
|
# $forceview -- 1 if icon/link should be to go to view mode |
# |
# |
|
|
sub can_edit_resource { |
sub can_edit_resource { |
Line 12260 provided for types, will default to retu
|
Line 12263 provided for types, will default to retu
|
=item * |
=item * |
|
|
in_course($udom,$uname,$cdom,$cnum,$type,$hideprivileged) : determine if |
in_course($udom,$uname,$cdom,$cnum,$type,$hideprivileged) : determine if |
user: $uname:$udom has a role in the course: $cdom_$cnum. Additional |
user: $uname:$udom has a role in the course: $cdom_$cnum. |
optional arguments are: $type (if role checking is to be restricted to |
|
certain user status types -- previous (expired roles), active (currently |
Additional optional arguments are: $type (if role checking is to be restricted |
|
to certain user status types -- previous (expired roles), active (currently |
available roles) or future (roles available in the future), and |
available roles) or future (roles available in the future), and |
$hideprivileged -- if true will not report course roles for users who |
$hideprivileged -- if true will not report course roles for users who |
have active Domain Coordinator or Super User roles. |
have active Domain Coordinator or Super User roles. |
Line 12631 forcing spreadsheet to reevaluate the re
|
Line 12635 forcing spreadsheet to reevaluate the re
|
|
|
=item * |
=item * |
|
|
can_edit_resource($file,$cnum,$cdom,$resurl,$symb,$group) |
can_edit_resource($file,$cnum,$cdom,$resurl,$symb,$group) : determine if current user can edit a particular resource, |
|
|
Determine if the current user should be able to edit a particular resource, |
|
when viewing in course context. |
when viewing in course context. |
(a) When viewing resource used to determine if "Edit" item is included in |
|
Functions. |
|
(b) When displaying folder contents in course editor, used to determine if |
|
"Edit" link will be displayed alongside resource. |
|
|
|
input: 3 args -- filename (decluttered), course number and course domain. |
input: six args -- filename (decluttered), course number, course domain, |
output: array of four scalars -- |
url, symb (if registered) and group (if this is a |
|
group item -- e.g., bulletin board, group page etc.). |
|
|
|
output: array of five scalars -- |
$cfile -- url for file editing if editable on current server |
$cfile -- url for file editing if editable on current server |
$home -- homeserver of resource (i.e., for author if published, |
$home -- homeserver of resource (i.e., for author if published, |
or course if uploaded.). |
or course if uploaded.). |
$switchserver -- 1 if server switch will be needed. |
$switchserver -- 1 if server switch will be needed. |
$uploaded -- 1 if resource is a file uploaded to a course. |
$forceedit -- 1 if icon/link should be to go to edit mode |
|
$forceview -- 1 if icon/link should be to go to view mode |
|
|
=item * |
=item * |
|
|