version 1.663, 2008/06/30 03:56:27
|
version 1.667, 2008/07/08 01:08:57
|
Line 878 sub help_open_topic {
|
Line 878 sub help_open_topic {
|
|
|
# Add the graphic |
# Add the graphic |
my $title = &mt('Online Help'); |
my $title = &mt('Online Help'); |
my $helpicon=&lonhttpdurl("/res/adm/pages/help.png"); |
my $helpicon=&lonhttpdurl("/adm/help/help.png"); |
$template .= <<"ENDTEMPLATE"; |
$template .= <<"ENDTEMPLATE"; |
<a target="_top" href="$link" title="$title"><img src="$helpicon" border="0" alt="(Help: $topic)" /></a> |
<a target="_top" href="$link" title="$title"><img src="$helpicon" border="0" alt="(Help: $topic)" /></a> |
ENDTEMPLATE |
ENDTEMPLATE |
Line 4569 td.LC_menubuttons_img {
|
Line 4569 td.LC_menubuttons_img {
|
text-align: right; |
text-align: right; |
} |
} |
|
|
|
.LC_roleslog_note { |
|
font-size: smaller; |
|
} |
|
|
table.LC_aboutme_port { |
table.LC_aboutme_port { |
border: 0px; |
border: 0px; |
border-collapse: collapse; |
border-collapse: collapse; |
Line 8340 idx (reference to hash of counters used
|
Line 8344 idx (reference to hash of counters used
|
jsarray (reference to array of categories used to create Javascript arrays for |
jsarray (reference to array of categories used to create Javascript arrays for |
Domain Coordinator interface for editing Course Categories). |
Domain Coordinator interface for editing Course Categories). |
|
|
|
subcats (reference to hash of arrays containing all subcategories within each |
|
category, -recursive) |
|
|
Returns: nothing |
Returns: nothing |
|
|
Side effects: populates trails and allitems hash references. |
Side effects: populates trails and allitems hash references. |
Line 8347 Side effects: populates trails and allit
|
Line 8354 Side effects: populates trails and allit
|
=cut |
=cut |
|
|
sub extract_categories { |
sub extract_categories { |
my ($categories,$cats,$trails,$allitems,$idx,$jsarray) = @_; |
my ($categories,$cats,$trails,$allitems,$idx,$jsarray,$subcats) = @_; |
if (ref($categories) eq 'HASH') { |
if (ref($categories) eq 'HASH') { |
&gather_categories($categories,$cats,$idx,$jsarray); |
&gather_categories($categories,$cats,$idx,$jsarray); |
if (ref($cats->[0]) eq 'ARRAY') { |
if (ref($cats->[0]) eq 'ARRAY') { |
Line 8368 sub extract_categories {
|
Line 8375 sub extract_categories {
|
if (ref($cats->[1]{$name}) eq 'ARRAY') { |
if (ref($cats->[1]{$name}) eq 'ARRAY') { |
for (my $j=0; $j<@{$cats->[1]{$name}}; $j++) { |
for (my $j=0; $j<@{$cats->[1]{$name}}; $j++) { |
my $category = $cats->[1]{$name}[$j]; |
my $category = $cats->[1]{$name}[$j]; |
&recurse_categories($cats,2,$category,$trails,$allitems,\@parents); |
if (ref($subcats) eq 'HASH') { |
|
push(@{$subcats->{$item}},&escape($category).':'.&escape($name).':1'); |
|
} |
|
&recurse_categories($cats,2,$category,$trails,$allitems,\@parents,$subcats); |
|
} |
|
} else { |
|
if (ref($subcats) eq 'HASH') { |
|
$subcats->{$item} = []; |
} |
} |
} |
} |
} |
} |
Line 8407 Side effects: populates trails and allit
|
Line 8421 Side effects: populates trails and allit
|
=cut |
=cut |
|
|
sub recurse_categories { |
sub recurse_categories { |
my ($cats,$depth,$category,$trails,$allitems,$parents) = @_; |
my ($cats,$depth,$category,$trails,$allitems,$parents,$subcats) = @_; |
my $shallower = $depth - 1; |
my $shallower = $depth - 1; |
if (ref($cats->[$depth]{$category}) eq 'ARRAY') { |
if (ref($cats->[$depth]{$category}) eq 'ARRAY') { |
for (my $k=0; $k<@{$cats->[$depth]{$category}}; $k++) { |
for (my $k=0; $k<@{$cats->[$depth]{$category}}; $k++) { |
Line 8420 sub recurse_categories {
|
Line 8434 sub recurse_categories {
|
} |
} |
my $deeper = $depth+1; |
my $deeper = $depth+1; |
push(@{$parents},$category); |
push(@{$parents},$category); |
&recurse_categories($cats,$deeper,$name,$trails,$allitems,$parents); |
if (ref($subcats) eq 'HASH') { |
|
my $subcat = &escape($name).':'.$category.':'.$depth; |
|
for (my $j=@{$parents}; $j>=0; $j--) { |
|
my $higher; |
|
if ($j > 0) { |
|
$higher = &escape($parents->[$j]).':'. |
|
&escape($parents->[$j-1]).':'.$j; |
|
} else { |
|
$higher = &escape($parents->[$j]).'::'.$j; |
|
} |
|
push(@{$subcats->{$higher}},$subcat); |
|
} |
|
} |
|
&recurse_categories($cats,$deeper,$name,$trails,$allitems,$parents, |
|
$subcats); |
pop(@{$parents}); |
pop(@{$parents}); |
} |
} |
} else { |
} else { |
Line 8544 sub assign_category_rows {
|
Line 8572 sub assign_category_rows {
|
} |
} |
} |
} |
} |
} |
$text .= '<tr><td><label><input type="checkbox" name="usecategory" value="' |
$text .= '<tr><td><span class="LC_nobreak"><label>'. |
.$item.'"'.$checked.' />'.$name.'</label></span></td><td>'; |
'<input type="checkbox" name="usecategory" value="'. |
|
$item.'"'.$checked.' />'.$name.'</label></span></td><td>'; |
if (ref($path) eq 'ARRAY') { |
if (ref($path) eq 'ARRAY') { |
push(@{$path},$name); |
push(@{$path},$name); |
$text .= &assign_category_rows($itemcount,$cats,$deeper,$name,$path,$currcategories); |
$text .= &assign_category_rows($itemcount,$cats,$deeper,$name,$path,$currcategories); |
Line 8565 sub assign_category_rows {
|
Line 8594 sub assign_category_rows {
|
|
|
|
|
sub commit_customrole { |
sub commit_customrole { |
my ($udom,$uname,$url,$three,$four,$five,$start,$end) = @_; |
my ($udom,$uname,$url,$three,$four,$five,$start,$end,$context) = @_; |
my $output = &mt('Assigning custom role').' "'.$five.'" by '.$four.':'.$three.' in '.$url. |
my $output = &mt('Assigning custom role').' "'.$five.'" by '.$four.':'.$three.' in '.$url. |
($start?', '.&mt('starting').' '.localtime($start):''). |
($start?', '.&mt('starting').' '.localtime($start):''). |
($end?', ending '.localtime($end):'').': <b>'. |
($end?', ending '.localtime($end):'').': <b>'. |
&Apache::lonnet::assigncustomrole( |
&Apache::lonnet::assigncustomrole( |
$udom,$uname,$url,$three,$four,$five,$end,$start). |
$udom,$uname,$url,$three,$four,$five,$end,$start,undef,undef,$context). |
'</b><br />'; |
'</b><br />'; |
return $output; |
return $output; |
} |
} |