--- loncom/interface/loncommon.pm 2009/07/26 20:39:46 1.866 +++ loncom/interface/loncommon.pm 2009/07/27 11:30:05 1.867 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.866 2009/07/26 20:39:46 kalberla Exp $ +# $Id: loncommon.pm,v 1.867 2009/07/27 11:30:05 kalberla Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3872,19 +3872,19 @@ sub build_block_table { $output .= &end_data_table(); } sub blocking_status { - my $blocked = blocking_status_print(@_); + my $blocked; my ($activity,$uname,$udom) = @_; + my %setters; + my ($startblock,$endblock)=&blockcheck(\%setters,$activity,$uname,$udom); + if ($startblock && $endblock) { + $blocked = 1; + } if(!wantarray) { return $blocked; } my $output; my $querystring; $querystring = "?activity=$activity"; - if(defined($uname)) { - $querystring .= "&uname=$uname"; - }if(defined($udom)) { - $querystring .= "&udom=$udom"; - } $output .= <<"END_MYBLOCK"; END_MYBLOCK my $popupUrl = "/adm/blockingstatus/$querystring"; - $output.="\nBlocking Table"; + $output .= <<"END_BLOCK"; +
+ + Communication Blocking + Communication Blocking +
+ +END_BLOCK return ($blocked, $output); } -sub blocking_status_print { - my ($activity,$uname,$udom) = @_; - my %setters; - my ($blocked,$output,$ownitem,$is_course); - my ($startblock,$endblock)=&blockcheck(\%setters,$activity,$uname,$udom); - if ($startblock && $endblock) { - $blocked = 1; - if (wantarray) { - my $category; - if ($activity eq 'boards') { - $category = 'Discussion posts in this course'; - } elsif ($activity eq 'chat') { - $category = 'Chat'; - } elsif ($activity eq 'msgdisplay') { - $category = 'This message'; - } elsif ($activity eq 'blogs') { - $category = 'Blogs'; - } elsif ($activity eq 'port') { - if (defined($uname) && defined($udom)) { - if ($uname eq $env{'user.name'} && - $udom eq $env{'user.domain'}) { - $ownitem = 1; - } - } - $is_course = &Apache::lonnet::is_course($udom,$uname); - if ($ownitem) { - $category = 'Your portfolio files'; - } elsif ($is_course) { - my $coursedesc; - foreach my $course (keys(%setters)) { - my %courseinfo = - &Apache::lonnet::coursedescription($course); - $coursedesc = $courseinfo{'description'}; - } - $category = "Group portfolio in the course '$coursedesc'"; - } else { - $category = 'Portfolio files belonging to '; - if ($env{'user.name'} eq 'public' && - $env{'user.domain'} eq 'public') { - $category .= &plainname($uname,$udom); - } else { - $category .= &aboutmewrapper(&plainname($uname,$udom),$uname,$udom); - } - } - } elsif ($activity eq 'groups') { - $category = 'Groups in this course'; - } else { - $category = 'Communication'; - } - my $showstart = &Apache::lonlocal::locallocaltime($startblock); - my $showend = &Apache::lonlocal::locallocaltime($endblock); - $output = '
'.&mt('[_1] will be inaccessible between [_2] and [_3] because communication is being blocked.',$category,$showstart,$showend).'
'; - if (!($activity eq 'port' && !($ownitem) && !($is_course))) { - $output .= &build_block_table($startblock,$endblock,\%setters); - } - } - } - if (wantarray) { - return ($blocked,$output); - } else { - return $blocked; - } -} ############################################### @@ -5447,12 +5391,27 @@ div.LC_feedback_link { div.LC_feedback_link img { height: 22px; + vertical-align:middle; } div.LC_feedback_link a{ text-decoration: none; } +div.LC_comblock { + display:inline; + color:$font; + font-size:90%; +} + +div.LC_feedback_link div.LC_comblock { + padding-left:5px; +} + +div.LC_feedback_link div.LC_comblock a { + color:$font; +} + span.LC_feedback_link { /* background: $feedback_link_bg; */ font-size: larger; @@ -6506,6 +6465,8 @@ $args - additional optional args support inherit_jsmath -> when creating popup window in a page, should it have jsmath forced on by the current page + bread_crumbs -> Array containing breadcrumbs + bread_crumbs_components -> if exists show it as headline else show only the breadcrumbs =back