diff --git a/htdocs/js/JobManager/jobmanager.js b/htdocs/js/JobManager/jobmanager.js
index c0d1caeef2..5d5572fe84 100644
--- a/htdocs/js/JobManager/jobmanager.js
+++ b/htdocs/js/JobManager/jobmanager.js
@@ -38,4 +38,13 @@
});
}
}
+
+ document.querySelectorAll('.result-popover-btn').forEach((popover) => {
+ new bootstrap.Popover(popover, {
+ trigger: 'hover focus',
+ customClass: 'job-queue-result-popover',
+ html: true,
+ placement: 'left'
+ });
+ });
})();
diff --git a/htdocs/js/JobManager/jobmanager.scss b/htdocs/js/JobManager/jobmanager.scss
new file mode 100644
index 0000000000..6f91713e75
--- /dev/null
+++ b/htdocs/js/JobManager/jobmanager.scss
@@ -0,0 +1,3 @@
+.job-queue-result-popover {
+ --bs-popover-max-width: 400px;
+}
diff --git a/lib/WeBWorK/ContentGenerator/Instructor/JobManager.pm b/lib/WeBWorK/ContentGenerator/Instructor/JobManager.pm
index f4179e708d..62ceaca597 100644
--- a/lib/WeBWorK/ContentGenerator/Instructor/JobManager.pm
+++ b/lib/WeBWorK/ContentGenerator/Instructor/JobManager.pm
@@ -33,7 +33,6 @@ use constant FIELDS => [
[ started => x('Started') ],
[ finished => x('Finished') ],
[ state => x('State') ],
- [ result => x('Result') ]
];
use constant SORT_SUBS => {
@@ -42,8 +41,7 @@ use constant SORT_SUBS => {
created => \&byCreatedTime,
started => \&byStartedTime,
finished => \&byFinishedTime,
- state => \&byState,
- result => \&byResult
+ state => \&byState
};
sub initialize ($c) {
@@ -178,6 +176,5 @@ sub byCreatedTime { return $a->{created} <=> $b->{created} }
sub byStartedTime { return $a->{started} <=> $b->{started} }
sub byFinishedTime { return $a->{finished} <=> $b->{finished} }
sub byState { return $a->{state} cmp $b->{state} }
-sub byResult { return lc $a->{result} cmp lc $b->{result} }
1;
diff --git a/templates/ContentGenerator/Instructor/JobManager.html.ep b/templates/ContentGenerator/Instructor/JobManager.html.ep
index ec535c7af7..bbd74d96ac 100644
--- a/templates/ContentGenerator/Instructor/JobManager.html.ep
+++ b/templates/ContentGenerator/Instructor/JobManager.html.ep
@@ -1,5 +1,9 @@
% use WeBWorK::Utils qw(getAssetURL);
%
+% content_for css => begin
+ <%= stylesheet getAssetURL($ce, 'js/JobManager/jobmanager.css') =%>
+% end
+%
% content_for js => begin
<%= javascript getAssetURL($ce, 'js/ActionTabs/actiontabs.js'), defer => undef =%>
<%= javascript getAssetURL($ce, 'js/SelectAll/selectall.js'), defer => undef =%>
@@ -100,10 +104,6 @@
<%= link_to maketext('State') => '#', class => 'sort-header',
data => { sort_field => 'state' } =%>
-
- <%= link_to maketext('Result') => '#', class => 'sort-header',
- data => { sort_field => 'result' } =%>
- |
@@ -120,7 +120,7 @@
<%= label_for "job_${jobID}_checkbox" => $jobID =%> |
% }
- <%= $jobs->{$jobID}{task} =~ s/_/ /gr =%> |
+ <%= $jobs->{$jobID}{task} =~ s/_/ /gr =%> |
<%= $c->formatDateTime(
$jobs->{$jobID}{created}, '', 'datetime_format_medium', $ce->{language}) =%>
@@ -137,14 +137,29 @@
$jobs->{$jobID}{finished}, '', 'datetime_format_medium', $ce->{language}) =%>
% }
|
- <%= $jobs->{$jobID}{state} %> |
-
- % if (ref($jobs->{$jobID}{result}) eq 'ARRAY') {
- % for (@{ $jobs->{$jobID}{result} } ) {
- <%= $_ %>
- % }
- % } else {
- <%= $jobs->{$jobID}{result} // '' %>
+ |
+ <%= $jobs->{$jobID}{state} =%>
+ % if (defined $jobs->{$jobID}{result}) {
+ % content_for "result_$jobID", begin
+ % if (ref($jobs->{$jobID}{result}) eq 'ARRAY') {
+
+ % for (@{ $jobs->{$jobID}{result} } ) {
+ - <%= $_ %>
+ % }
+
+ % } else {
+ <%= $jobs->{$jobID}{result} =%>
+ % }
+ % end
+ <%= link_to '#', class => 'result-popover-btn', role => 'button',
+ data => {
+ bs_toggle => 'popover',
+ bs_title => maketext('Result'),
+ bs_content => content("result_$jobID")->xml_escape
+ }, begin =%>
+
+ <%= maketext('Result') %>
+ <% end =%>
% }
|
diff --git a/templates/HelpFiles/InstructorJobManager.html.ep b/templates/HelpFiles/InstructorJobManager.html.ep
index 42f4f10f91..3b744c5afb 100644
--- a/templates/HelpFiles/InstructorJobManager.html.ep
+++ b/templates/HelpFiles/InstructorJobManager.html.ep
@@ -47,17 +47,13 @@
<%= maketext('State') %>
<%= maketext('The current state of the job. This will be one of "inactive", "active", "finished", or '
- . '"failed". If a job is "inactive" it means that the job has been added to the queue, but execution of '
- . 'the job has not yet started. If a job is "active" it means that the job is currently being executed. '
- . 'If a job is "finished" it means that the execution of the job has successfully completed. If a job is '
- . '"failed" it means that the execution of job has completed, but there were errors in the execution of '
- . 'the job.') =%>
-
- <%= maketext('Result') %>
-
- <%= maketext('The result set by the job when execution is completed. This will be shown if the job is in the '
- . '"finished" or "failed" states, and will contain information about what happened when the job was '
- . 'executed.') =%>
+ . '"failed". If a job is "inactive" it means that the job has been added to the queue, but execution '
+ . 'of the job has not yet started. If a job is "active" it means that the job is currently being '
+ . 'executed. If a job is "finished" it means that the execution of the job has successfully '
+ . 'completed. If a job is "failed" it means that the execution of job has completed, but there were '
+ . 'errors in the execution of the job. If the job is in the "finished" or "failed" state, then there '
+ . 'will also be a popover containing information about what happened when the job was executed.') =%>
+
%