-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add submitted_content/_selfreview.html.erb partial, which was
written by Project E726, but somehow lost from repo.
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- E726 Changes Begin --> | ||
<!-- Will show a link to begin the self review only if the Self Review is assigned to the questionnaire i.e. | ||
it won't show for the previous assignments for which the questionnaire was not present --> | ||
<% if !@assignment.selfreview_questionnaire_id.nil? %> | ||
<% response_map_id = ResponseMap.find_by_reviewed_object_id_and_reviewer_id_and_reviewee_id(@assignment.id, @participant.user_id, @participant.user_id) %> | ||
<% if response_map_id %> | ||
Self Review <td><%= link_to 'View', { :controller => 'submitted_content', :action => 'view_selfreview', | ||
:id => @assignment.selfreview_questionnaire_id, | ||
:assignment_id => @assignment.id, :user_id => @participant.user_id, | ||
:action_name => 'View', :response_map_id => response_map_id } %> | ||
</td> | ||
<td> | ||
<%= link_to 'Edit', { :controller => 'submitted_content', :action => 'view_selfreview', | ||
:id => @assignment.selfreview_questionnaire_id, | ||
:assignment_id => @assignment.id, :user_id => @participant.user_id, | ||
:action_name => 'Edit', :response_map_id => response_map_id } %> | ||
</td> | ||
<% else %> | ||
Self Review <%= link_to 'Begin', { :controller => 'submitted_content', :action => 'view_selfreview', | ||
:id => @assignment.selfreview_questionnaire_id, | ||
:assignment_id => @assignment.id, :user_id => @participant.user_id, :action_name => 'Begin' } %> | ||
<% end %> | ||
<% end %> | ||
|
||
<!-- E726 Changes End --> |