@@ -2932,21 +3108,83 @@ sub build_block_table {
my %courseinfo=&Apache::lonnet::coursedescription($course);
for (my $i=0; $i<@{$$setters{$course}{staff}}; $i++) {
my ($uname,$udom) = @{$$setters{$course}{staff}[$i]};
- my $fullname = &Apache::loncommon::plainname($uname,$udom);
+ my $fullname = &plainname($uname,$udom);
+ if (defined($env{'user.name'}) && defined($env{'user.domain'})
+ && $env{'user.name'} ne 'public'
+ && $env{'user.domain'} ne 'public') {
+ $fullname = &aboutmewrapper($fullname,$uname,$udom);
+ }
my ($openblock,$closeblock) = @{$$setters{$course}{times}[$i]};
$openblock = &Apache::lonlocal::locallocaltime($openblock);
$closeblock= &Apache::lonlocal::locallocaltime($closeblock);
$output .= &Apache::loncommon::start_data_table_row().
''.$courseinfo{'description'}.' | '.
''.$openblock.' to '.$closeblock.' | '.
- ''.$fullname.' ('.$uname.':'.$udom.
- ') | '.
+ ''.$fullname.' | '.
&Apache::loncommon::end_data_table_row();
}
}
$output .= &end_data_table();
}
+sub blocking_status {
+ 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 '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 files 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';
+ }
+ 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;
+ }
+}
+
###############################################
=pod
@@ -3119,8 +3357,8 @@ sub bodytag {
# role and realm
my ($role,$realm) = split(/\./,$env{'request.role'},2);
if ($role eq 'ca') {
- my ($rdom,$rname) = ($realm =~ m-^/(\w+)/(\w+)$-);
- $realm = &plainname($rname,$rdom).':'.$rdom;
+ my ($rdom,$rname) = ($realm =~ m{^/($match_domain)/($match_username)$});
+ $realm = &plainname($rname,$rdom);
}
# realm
if ($env{'request.course.id'}) {
@@ -3416,6 +3654,7 @@ sub standard_css {
my $mail_other = '#99BBBB';
my $mail_other_hover = '#669999';
my $table_header = '#DDDDDD';
+ my $feedback_link_bg = '#BBBBBB';
my $border = ($env{'browser.type'} eq 'explorer') ? '0px 2px 0px 2px'
: '0px 3px 0px 4px';
@@ -3597,6 +3836,18 @@ table.LC_data_table, table.LC_mail_list
.LC_data_table_dense {
font-size: small;
}
+table.LC_nested_outer {
+ border: 1px solid #000000;
+ border-collapse: separate;
+ border-spacing: 0px;
+ width: 100%;
+}
+table.LC_nested {
+ border: 0px;
+ border-collapse: separate;
+ border-spacing: 0px;
+ width: 100%;
+}
table.LC_data_table tr th, table.LC_calendar tr th, table.LC_mail_list tr th {
font-weight: bold;
background-color: $data_table_head;
@@ -3615,38 +3866,50 @@ table.LC_data_table tr.LC_data_table_hig
background-color: $data_table_darker;
}
table.LC_data_table tr.LC_empty_row td,
-table.LC_whatsnew tr.LC_empty_row td {
+table.LC_nested tr.LC_empty_row td {
background-color: #FFFFFF;
font-weight: bold;
font-style: italic;
text-align: center;
padding: 8px;
}
-table.LC_whatsnew tr.LC_empty_row td {
+table.LC_nested tr.LC_empty_row td {
padding: 4ex
}
-
-
-table.LC_whatsnew {
+table.LC_nested_outer tr th {
+ font-weight: bold;
+ background-color: $data_table_head;
+ font-size: smaller;
+ border-bottom: 1px solid #000000;
}
-
-table.LC_whatsnew tr th,
-table.LC_whatsnew tr.LC_info_row td {
- background-color: #CCC;
+table.LC_nested_outer tr td.LC_subheader {
+ background-color: $data_table_head;
font-weight: bold;
font-size: small;
+ border-bottom: 1px solid #000000;
text-align: right;
}
-table.LC_whatsnew tr td {
- background-color: #FFF;
+table.LC_nested tr.LC_info_row td {
+ background-color: #CCC;
+ font-weight: bold;
font-size: small;
- text-align: right;
+ text-align: center;
}
-table.LC_whatsnew tr td.LC_first_item {
+table.LC_nested tr.LC_info_row td.LC_left_item {
text-align: left;
}
+table.LC_nested td {
+ background-color: #FFF;
+ font-size: small;
+}
+table.LC_nested_outer tr th.LC_right_item,
+table.LC_nested tr.LC_info_row td.LC_right_item,
+table.LC_nested tr.LC_odd_row td.LC_right_item,
+table.LC_nested tr td.LC_right_item {
+ text-align: right;
+}
-table.LC_whatsnew tr.LC_odd_row td {
+table.LC_nested tr.LC_odd_row td {
background-color: #EEE;
}
@@ -3705,6 +3968,11 @@ table.LC_mail_list tr.LC_mail_other {
table.LC_mail_list tr.LC_mail_other:hover {
background-color: $mail_other_hover;
}
+table.LC_mail_list tr.LC_mail_even {
+}
+table.LC_mail_list tr.LC_mail_odd {
+}
+
table#LC_portfolio_actions {
width: auto;
@@ -3949,6 +4217,13 @@ table.LC_descriptive_input td.LC_descrip
text-align: right;
font-weight: bold;
}
+table.LC_feedback_link {
+ background: $feedback_link_bg;
+}
+span.LC_feedback_link {
+ background: $feedback_link_bg;
+ font-size: larger;
+}
END
}
@@ -4241,6 +4516,11 @@ Inputs: $args - additional optio
a html attribute
frameset -> if true will start with a