Some correction of column names.

Support for internal as well as external users. Added column user_type and used it where necessary
This commit is contained in:
Ralf Teusner
2015-08-18 17:44:31 +02:00
parent 512e90ebd7
commit e520914385
11 changed files with 62 additions and 30 deletions

View File

@@ -1,14 +1,22 @@
<div class="list-group">
<h4 class="list-group-item-heading"><%= Exercise.find(@request_for_comment.exerciseid) %></h4>
<h4 class="list-group-item-heading"><%= Exercise.find(@request_for_comment.exercise_id) %></h4>
<p class="list-group-item-text">
<%= InternalUser.find(@request_for_comment.requestorid) %> | <%= @request_for_comment.requested_at %>
<%
user = nil
if (@request_for_comment.user_type == 'InternalUser')
user = InternalUser.find(@request_for_comment.requestor_user_id)
else
user = ExternalUser.find(@request_for_comment.requestor_user_id)
end
%>
<%= user %> | <%= @request_for_comment.requested_at %>
</p>
</div>
<!--
do not put a carriage return in the line below. it will be present in the presentation of the source code, otherwise.
-->
<div id='commentitor' class='editor' data-read-only='true' data-file-id='<%=@request_for_comment.fileid%>'><%= CodeOcean::File.find(@request_for_comment.fileid).content %>
<div id='commentitor' class='editor' data-read-only='true' data-file-id='<%=@request_for_comment.file_id%>'><%= CodeOcean::File.find(@request_for_comment.file_id).content %>
</div>
<script type="text/javascript">