");
+ $("#LC_rt_"+id).click(editorHandler);
+ });
+
+
+ });
+';
+ $output .= &color_picker();
+
+ $output .= &countdown();
+
+ $output .= <<"JAVASCRIPT";
+
+ /* This code describes the spellcheck options that will be used for
+ items with class 'spellchecked'. It is necessary for those objects'
+ to explicitly request checking (e.g. onblur is a nice event for that).
+ */
+ \$(document).ready(function() {
+ \$(".spellchecked").spellchecker({
+ url: "/ajax/spellcheck",
+ lang: "en",
+ engine: "pspell",
+ suggestionBoxPosition: "below",
+ innerDocument: true
+ });
+ \$("textarea.spellchecked").spellchecker({
+ url: "/ajax/spellcheck",
+ lang: "en",
+ engine: "pspell",
+ suggestionBoxPosition: "below",
+ innerDocument: true
+ });
+
+ });
+
+ /* the muli colored editor can generate spellcheck with language 'none'
+ to disable spellcheck as well
+ */
+ function doSpellcheck(element, lang) {
+ if (lang != 'none') {
+ \$(element).spellchecker('option', {lang: lang});
+ \$(element).spellchecker('check');
+ }
+ }
+
+
+JAVASCRIPT
+ if ($dragmath_prefix ne '') {
+ $output .= '
+
+ function editmath_visibility(id,value) {
+
+ if ((id == "") || (id == null)) {
+ return;
+ }
+ var mathid = "'.$dragmath_prefix.'_"+id;
+ mathele = document.getElementById(mathid);
+ if (mathele == null) {
+ return;
+ }
+ mathele.style.display = value;
+ var mathhelpicon = "'.$dragmath_prefix.'helpicon'.'_"+id;
+ mathhelpiconele = document.getElementById(mathhelpicon);
+ if (mathhelpiconele == null) {
+ return;
+ }
+ if (value == "none") {
+ mathhelpiconele.src = "'.$dragmath_whitespace.'";
+ } else {
+ mathhelpiconele.src = "'.$dragmath_helpicon.'";
+ }
+ }
+';
+
+ }
+ $output.="\nwindow.status='Activated Editfields';\n"
+ .'// END LON-CAPA Internal -->'."\n"
+ .'// ]]>'."\n"
+ .'';
return $output;
}
@@ -1306,34 +1729,227 @@ sub htmlareabrowser {
return 1;
}
+#
+# Should the "return to content" link be shown?
+#
+
+sub show_return_link {
+
+ unless ($env{'request.course.id'}) { return 0; }
+ if ($env{'request.noversionuri'}=~m{^/priv/} ||
+ $env{'request.uri'}=~m{^/priv/}) { return 1; }
+ return if (($env{'request.noversionuri'} eq '/adm/supplemental') &&
+ ($env{'form.folder'} ne 'supplemental'));
+ return if (($env{'form.folderpath'} ne '') &&
+ (($env{'request.noversionuri'} =~ m{^/adm/$match_domain/$match_username/aboutme$}) ||
+ ($env{'request.noversionuri'} =~ m{^/public/$match_domain/$match_courseid/syllabus$})));
+ return if (($env{'course.'.$env{'request.course.id'}.'.type'} eq 'Placement') &&
+ (!$env{'request.role.adv'}));
+ if (($env{'request.noversionuri'} =~ m{^/adm/viewclasslist($|\?)})
+ || ($env{'request.noversionuri'} =~ m{^/adm/.*/aboutme($|\?)})) {
+
+ return if ($env{'form.register'});
+ }
+ if ((($env{'request.symb'} ne '') || ($env{'form.folderpath'} ne '')) &&
+ ($env{'request.noversionuri'} =~m{^/adm/coursedocs/showdoc/uploaded/($match_domain)/($match_courseid)/(docs|supplemental)/})) {
+ my ($cdom,$cnum,$area) = ($1,$2,$3);
+ if (($env{'course.'.$env{'request.course.id'}.'.domain'} eq $cdom) &&
+ ($env{'course.'.$env{'request.course.id'}.'.num'} eq $cnum)) {
+ if (($env{'request.symb'}) && ($area eq 'docs')) {
+ my ($map,$resid,$url) = &Apache::lonnet::decode_symb($env{'request.symb'});
+ return if ($env{'request.noversionuri'} eq '/adm/coursedocs/showdoc/'.$url);
+ } elsif (($env{'form.folderpath'}) && ($area eq 'supplemental')) {
+ return;
+ }
+ }
+ }
+ return (($env{'request.noversionuri'}=~m{^/(res|public)/} &&
+ $env{'request.symb'} eq '')
+ ||
+ ($env{'request.noversionuri'}=~ m{^/cgi-bin/printout.pl})
+ ||
+ (($env{'request.noversionuri'}=~/^\/adm\//) &&
+ ($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) &&
+ ($env{'request.noversionuri'}!~
+ m{^/adm/.*/(smppg|bulletinboard|ext\.tool)($|\?)})
+ ));
+}
+
+
+##
+# Set the dueDate variable...note this is done in the timezone
+# of the browser.
+#
+# @param epoch relative time at which the problem is due.
+#
+# @return the javascript fragment to set the date:
+#
+sub set_due_date {
+ my $dueStamp = shift;
+ my $duems = $dueStamp * 1000; # Javascript Date object needs ms not seconds.
+
+ my $now = time()*1000;
+
+ # This slightly obscure bit of javascript sets the dueDate variable
+ # to the time in the browser at which the problem was due.
+ # The code should correct for gross differences between the server
+ # and client's time setting
+
+ return <<"END";
+
+
+
+END
+}
+##
+# Sets the time at which the problem finished computing.
+# This just updates the serverTime and clientTime variables above.
+# Calling this in e.g. end_problem provides a better estimate of the
+# difference beetween the server and client time setting as
+# the difference contains less of the latency/problem compute time.
+#
+sub set_compute_end_time {
+
+ my $now = time()*1000; # Javascript times are in ms.
+ return <<"END";
+
+
+
+END
+}
+
+##
+# Client-side javascript to convert any dashes in text pasted
+# into textbox(es) for numericalresponse item(s) to a standard
+# minus, i.e., - . Calls to dash_to_minus_js() in end_problem()
+# and in loncommon::endbodytag() for a .page (arg: dashjs => 1)
+#
+# Will apply to any input tag with class: LC_numresponse_text.
+# Currently set in start_textline for numericalresponse items.
+#
+
+sub dash_to_minus_js {
+ return <<'ENDJS';
+
+
+
+ENDJS
+}
+
############################################################
############################################################
=pod
-=item breadcrumbs
+=item &breadcrumbs()
Compiles the previously registered breadcrumbs into an series of links.
-FAQ and BUG links will be placed on the left side of the table if they
-are defined for the last registered breadcrumb.
Additionally supports a 'component', which will be displayed on the
-right side of the table (without a link).
+right side of the breadcrumbs enclosing div (without a link).
A link to help for the component will be included if one is specified.
All inputs can be undef without problems.
-Inputs: $component (the large text on the right side of the table),
- $component_help
- $menulink (boolean, controls whether to include a link to /adm/menu)
- $helplink (if 'nohelp' don't include the orange help link)
- $css_class (optional name for the class to apply to the table for CSS)
+=over
+
+=item Inputs:
+
+=over
+
+=item $component
+
+the text on the right side of the breadcrumbs trail
+
+=item $component_help
+
+the help item filename (without .tex extension).
+
+=item $menulink
+
+boolean, controls whether to include a link to /adm/menu
+
+=item $helplink
+
+if 'nohelp' don't include the orange help link
+
+=item $css_class
+
+optional name for the class to apply to the table for CSS
+
+=item $no_mt
+
+optional flag, 1 if &mt() is _not_ to be applied to $component when including the text on the right
+
+=item $CourseBreadcrumbs
+
+optional flag, 1 if &breadcrumbs called from &docs_breadcrumbs, because breadcrumbs are being
+used to display hierarchy for current folder shown in the Course Editor.
+
+=item $topic_help
+
+optional help item to be displayed on right side of the breadcrumbs row, using
+loncommon::help_open_topic() to generate the link.
+
+=item $topic_help_text
+
+text to include in the link in the optional help item ($topic_help) on the right
+side of the breadcrumbs row.
+
+=item $links_target
+
+optionally includes the target (_top, _parent or _self) for (i) initial
+$menulink item in the breadcrumbs (if present), (ii) return to last location
+(if present), and (iii) help item at the right side of breadcrumbs menu,
+created by loncommon::help_open_topic() or loncommon::help_open_menu().
+
+=back
+
+=back
+
Returns a string containing breadcrumbs for the current page.
-=item clear_breadcrumbs
+=item &clear_breadcrumbs()
Clears the previously stored breadcrumbs.
-=item add_breadcrumb
+=item &add_breadcrumb()
Pushes a breadcrumb on the stack of crumbs.
@@ -1350,71 +1966,121 @@ returns: nothing
############################################################
{
my @Crumbs;
+ my %tools = ();
sub breadcrumbs {
- my ($component,$component_help,$menulink,$helplink,$css_class,$no_mt) = @_;
- #
- $css_class ||= 'LC_breadcrumbs';
- my $Str = "\n".'
';
+ my ($component,$component_help,$menulink,$helplink,$css_class,$no_mt,
+ $CourseBreadcrumbs,$topic_help,$topic_help_text,$links_target) = @_;
#
+ $css_class ||= 'LC_breadcrumbs';
+
# Make the faq and bug data cascade
- my $faq = '';
- my $bug = '';
- my $help='';
- # Crumb Symbol
- my $crumbsymbol = '» ';
+ 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);
#
# The first one should be the course or a menu link
- if (!defined($menulink)) { $menulink=1; }
+ if (!defined($menulink)) { $menulink=1; }
+ if ($menulink) {
+ if ($env{'request.course.id'}) {
+ my ($menucoll,$deeplinkmenu,$menuref) = &Apache::loncommon::menucoll_in_effect();
+ if (($menucoll) && (ref($menuref) eq 'HASH')) {
+ if ($menuref->{'main'} eq 'n') {
+ undef($menulink);
+ }
+ }
+ }
+ }
if ($menulink) {
my $description = 'Menu';
my $no_mt_descr = 0;
- if (exists($env{'request.course.id'}) &&
- $env{'request.course.id'} ne '') {
+ if ((exists($env{'request.course.id'})) &&
+ ($env{'request.course.id'} ne '') &&
+ ($env{'course.'.$env{'request.course.id'}.'.description'} ne '')) {
$description =
$env{'course.'.$env{'request.course.id'}.'.description'};
$no_mt_descr = 1;
+ if ($env{'request.noversionuri'} =~
+ m{^/?public/($match_domain)/($match_courseid)/syllabus$}) {
+ unless (($env{'course.'.$env{'request.course.id'}.'.domain'} eq $1) &&
+ ($env{'course.'.$env{'request.course.id'}.'.num'} eq $2)) {
+ $description = 'Menu';
+ $no_mt_descr = 0;
+ }
+ }
}
- unshift(@Crumbs,{
- href =>'/adm/menu',
- title =>'Go to main menu',
- target =>'_top',
- text =>$description,
- no_mt =>$no_mt_descr,
- });
- }
- my $links .=
- join($crumbsymbol,
- map {
- $faq = $_->{'faq'} if (exists($_->{'faq'}));
- $bug = $_->{'bug'} if (exists($_->{'bug'}));
- $help = $_->{'help'} if (exists($_->{'help'}));
- my $result = '{'target'}) && $_->{'target'} ne '') {
- $result .= 'target="'.$_->{'target'}.'" ';
- }
- if ($_->{'no_mt'}) {
- $result .='title="'.$_->{'title'}.'">'.
- $_->{'text'}.'';
- } else {
- $result .='title="'.&mt($_->{'title'}).'">'.
- &mt($_->{'text'}).'';
- }
- $result;
- } @Crumbs
- );
- $links .= $crumbsymbol if ($links ne '');
- if ($last->{'no_mt'}) {
- $links .= ''.$last->{'text'}.'';
- } else {
- $links .= ''.&mt($last->{'text'}).'';
- }
- #
+ my $target = '_top';
+ if ($links_target) {
+ $target = $links_target;
+ } elsif ((($env{'request.lti.login'}) && ($env{'request.lti.target'} eq 'iframe')) ||
+ (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'} eq '_self'))) {
+ $target='';
+ }
+ $menulink = { href =>'/adm/menu',
+ title =>'Go to main menu',
+ target =>$target,
+ text =>$description,
+ no_mt =>$no_mt_descr, };
+ if($last) {
+ #$last set, so we have some crumbs
+ unshift(@Crumbs,$menulink);
+ } else {
+ #only menulink crumb present
+ $last = $menulink;
+ }
+ }
+ my $links;
+ if ((&show_return_link) && (!$CourseBreadcrumbs) && (ref($last) eq 'HASH')) {
+ my $alttext = &mt('Go Back');
+ my $hashref = { href => '/adm/flip?postdata=return:',
+ title => &mt('Back to most recent content resource'),
+ class => 'LC_menubuttons_link',
+ };
+ if ($links_target) {
+ $hashref->{'target'} = $links_target;
+ }
+ $links=&htmltag( 'a','',
+ $hashref);
+ $links=&htmltag('li',$links);
+ }
+ $links.= join "",
+ map {
+ $faq = $_->{'faq'} if (exists($_->{'faq'}));
+ $bug = $_->{'bug'} if (exists($_->{'bug'}));
+ $help = $_->{'help'} if (exists($_->{'help'}));
+
+ my $result = $_->{no_mt} ? $_->{text} : &mt($_->{text});
+
+ if ($_->{href}){
+ $result = &htmltag( 'a', $result,
+ { href => $_->{href},
+ title => $_->{no_mt} ? $_->{title} : &mt($_->{title}),
+ target => $_->{target}, });
+ }
+
+ $result = &htmltag( 'li', "$result $crumbsymbol");
+ } @Crumbs;
+
+ #should the last Element be translated?
+
+ my $lasttext = $last->{'no_mt'} ? $last->{'text'}
+ : mt( $last->{'text'} );
+
+ # last breadcrumb is the first order heading of a page
+ # for course breadcrumbs it's just bold
+
+ if ($lasttext ne '') {
+ $links .= &htmltag( 'li', htmltag($CourseBreadcrumbs ? 'b' : 'h1',
+ $lasttext), {title => $lasttext});
+ }
+
my $icons = '';
- $faq = $last->{'faq'} if (exists($last->{'faq'}));
- $bug = $last->{'bug'} if (exists($last->{'bug'}));
+ $faq = $last->{'faq'} if (exists($last->{'faq'}));
+ $bug = $last->{'bug'} if (exists($last->{'bug'}));
$help = $last->{'help'} if (exists($last->{'help'}));
$component_help=($component_help?$component_help:$help);
# if ($faq ne '') {
@@ -1423,45 +2089,304 @@ returns: nothing
# if ($bug ne '') {
# $icons .= &Apache::loncommon::help_open_bug($bug);
# }
- if ($faq ne '' || $component_help ne '' || $bug ne '') {
- $icons .= &Apache::loncommon::help_open_menu($component,
- $component_help,
- $faq,$bug);
- }
- #
- $Str .= $links.'
';
+ if ($faq ne '' || $component_help ne '' || $bug ne '') {
+ $icons .= &Apache::loncommon::help_open_menu($component,
+ $component_help,
+ $faq,$bug,'','','','',
+ $links_target);
+ }
+ if ($topic_help && $topic_help_text) {
+ $icons .= ' '.&Apache::loncommon::help_open_topic($topic_help,&mt($topic_help_text),'',
+ undef,600,'',$links_target);
+ }
#
- if (defined($component)) {
- $Str .= '
';
- if ($no_mt) {
- $Str .= $component;
+
+
+ if ($links ne '') {
+ unless ($CourseBreadcrumbs) {
+ $links = &htmltag('ol', $links, { id => "LC_MenuBreadcrumbs" });
} else {
- $Str .= &mt($component);
+ $links = &htmltag('ul', $links, { class => "LC_CourseBreadcrumbs" });
}
- if ($icons ne '') {
- $Str .= ' '.$icons;
- }
- $Str .= '
';
}
- $Str .= '
'."\n";
- #
+
+
+ if (($component) || ($topic_help && $topic_help_text)) {
+ $links = &htmltag('span',
+ ( $no_mt ? $component : mt($component) ).
+ ( $icons ? $icons : '' ),
+ { class => 'LC_breadcrumbs_component' } )
+ .$links
+;
+ }
+ my $nav_and_tools = 0;
+ foreach my $item ('navigation','tools') {
+ if (ref($tools{$item}) eq 'ARRAY') {
+ $nav_and_tools += scalar(@{$tools{$item}})
+ }
+ }
+ if (($links ne '') || ($nav_and_tools)) {
+ &render_tools(\$links);
+ $links = &htmltag('div', $links,
+ { id => "LC_breadcrumbs" }) unless ($CourseBreadcrumbs) ;
+ }
+ my $adv_tools = 0;
+ if (ref($tools{'advtools'}) eq 'ARRAY') {
+ $adv_tools = scalar(@{$tools{'advtools'}});
+ }
+ if (($links ne '') || ($adv_tools)) {
+ &render_advtools(\$links);
+ }
+
# Return the @Crumbs stack to what we started with
push(@Crumbs,$last);
shift(@Crumbs);
- #
- return $Str;
+
+
+ # Return the breadcrumb's line
+
+
+
+ return "$links";
}
sub clear_breadcrumbs {
undef(@Crumbs);
+ undef(%tools);
}
sub add_breadcrumb {
- push (@Crumbs,@_);
+ push(@Crumbs,@_);
+ }
+
+=item &add_breadcrumb_tool($category, $html)
+
+Adds $html to $category of the breadcrumb toolbar container.
+
+$html is usually a link to a page that invokes a function on the currently
+displayed data (e.g. print when viewing a problem)
+
+=over
+
+=item Currently there are 3 possible values for $category:
+
+=over
+
+=item navigation
+left of breadcrumbs line
+
+=item tools
+remaining items in right of breadcrumbs line
+
+=item advtools
+advanced tools shown in a separate box below breadcrumbs line
+
+=back
+
+=back
+
+returns: nothing
+
+=cut
+
+ sub add_breadcrumb_tool {
+ my ($category, @html) = @_;
+ return unless @html;
+ if (!keys(%tools)) {
+ %tools = ( navigation => [], tools => [], advtools => []);
+ }
+
+ #this cleans data received from lonmenu::innerregister
+ @html = grep {defined $_ && $_ ne ''} @html;
+ for (@html) {
+ s/align="(right|left)"//;
+# s/// if $category ne 'advtools';
+ }
+
+ push @{$tools{$category}}, @html;
+ }
+
+=item &clear_breadcrumb_tools()
+
+Clears the breadcrumb toolbar container.
+
+returns: nothing
+
+=cut
+
+ sub clear_breadcrumb_tools {
+ undef(%tools);
+ }
+
+=item ¤t_breadcrumb_tools()
+
+returns: a hash containing the current breadcrumb tools.
+
+=cut
+
+ sub current_breadcrumb_tools {
+ return %tools;
+ }
+
+=item &render_tools(\$breadcrumbs)
+
+Creates html for breadcrumb tools (categories navigation and tools) and inserts
+\$breadcrumbs at the correct position.
+
+=over
+
+=item input:
+
+=over
+
+=item \$breadcrumbs - a reference to the string containing prepared breadcrumbs.
+
+=back
+
+=back
+
+returns: nothing
+
+=cut
+
+#TODO might split this in separate functions for each category
+ sub render_tools {
+ my ($breadcrumbs) = @_;
+ return unless (keys(%tools));
+
+ my $navigation = list_from_array($tools{navigation},
+ { listattr => { class=>"LC_breadcrumb_tools_navigation" } });
+ my $tools = list_from_array($tools{tools},
+ { listattr => { class=>"LC_breadcrumb_tools_tools" } });
+ $$breadcrumbs = list_from_array([$navigation, $tools, $$breadcrumbs],
+ { listattr => { class=>'LC_breadcrumb_tools_outerlist' } });
+ }
+
+=pod
+
+=item &render_advtools(\$breadcrumbs)
+
+Creates html for advanced tools (category advtools) and inserts \$breadcrumbs
+at the correct position.
+
+=over
+
+=item input:
+
+=over
+
+=item \$breadcrumbs - a reference to the string containing prepared breadcrumbs (after render_tools call).
+
+=back
+
+=back
+
+returns: nothing
+
+=cut
+
+ sub render_advtools {
+ my ($breadcrumbs) = @_;
+ return unless (defined $tools{'advtools'})
+ and (scalar(@{$tools{'advtools'}}) > 0);
+
+ $$breadcrumbs .= Apache::loncommon::head_subbox(
+ funclist_from_array($tools{'advtools'}) );
}
} # End of scope for @Crumbs
+sub docs_breadcrumbs {
+ my ($allowed,$crstype,$contenteditor,$title,$precleared,$checklinkprot)=@_;
+ my ($folderpath,@folders,$supplementalflag);
+ @folders = split('&',$env{'form.folderpath'});
+ if ($env{'form.folderpath'} =~ /^supplemental/) {
+ $supplementalflag = 1;
+ }
+ my $plain='';
+ my $container = 'sequence';
+ my ($randompick,$isencrypted,$ishidden,$is_random_order) = (-1,0,0,0);
+ my @docs_crumbs;
+ while (@folders) {
+ my $folder=shift(@folders);
+ my $foldername=shift(@folders);
+ if ($folderpath) {$folderpath.='&';}
+ $folderpath.=$folder.'&'.$foldername;
+ my $url = $env{'request.use_absolute'};
+ if ($allowed) {
+ $url .= '/adm/coursedocs?folderpath=';
+ } else {
+ $url .= '/adm/supplemental?folderpath=';
+ }
+ $url .= &escape($folderpath);
+ my $name=&unescape($foldername);
+# each of randompick number, hidden, encrypted, random order, is_page
+# are appended with ":"s to the foldername
+ $name=~s/\:(\d*)\:(\w*)\:(\w*):(\d*)\:?(\d*)$//;
+ if ($contenteditor) {
+ if ($supplementalflag) {
+ if ($2) { $ishidden=1; }
+ } else {
+ if ($1 ne '') {
+ $randompick=$1;
+ } else {
+ $randompick=-1;
+ }
+ if ($2) { $ishidden=1; }
+ if ($3) { $isencrypted=1; }
+ if ($4 ne '') { $is_random_order = 1; }
+ if ($5 == 1) {$container = 'page'; }
+ }
+ }
+ if ($folder eq 'supplemental') {
+ $name = &mt('Supplemental Content');
+ }
+ if ($contenteditor) {
+ $plain.=$name.' > ';
+ }
+ push(@docs_crumbs,
+ {'href' => $url,
+ 'title' => $name,
+ 'text' => $name,
+ 'no_mt' => 1,
+ });
+ }
+ if ($title) {
+ push(@docs_crumbs,
+ {'title' => $title,
+ 'text' => $title,
+ 'no_mt' => 1,}
+ );
+ }
+ if (wantarray) {
+ unless ($precleared) {
+ &clear_breadcrumbs();
+ }
+ &add_breadcrumb(@docs_crumbs);
+ if ($contenteditor) {
+ $plain=~s/\>\;\s*$//;
+ }
+ my $menulink = 0;
+ if (!$allowed && !$contenteditor && !$supplementalflag) {
+ $menulink = 1;
+ }
+ if ($checklinkprot) {
+ if ($env{'request.deeplink.login'}) {
+ my $linkprotout = &Apache::lonmenu::linkprot_exit();
+ if ($linkprotout) {
+ &Apache::lonhtmlcommon::add_breadcrumb_tool('tools',$linkprotout);
+ }
+ }
+ }
+ return (&breadcrumbs(undef,undef,$menulink,'nohelp',undef,undef,
+ $contenteditor),
+ $randompick,$ishidden,$isencrypted,$plain,
+ $is_random_order,$container);
+ } else {
+ return \@docs_crumbs;
+ }
+}
+
############################################################
############################################################
@@ -1522,15 +2447,19 @@ returns: nothing
my @row_count;
sub start_pick_box {
- my ($css_class) = @_;
+ my ($css_class,$id) = @_;
if (defined($css_class)) {
$css_class = 'class="'.$css_class.'"';
} else {
$css_class= 'class="LC_pick_box"';
}
+ my $table_id;
+ if (defined($id)) {
+ $table_id = ' id="'.$id.'"';
+ }
unshift(@row_count,0);
my $output = <<"END";
-
+
END
return $output;
}
@@ -1551,7 +2480,7 @@ END
}
sub row_title {
- my ($title,$css_title_class,$css_value_class) = @_;
+ my ($title,$css_title_class,$css_value_class, $css_value_furtherAttributes) = @_;
$row_count[0]++;
my $css_class = ($row_count[0] % 2)?'LC_odd_row':'LC_even_row';
$css_title_class ||= 'LC_pick_box_title';
@@ -1563,7 +2492,7 @@ sub row_title {
$title .= ':';
}
my $output = <<"ENDONE";
-
+
$title
@@ -1591,15 +2520,18 @@ ENDTWO
} # End: row_count block for pick_box
-
sub role_select_row {
my ($roles,$title,$css_class,$show_separate_custom,$cdom,$cnum) = @_;
+ my $crstype = 'Course';
+ if ($cdom ne '' && $cnum ne '') {
+ $crstype = &Apache::loncommon::course_type($cdom.'_'.$cnum);
+ }
my $output;
if (defined($title)) {
$output = &row_title($title,$css_class);
}
$output .= qq|
-