--- loncom/homework/essayresponse.pm 2025/02/26 00:11:38 1.127
+++ loncom/homework/essayresponse.pm 2025/03/02 05:22:43 1.128
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# essay (ungraded) style responses
#
-# $Id: essayresponse.pm,v 1.127 2025/02/26 00:11:38 raeburn Exp $
+# $Id: essayresponse.pm,v 1.128 2025/03/02 05:22:43 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -149,16 +149,43 @@ sub show_status_table {
my ($part,$id,$coll) = @_;
my $output;
if ($coll) {
- $output = '
'.&mt('Collaborated with [_1]',$coll).' | ';
+ my $udom = $env{'user.domain'};
+ my $uname = $env{'user.name'};
+ my @collaborators;
+ foreach my $possible_collaborator
+ (split(/[,;\s]+/,$coll)) {
+ $possible_collaborator =~ s/[\$\^\(\)]//g;
+ next if ($possible_collaborator eq '');
+ my ($co_name,$co_dom) = split(/:/,$possible_collaborator);
+ $co_dom = $udom if (! defined($co_dom) || $co_dom =~ /^domain$/i);
+ next if ($co_name eq $uname && $co_dom eq $udom);
+ push(@collaborators,$possible_collaborator);
+ }
+ if (@collaborators) {
+ $output = ''."\n".
+ &Apache::loncommon::start_data_table().
+ &Apache::loncommon::data_table_caption(&mt('Collaborators'),'LC_filesub_status').
+ &Apache::loncommon::start_data_table_header_row().
+ '
'.&mt('Username').' | '.
+ &Apache::loncommon::end_data_table_header_row()."\n";
+ foreach my $user (@collaborators) {
+ $output .= &Apache::loncommon::start_data_table_row().
+ ''.$user.' | '.
+ &Apache::loncommon::end_data_table_row()."\n";
+ }
+ $output .= &Apache::loncommon::end_data_table().'';
+ }
}
- my $current_files_display = &Apache::inputtags::current_file_submissions($part,$id);
+ my $current_files_display =
+ &Apache::inputtags::current_file_submissions($part,$id,'',&mt('Submitted files'));
if ($current_files_display) {
- $output .= ''.&mt('Submitted files:').' '.
- $current_files_display.' | ';
+ $output .= ''.
+ $current_files_display.'
';
}
if ($output ne '') {
- return '';
+ return ''.
+ $output.
+ '';
}
return;
}