';
@@ -1222,6 +1315,8 @@ returns: nothing
my $faq = '';
my $bug = '';
my $help='';
+ # Crumb Symbol
+ my $crumbsymbol = ' ▶ ';
# The last breadcrumb does not have a link, so handle it separately.
my $last = pop(@Crumbs);
#
@@ -1229,20 +1324,23 @@ returns: nothing
if (!defined($menulink)) { $menulink=1; }
if ($menulink) {
my $description = 'Menu';
+ my $no_mt_descr = 0;
if (exists($env{'request.course.id'}) &&
$env{'request.course.id'} ne '') {
$description =
$env{'course.'.$env{'request.course.id'}.'.description'};
+ $no_mt_descr = 1;
}
unshift(@Crumbs,{
href =>'/adm/menu',
title =>'Go to main menu',
target =>'_top',
text =>$description,
+ no_mt =>$no_mt_descr,
});
}
my $links .=
- join('->',
+ join($crumbsymbol,
map {
$faq = $_->{'faq'} if (exists($_->{'faq'}));
$bug = $_->{'bug'} if (exists($_->{'bug'}));
@@ -1251,13 +1349,22 @@ returns: nothing
if (defined($_->{'target'}) && $_->{'target'} ne '') {
$result .= 'target="'.$_->{'target'}.'" ';
}
- $result .='title="'.&mt($_->{'title'}).'">'.
- &mt($_->{'text'}).'';
+ if ($_->{'no_mt'}) {
+ $result .='title="'.$_->{'title'}.'">'.
+ $_->{'text'}.'';
+ } else {
+ $result .='title="'.&mt($_->{'title'}).'">'.
+ &mt($_->{'text'}).'';
+ }
$result;
} @Crumbs
);
- $links .= '->' if ($links ne '');
- $links .= ''.&mt($last->{'text'}).'';
+ $links .= $crumbsymbol if ($links ne '');
+ if ($last->{'no_mt'}) {
+ $links .= ''.$last->{'text'}.'';
+ } else {
+ $links .= ''.&mt($last->{'text'}).'';
+ }
#
my $icons = '';
$faq = $last->{'faq'} if (exists($last->{'faq'}));
@@ -1270,20 +1377,25 @@ returns: nothing
# if ($bug ne '') {
# $icons .= &Apache::loncommon::help_open_bug($bug);
# }
- if ($helplink ne 'nohelp') {
+ if ($faq ne '' || $component_help ne '' || $bug ne '') {
$icons .= &Apache::loncommon::help_open_menu($component,
$component_help,
$faq,$bug);
}
- if ($icons ne '') {
- $Str .= $icons.' ';
- }
#
$Str .= $links.' | ';
#
if (defined($component)) {
- $Str .= ''.
- &mt($component).' | ';
+ $Str .= '';
+ if ($no_mt) {
+ $Str .= $component;
+ } else {
+ $Str .= &mt($component);
+ }
+ if ($icons ne '') {
+ $Str .= ' '.$icons;
+ }
+ $Str .= ' | ';
}
$Str .= '
'."\n";
#
@@ -1318,8 +1430,8 @@ returns: nothing
# row1
# row2
# row3 ... etc.
-# &submit_row(0
-# &end_pickbox()
+# &submit_row()
+# &end_pick_box()
#
# where row1, row 2 etc. are chosen from &role_select_row,&course_select_row,
# &status_select_row and &email_default_row
@@ -1380,6 +1492,13 @@ END
return $output;
}
+sub row_headline {
+ my $output = <<"END";
+
- $title:
+ $title
|
ENDONE
@@ -1416,7 +1538,7 @@ ENDTWO
}
sub role_select_row {
- my ($roles,$title,$css_class) = @_;
+ my ($roles,$title,$css_class,$show_separate_custom,$cdom,$cnum) = @_;
my $output;
if (defined($title)) {
$output = &row_title($title,$css_class);
@@ -1427,10 +1549,25 @@ sub role_select_row {
my $plrole;
if ($role eq 'ow') {
$plrole = &mt('Course Owner');
+ } elsif ($role eq 'cr') {
+ if ($show_separate_custom) {
+ if ($cdom ne '' && $cnum ne '') {
+ my %course_customroles = &course_custom_roles($cdom,$cnum);
+ foreach my $crrole (sort(keys(%course_customroles))) {
+ my ($plcrrole) = ($crrole =~ m|^cr/[^/]+/[^/]+/(.+)$|);
+ $output .= ' ';
+ }
+ }
+ } else {
+ $plrole = &mt('Custom Role');
+ }
} else {
$plrole=&Apache::lonnet::plaintext($role);
}
- $output .= ' ';
+ if (($role ne 'cr') || (!$show_separate_custom)) {
+ $output .= ' ';
+ }
}
$output .= qq| \n|;
if (defined($title)) {
@@ -1443,7 +1580,14 @@ sub course_select_row {
my ($title,$formname,$totcodes,$codetitles,$idlist,$idlist_titles,
$css_class) = @_;
my $output = &row_title($title,$css_class);
- $output .= qq|
+ $output .= &course_selection($formname,$totcodes,$codetitles,$idlist,$idlist_titles);
+ $output .= &row_closure();
+ return $output;
+}
+
+sub course_selection {
+ my ($formname,$totcodes,$codetitles,$idlist,$idlist_titles) = @_;
+ my $output = qq|
|