forked from openwebwork/webwork2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
188 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
177 changes: 177 additions & 0 deletions
177
templates/ContentGenerator/Feedback/feedback_email.html.ep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
% use WeBWorK::Utils qw(decodeAnswers); | ||
% | ||
<html> | ||
<head> | ||
<%= stylesheet begin =%> | ||
.data-table td, .data-table th { | ||
text-align: left; | ||
padding: 0.25rem; | ||
} | ||
.data-table.bordered { | ||
border-collapse: collapse; | ||
} | ||
.data-table.bordered > * > tr > td, .data-table.bordered > * > tr > th { | ||
border: 1px solid black; | ||
} | ||
.data-table.bordered thead tr { | ||
border-bottom-width: 2px; | ||
} | ||
.mb-1 { | ||
margin-bottom: 1rem | ||
} | ||
<% end =%> | ||
</head> | ||
<body> | ||
<p> | ||
Message from <%= $user->full_name %> (<%= $user->user_id %>) via WeBWorK at <%= url_for('root')->to_abs %> | ||
</p> | ||
<p>To visit the page from which the user sent feedback, <%= link_to 'click here' => $emailableURL %>.</p> | ||
|
||
% if ($feedback) { | ||
<p><%= $user->full_name %> (<%= $user->user_id %>) wrote:</p> | ||
<div> | ||
% for (split /\n+/, $feedback) { | ||
<p><%= $_ %></p> | ||
% } | ||
</div> | ||
% } | ||
% if ($problem && $verbosity >= 1) { | ||
<table class="data-table bordered mb-1"> | ||
<thead> | ||
<tr><th colspan="2">Data about the problem processor</th></tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<th>Display Mode:</th> | ||
<td><%= param('displayMode') %></td> | ||
</tr> | ||
<tr> | ||
<th>Show Old Answers:</th> | ||
<td><%= param('showOldAnswers') ? 'yes' : 'no' %></td> | ||
</tr> | ||
<tr> | ||
<th>Show Correct Answers:</th> | ||
<td><%= param('showCorrectAnswers') ? 'yes' : 'no' %></td> | ||
</tr> | ||
<tr> | ||
<th>Show Hints:</th> | ||
<td><%= param('showHints') ? 'yes' : 'no' %></td> | ||
</tr> | ||
<tr> | ||
<th>Show Solutions:</th> | ||
<td><%= param('showSolutions') ? 'yes' : 'no' %></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
% } | ||
% | ||
% if ($user && $verbosity >= 1) { | ||
<table class="data-table bordered mb-1"> | ||
<thead> | ||
<tr><th colspan="2">Data about the user</th></tr> | ||
</thead> | ||
<tbody> | ||
<tr><th>User ID:</th><td><%= $user->user_id %></td></tr> | ||
<tr><th>Name:</th><td><%= $user->full_name %></td></tr> | ||
<tr><th>Email:</th><td><%= $user->email_address %></td></tr> | ||
% unless ($ce->{blockStudentIDinFeedback}) { | ||
<tr><th>Student ID:</th><td><%= $user->student_id %></td></tr> | ||
% } | ||
% my $status_name = $ce->status_abbrev_to_name($user->status); | ||
%my $status_string = | ||
% defined $status_name | ||
% ? "$status_name ('" . $user->status . q{')} | ||
% : $user->status . ' (unknown status abbreviation)'; | ||
<tr><th>Status:</th><td><%= $status_string %></td></tr> | ||
<tr><th>Section:</th><td><%= $user->section %></td></tr> | ||
<tr><th>Recitation:</th><td><%= $user->recitation %></td></tr> | ||
<tr><th>Comment:</th><td><%= $user->comment %></td></tr> | ||
<tr><th>User IP:</th><td><%= $remote_host %>:<%= $c->tx->remote_port || 'UNKNOWN' %></td></tr> | ||
</tbody> | ||
</table> | ||
% } | ||
% if ($problem && $verbosity >= 1) { | ||
<table class="data-table bordered mb-1"> | ||
<thead> | ||
<tr><th colspan="2">Data about the problem</th></tr> | ||
</thead> | ||
<tbody> | ||
<tr><th>Problem ID:</th><td><%= $problem->problem_id %></td></tr> | ||
<tr><th>Source file:</th><td><%= $problem->source_file %></td></tr> | ||
<tr><th>Value:</th><td><%= $problem->value %></td></tr> | ||
<tr> | ||
<th>Max attempts</th> | ||
<td><%= $problem->max_attempts == -1 ? 'unlimited' : $problem->max_attempts %></td> | ||
</tr> | ||
<tr><th>Random seed:</th><td><%= $problem->problem_seed %></td></tr> | ||
<tr><th>Status:</th><td><%= $problem->status %></td></tr> | ||
<tr><th>Attempted:</th><td><%= $problem->attempted ? 'yes' : 'no' %></td></tr> | ||
% my %last_answer = decodeAnswers($problem->last_answer); | ||
<tr> | ||
<th>Last answer:</th> | ||
% if (%last_answer) { | ||
<td> | ||
<table class="data-table"> | ||
% for my $key (sort keys %last_answer) { | ||
% if ($last_answer{$key}) { | ||
<tr><td><%= $key %>:</td><td><%= $last_answer{$key} %></td></tr> | ||
% } | ||
% } | ||
</table> | ||
</td> | ||
% } else { | ||
<td>none</td> | ||
% } | ||
</tr> | ||
<tr><th>Number of correct attempts:</th><td><%= $problem->num_correct %></td></tr> | ||
<tr><th>Number of incorrect attempts:</th><td><%= $problem->num_incorrect %></td></tr> | ||
</tbody> | ||
</table> | ||
% } | ||
% if ($set && $verbosity >= 1) { | ||
<table class="data-table bordered mb-1"> | ||
<thead> | ||
<tr><th colspan="2">Data about the homework set</th></tr> | ||
</thead> | ||
<tbody> | ||
<tr><th>Set ID:</th><td><%= $set->set_id %></td></tr> | ||
<tr><th>Set header file:</th><td><%= $set->set_header %></td></tr> | ||
<tr><th>Hardcopy header file:</th><td><%= $set->hardcopy_header %></td></tr> | ||
<tr><th>Open date:</th><td><%= $c->formatDateTime($set->open_date) %></td></tr> | ||
<tr><th>Due date:</th><td><%= $c->formatDateTime($set->due_date) %></td></tr> | ||
<tr><th>Answer date:</th><td><%= $c->formatDateTime($set->answer_date) %></td></tr> | ||
<tr><th>Visible:</th><td><%= $set->visible ? 'yes' : 'no' %></td></tr> | ||
<tr><th>Assignment type:</th><td><%= $set->assignment_type %></td></tr> | ||
% if ($set->assignment_type =~ /gateway/) { | ||
<tr><th>Attempts per version:</th><td><%= $set->assignment_type %></td></tr> | ||
<tr><th>Time interval:</th><td><%= $set->time_interval %></td></tr> | ||
<tr><th>Versions per interval:</th><td><%= $set->versions_per_interval %></td></tr> | ||
<tr><th>Version time limit:</th><td><%= $set->version_time_limit %></td></tr> | ||
<tr> | ||
<th>Version creation time:</th> | ||
<td><%= $c->formatDateTime($set->version_creation_time) %></td> | ||
</tr> | ||
<tr><th>Problem randorder:</th><td><%= $set->problem_randorder %></td></tr> | ||
<tr><th>Version last attempt time:</th><td><%= $set->version_last_attempt_time %></td></tr> | ||
% } | ||
</tbody> | ||
</table> | ||
% } | ||
% if ($verbosity >= 2) { | ||
<table class="data-table bordered"> | ||
<thead> | ||
<tr><th colspan="2">Data about the environment</th></tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td> | ||
<pre> | ||
<%= dumper($ce) %> | ||
</pre> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
% } | ||
</body> | ||
</html> |