version 1.499, 2006/12/28 15:49:15
|
version 1.502, 2007/01/20 22:04:57
|
Line 1335 sub multiple_select_form {
|
Line 1335 sub multiple_select_form {
|
} |
} |
} |
} |
$output.="\n<select name='$name' size='$size' multiple='1'>"; |
$output.="\n<select name='$name' size='$size' multiple='1'>"; |
my @order = ref($order) ? @$order |
my @order; |
: sort(keys(%$hash)); |
if ($order) { |
|
@order = ref($order) ? @$order |
|
: sort(keys(%$hash)); |
|
} |
|
if (exists($$hash{'select_form_order'})) { |
|
@order = @{$$hash{'select_form_order'}}; |
|
} |
|
|
foreach my $key (@order) { |
foreach my $key (@order) { |
$output.='<option value="'.&HTML::Entities::encode($key,'"<>&').'" '; |
$output.='<option value="'.&HTML::Entities::encode($key,'"<>&').'" '; |
$output.='selected="selected" ' if ($selected{$key}); |
$output.='selected="selected" ' if ($selected{$key}); |
Line 2896 sub blockcheck {
|
Line 2903 sub blockcheck {
|
$uname = $env{'user.name'}; |
$uname = $env{'user.name'}; |
} |
} |
|
|
my ($startblock,$endblock); |
|
|
|
# If uname and udom are for a course, check for blocks in the course. |
# If uname and udom are for a course, check for blocks in the course. |
|
|
if (&Apache::lonnet::is_course($udom,$uname)) { |
if (&Apache::lonnet::is_course($udom,$uname)) { |
my %records = &Apache::lonnet::dump('comm_block',$udom,$uname); |
my %records = &Apache::lonnet::dump('comm_block',$udom,$uname); |
($startblock,$endblock)=&get_blocks($setters,$activity,$udom,$uname); |
my ($startblock,$endblock)=&get_blocks($setters,$activity,$udom,$uname); |
return ($startblock,$endblock); |
return ($startblock,$endblock); |
} |
} |
|
|
|
my $startblock = 0; |
|
my $endblock = 0; |
my %live_courses = &findallcourses(undef,$uname,$udom); |
my %live_courses = &findallcourses(undef,$uname,$udom); |
|
|
# If uname is for a user, and activity is course-specific, i.e., |
# If uname is for a user, and activity is course-specific, i.e., |
Line 2966 sub blockcheck {
|
Line 2973 sub blockcheck {
|
if ($sec ne 'none') { |
if ($sec ne 'none') { |
$checkrole .= '/'.$sec; |
$checkrole .= '/'.$sec; |
} |
} |
# Resource belongs to user other than current user. |
|
# Assemble privs for that user, and check for 'evb' priv. |
|
if ($otheruser) { |
if ($otheruser) { |
# Resource belongs to user other than current user. |
# Resource belongs to user other than current user. |
# Assemble privs for that user, and check for 'evb' priv. |
# Assemble privs for that user, and check for 'evb' priv. |
Line 3017 sub blockcheck {
|
Line 3022 sub blockcheck {
|
|
|
# Retrieve blocking times and identity of blocker for course |
# Retrieve blocking times and identity of blocker for course |
# of specified user, unless user has 'evb' privilege. |
# of specified user, unless user has 'evb' privilege. |
|
|
($startblock,$endblock)=&get_blocks($setters,$activity,$cdom,$cnum); |
my ($start,$end)=&get_blocks($setters,$activity,$cdom,$cnum); |
|
if (($start != 0) && |
|
(($startblock == 0) || ($startblock > $start))) { |
|
$startblock = $start; |
|
} |
|
if (($end != 0) && |
|
(($endblock == 0) || ($endblock < $end))) { |
|
$endblock = $end; |
|
} |
} |
} |
return ($startblock,$endblock); |
return ($startblock,$endblock); |
} |
} |
Line 3344 sub bodytag {
|
Line 3357 sub bodytag {
|
my ($role,$realm) = split(/\./,$env{'request.role'},2); |
my ($role,$realm) = split(/\./,$env{'request.role'},2); |
if ($role eq 'ca') { |
if ($role eq 'ca') { |
my ($rdom,$rname) = ($realm =~ m{^/($match_domain)/($match_username)$}); |
my ($rdom,$rname) = ($realm =~ m{^/($match_domain)/($match_username)$}); |
$realm = &plainname($rname,$rdom).':'.$rdom; |
$realm = &plainname($rname,$rdom); |
} |
} |
# realm |
# realm |
if ($env{'request.course.id'}) { |
if ($env{'request.course.id'}) { |