--- 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 = '<td><i>'.&mt('Collaborated with [_1]',$coll).'</i></td>';
+        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 = '<div style="display: inline-block; float: left">'."\n".
+                      &Apache::loncommon::start_data_table().
+                      &Apache::loncommon::data_table_caption(&mt('Collaborators'),'LC_filesub_status').
+                      &Apache::loncommon::start_data_table_header_row().
+                      '<th>'.&mt('Username').'</th>'.
+                      &Apache::loncommon::end_data_table_header_row()."\n";
+            foreach my $user (@collaborators) {
+                $output .= &Apache::loncommon::start_data_table_row().
+                           '<td>'.$user.'</td>'.
+                           &Apache::loncommon::end_data_table_row()."\n";
+            }
+            $output .= &Apache::loncommon::end_data_table().'</div>';
+        }
     }
-    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 .= '<td><b>'.&mt('Submitted files:').'</b><br />'.
-                   $current_files_display.'</td>';
+        $output .= '<div style="display: inline-block; float:left;">'.
+                   $current_files_display.'</div>';
     }
     if ($output ne '') {
-        return '<table class="LC_pastsubmission"><tr>'.$output.
-               '</tr></table>';
+        return '<div style="padding:0;clear:both;margin:0;border:0"></div>'.
+               $output.
+               '<div style="padding:0;clear:both;margin:0;border:0"></div>';
     }
     return;
 }