Full Name:
- <%= @user.fullname(session[:ip]) %>
+ <%= @user.name(session[:ip]) %>
Email Address:
diff --git a/app/views/admin/list_administrators.html.erb b/app/views/admin/list_administrators.html.erb
index 5e8490bac56..51adc8413c6 100644
--- a/app/views/admin/list_administrators.html.erb
+++ b/app/views/admin/list_administrators.html.erb
@@ -6,7 +6,7 @@
<%= link_to user.username(session[:ip]), :action => 'show_administrator',
:id => user.id %>
- <%= user.fullname(session[:ip]) %>
+ <%= user.name(session[:ip]) %>
<%= user.email(session[:ip]) %>
<%= (User.find(user.parent_id)).username %>
diff --git a/app/views/admin/list_instructors.html.erb b/app/views/admin/list_instructors.html.erb
index 4e2a8451277..10ae7808a0d 100644
--- a/app/views/admin/list_instructors.html.erb
+++ b/app/views/admin/list_instructors.html.erb
@@ -8,7 +8,7 @@
<%= link_to user.username(session[:ip]), :action => 'show_instructor',
:id => user.id %>
- <%= user.fullname(session[:ip]) %>
+ <%= user.name(session[:ip]) %>
<%= user.email(session[:ip]) %>
<%= (User.find(user.parent_id)).username %>
diff --git a/app/views/admin/list_super_administrators.html.erb b/app/views/admin/list_super_administrators.html.erb
index 50923f73825..8cc5a9f48b6 100644
--- a/app/views/admin/list_super_administrators.html.erb
+++ b/app/views/admin/list_super_administrators.html.erb
@@ -6,7 +6,7 @@
<%= link_to user.username(session[:ip]), :action => 'show_super_administrator',
:id => user.id %>
- <%= user.fullname(session[:ip]) %>
+ <%= user.name(session[:ip]) %>
<%= user.email(session[:ip]) %>
<% end -%>
diff --git a/app/views/advertise_for_partner/show.html.erb b/app/views/advertise_for_partner/show.html.erb
index 7377a5f6916..dd2050e24f4 100644
--- a/app/views/advertise_for_partner/show.html.erb
+++ b/app/views/advertise_for_partner/show.html.erb
@@ -19,7 +19,7 @@
<% for member in @student.team.participants %>
<%= member.user.username(session[:ip]) %>
- <%= member.user.fullname(session[:ip]) %>
+ <%= member.user.name(session[:ip]) %>
<%= member.user.email(session[:ip]) %>
<% if @student.assignment.questionnaires.find_by_type('TeammateReviewQuestionnaire') != nil and member.user.id != session[:user].id %>
diff --git a/app/views/assessment360/all_students_all_reviews.html.erb b/app/views/assessment360/all_students_all_reviews.html.erb
index 4e03375a445..01ced1f2fd9 100644
--- a/app/views/assessment360/all_students_all_reviews.html.erb
+++ b/app/views/assessment360/all_students_all_reviews.html.erb
@@ -21,7 +21,7 @@
<% @course_participants.each do |cp|%>
- <%= "#{cp.username(session[:ip])} (#{cp.fullname(session[:ip])})" %>
+ <%= "#{cp.username(session[:ip])} (#{cp.name(session[:ip])})" %>
<%= @teamed_count[cp.id] %>
<% @assignments.each do |assignment|%>
<%= @meta_review[cp.id][assignment.id] unless @meta_review.nil? %>
diff --git a/app/views/assignments/edit/_calibration.html.erb b/app/views/assignments/edit/_calibration.html.erb
index 60ba9869045..3176886ef4d 100644
--- a/app/views/assignments/edit/_calibration.html.erb
+++ b/app/views/assignments/edit/_calibration.html.erb
@@ -21,7 +21,7 @@
<% users_for_curr_team = "" %>
<% teams_users.each do |teams_user| %>
<% user = User.find(teams_user.user_id) %>
- <% users_for_curr_team += user.username(session[:ip]) + ' (' + user.fullname(session[:ip]) + ')' + ' ' %>
+ <% users_for_curr_team += user.username(session[:ip]) + ' (' + user.name(session[:ip]) + ')' + ' ' %>
<% participants = Array.new %>
<% participants << Participant.where(["parent_id = ? AND user_id = ?", assignment.id, user.id]).first %>
<% end %>
diff --git a/app/views/assignments/list_submissions.html.erb b/app/views/assignments/list_submissions.html.erb
index 5890f18b61b..10b02cce46d 100644
--- a/app/views/assignments/list_submissions.html.erb
+++ b/app/views/assignments/list_submissions.html.erb
@@ -70,7 +70,7 @@
<% users_for_curr_team.each do |user| %>
<%= link_to user.username(session[:ip]), impersonate_impersonate_path(:user => {:username => user.username(session[:ip])}), :method => :post %>
- (<%= user.fullname(session[:ip])%>)
+ (<%= user.name(session[:ip])%>)
<% end %>
diff --git a/app/views/grades/_heat_grid_tab.html.erb b/app/views/grades/_heat_grid_tab.html.erb
index f4ba9750f20..5fd93cce764 100644
--- a/app/views/grades/_heat_grid_tab.html.erb
+++ b/app/views/grades/_heat_grid_tab.html.erb
@@ -3,7 +3,7 @@
<% pscore = @scores[:participants][participant.id.to_s.to_sym] %>
- <%= participant.fullname(session[:ip]) %>
+ <%= participant.(session[:ip]) %>
view heatgrid
diff --git a/app/views/grades/_review_table.html.erb b/app/views/grades/_review_table.html.erb
index a79b558209e..23be1527622 100644
--- a/app/views/grades/_review_table.html.erb
+++ b/app/views/grades/_review_table.html.erb
@@ -14,9 +14,9 @@
<% for review in reviews %>
<% unless controller.action_name == "view_my_scores"%>
- <%= review.map.reviewer.fullname(session[:ip]) %> <%=link_to image_tag("/assets/delete_icon.png", :border => 0), {:controller => 'response', :action => 'delete', :id => review.id, :return => 'instructor'} %>
+ <%= review.map.reviewer.name(session[:ip]) %> <%=link_to image_tag("/assets/delete_icon.png", :border => 0), {:controller => 'response', :action => 'delete', :id => review.id, :return => 'instructor'} %>
<% else %>
- <%= review.map.reviewer.fullname(session[:ip]) %>
+ <%= review.map.reviewer.name(session[:ip]) %>
<% end %>
<% end %>
@@ -31,7 +31,7 @@
<% symbol = "review" + review.round.to_s %>
<% score = Response.score(:response => [review], :questions => @questions[symbol.to_sym]) %>
<% unless controller.action_name == "view_my_scores" %>
-
+
<% end %>
<%if score==-1%>
<%= sprintf("--") %>%
diff --git a/app/views/grades/_team.html.erb b/app/views/grades/_team.html.erb
index 91e1710056c..1f69c2391a2 100644
--- a/app/views/grades/_team.html.erb
+++ b/app/views/grades/_team.html.erb
@@ -12,7 +12,7 @@
<%= tscore[:team].name(session[:ip]) + ' (' + SignUpTopic.find(topic_id).topic_identifier + ')' %>
<% else %>
<% if @assignment.max_team_size == 1 %>
- <%= tscore[:team].users.first.username(session[:ip]) + ' (' + tscore[:team].users.first.fullname(session[:ip]) + ')' rescue '' %>
+ <%= tscore[:team].users.first.username(session[:ip]) + ' (' + tscore[:team].users.first.name(session[:ip]) + ')' rescue '' %>
<% else %>
<%= tscore[:team].name(session[:ip]) %> |
<% for index in 0..tscore[:team].users.length - 2 %>
diff --git a/app/views/grades/_view_heatgrid.html.erb b/app/views/grades/_view_heatgrid.html.erb
index 1f109d5cdb0..365a41db3f7 100644
--- a/app/views/grades/_view_heatgrid.html.erb
+++ b/app/views/grades/_view_heatgrid.html.erb
@@ -122,10 +122,10 @@ function toggleFunction(elementId) {
<% if (['Student'].include? @current_role_name) && @assignment.is_anonymous%>
<%= "Review " + i.to_s %>
<% elsif vm.questionnaire_display_type == "Author Feedback" %>
- <% user_name = User.find(Participant.find(ResponseMap.find(Response.find(review.id).map_id).reviewee_id).user_id).fullname(session[:ip]).to_s %>
+ <% user_name = User.find(Participant.find(ResponseMap.find(Response.find(review.id).map_id).reviewee_id).user_id).name(session[:ip]).to_s %>
<%= user_name.to_s %>
<% else %>
- <% user_name = User.find(Participant.find(ResponseMap.find(Response.find(review.id).map_id).reviewer_id).user_id).fullname(session[:ip]).to_s %>
+ <% user_name = User.find(Participant.find(ResponseMap.find(Response.find(review.id).map_id).reviewer_id).user_id).name(session[:ip]).to_s %>
<%= user_name.to_s %>
<% end %>
<% i += 1 %>
diff --git a/app/views/grades/view_team.html.erb b/app/views/grades/view_team.html.erb
index a3355ed17a3..2cf3c1de1d2 100644
--- a/app/views/grades/view_team.html.erb
+++ b/app/views/grades/view_team.html.erb
@@ -137,7 +137,7 @@
<% if (['Student'].include? @current_role_name) && @assignment.is_anonymous%>
<%= render :partial => 'add_icon_to_name', :locals => {review: review, i: i, user_name: nil} %>
<% else %>
- <% user_name = User.find(Participant.find(ResponseMap.find(Response.find(review.id).map_id).reviewer_id).user_id).fullname(session[:ip]).to_s %>
+ <% user_name = User.find(Participant.find(ResponseMap.find(Response.find(review.id).map_id).reviewer_id).user_id).name(session[:ip]).to_s %>
<%= render :partial => 'add_icon_to_name', :locals => {review: review, i: i, user_name: user_name} %>
<% end %>
<% i_final = 0%>
diff --git a/app/views/import_file/_participant.html.erb b/app/views/import_file/_participant.html.erb
index 9e023cf311a..3fd74bfbb34 100644
--- a/app/views/import_file/_participant.html.erb
+++ b/app/views/import_file/_participant.html.erb
@@ -25,7 +25,7 @@
Username
- Fullname
+ Name
Email
Password
@@ -33,7 +33,7 @@
Fullname
- Username
+ Name
Email
Password
@@ -42,7 +42,7 @@
Email
Username
- Fullname
+ Name
Password
@@ -50,7 +50,7 @@
Password
Username
- Fullname
+ Name
Email
diff --git a/app/views/import_file/_user.html.erb b/app/views/import_file/_user.html.erb
index 49cdc13529b..840c6a04abb 100644
--- a/app/views/import_file/_user.html.erb
+++ b/app/views/import_file/_user.html.erb
@@ -25,13 +25,13 @@
Username
- Fullname
+ Name
Email
- Fullname
+ Name
Username
Email
@@ -40,7 +40,7 @@
Email
Username
- Fullname
+ Name
diff --git a/app/views/import_file/start.html.erb b/app/views/import_file/start.html.erb
index c936f0fe5b5..448303b444f 100644
--- a/app/views/import_file/start.html.erb
+++ b/app/views/import_file/start.html.erb
@@ -26,7 +26,7 @@
- <%= radio_button_tag 'has_header', 'true' %> File has a header, including name, fullname, and email address.
+ <%= radio_button_tag 'has_header', 'true' %> File has a header, including name, name, and email address.
<%= radio_button_tag 'has_header', 'false', true %> File does not have a header
diff --git a/app/views/participants/_participant.html.erb b/app/views/participants/_participant.html.erb
index 139ca9b2849..423d9842cc7 100644
--- a/app/views/participants/_participant.html.erb
+++ b/app/views/participants/_participant.html.erb
@@ -1,7 +1,7 @@
<% userid << participant.user_id %>
<%= link_to participant.user.username(session[:ip]), impersonate_impersonate_path(:user => {:username => participant.user.username(session[:ip])}), :method => :post %>
- <%= link_to participant.user.fullname(session[:ip]), :controller=> 'users', :action => 'show', :id => participant.user_id %>
+ <%= link_to participant.user.name(session[:ip]), :controller=> 'users', :action => 'show', :id => participant.user_id %>
<%= participant.user.email(session[:ip]) %>
<%= participant.user.role.name %>
<%= (User.find(participant.user.parent_id)).username(session[:ip]) %>
diff --git a/app/views/participants/view_copyright_grants.html.erb b/app/views/participants/view_copyright_grants.html.erb
index d13617bce3c..fbbdd76253b 100644
--- a/app/views/participants/view_copyright_grants.html.erb
+++ b/app/views/participants/view_copyright_grants.html.erb
@@ -15,7 +15,7 @@
Name
- Fullname
+ Name
Publish Rights
Verified
@@ -36,7 +36,7 @@
<% users.each do |user| %>
<%=user[:username]%>
- <%=user[:fullname]%>
+ <%=user[:name]%>
<%=user[:pub_rights]%>
<% if user[:verified] %>
diff --git a/app/views/popup/author_feedback_popup.html.erb b/app/views/popup/author_feedback_popup.html.erb
index 0f82a32cd3b..e9b3c0ba23f 100644
--- a/app/views/popup/author_feedback_popup.html.erb
+++ b/app/views/popup/author_feedback_popup.html.erb
@@ -13,9 +13,9 @@
<%else%>
<% if params[:source] == 'author_feedback' %>
- Author Feedback to <%= @user.fullname(session[:ip]) %>
+ Author Feedback to <%= @user.name(session[:ip]) %>
<% elsif params[:source] == 'teammate_review' %>
- Teammate Review to <%= @user.fullname(session[:ip]) %>
+ Teammate Review to <%= @user.name(session[:ip]) %>
<% end %>
diff --git a/app/views/popup/participants_popup.html.erb b/app/views/popup/participants_popup.html.erb
index 03430e6583e..e80d8060b1a 100644
--- a/app/views/popup/participants_popup.html.erb
+++ b/app/views/popup/participants_popup.html.erb
@@ -19,7 +19,7 @@
- Review scores for <%= @user.fullname(session[:ip]) %>
+ Review scores for <%= @user.name(session[:ip]) %>
User's Average Score:
@@ -48,7 +48,7 @@
<%else%>
- Reviewed by <%= User.find(@reviewer_id).fullname%>
+ Reviewed by <%= User.find(@reviewer_id).name%>
diff --git a/app/views/popup/reviewer_details_popup.html.erb b/app/views/popup/reviewer_details_popup.html.erb
index 039df3a0e74..0077a7c063b 100644
--- a/app/views/popup/reviewer_details_popup.html.erb
+++ b/app/views/popup/reviewer_details_popup.html.erb
@@ -5,7 +5,7 @@
Full name:
- <%= @user.fullname(session[:ip]) %>
+ <%= @user.name(session[:ip]) %>
<%= image_tag "blank_profile_pic.jpg", :width=>"100px", :height=>"100px", :border=>1%>
diff --git a/app/views/popup/self_review_popup.html.erb b/app/views/popup/self_review_popup.html.erb
index 8d56181bbfe..35a1aa466f4 100644
--- a/app/views/popup/self_review_popup.html.erb
+++ b/app/views/popup/self_review_popup.html.erb
@@ -12,7 +12,7 @@
<% else %>
- <%=t ".self_review_of"%> <%= @user_fullname %>
+ <%=t ".self_review_of"%> <%= @user_name %>
<%=t ".question"%>
diff --git a/app/views/popup/team_users_popup.html.haml b/app/views/popup/team_users_popup.html.haml
index f7b41c75dd7..b7199ca4e96 100644
--- a/app/views/popup/team_users_popup.html.haml
+++ b/app/views/popup/team_users_popup.html.haml
@@ -8,7 +8,7 @@
- @team_users.each do |t|
%tr
%td
- \- #{User.find(t.user_id).fullname(@ip)}
+ \- #{User.find(t.user_id).name(@ip)}
- (1..@assignment.num_review_rounds).each do |round|
- next if instance_variable_get('@response_round_' + round.to_s).nil?
- if instance_variable_get('@scores_round_' + round.to_s).nil?
@@ -21,7 +21,7 @@
%td{:align => "center"} --
%br/
- else
- %h3= "Reviewed by #{User.find(@reviewer_id).fullname(@ip)} (Round #{round})"
+ %h3= "Reviewed by #{User.find(@reviewer_id).name(@ip)} (Round #{round})"
%table{:class => "general", :border => "1px solid #ccc"}
%tr
%th{:align => "left", :width => "50%"} Question
diff --git a/app/views/reports/_answer_tagging_report.html.erb b/app/views/reports/_answer_tagging_report.html.erb
index f6b94bf069d..b2c71d0469b 100644
--- a/app/views/reports/_answer_tagging_report.html.erb
+++ b/app/views/reports/_answer_tagging_report.html.erb
@@ -46,7 +46,7 @@
<% report_lines.each do |report_line| %>
<%= report_line.user.username(session[:ip]) %>
- <%= report_line.user.fullname(session[:ip]) %>
+ <%= report_line.user.name(session[:ip]) %>
<%= report_line.percentage.to_s %>%
<%= report_line.no_tagged.to_s %>
<%= report_line.no_not_tagged.to_s %>
@@ -95,7 +95,7 @@
<% @user_tagging_report.each do |key, val| %>
<%= val.user.username(session[:ip]) %>
- <%= val.user.fullname(session[:ip]) %>
+ <%= val.user.name(session[:ip]) %>
<%= val.percentage.to_s %>%
<%= val.no_tagged.to_s %>
<%= val.no_not_tagged.to_s %>
diff --git a/app/views/reports/_bookmark_rating_report.html.erb b/app/views/reports/_bookmark_rating_report.html.erb
index c1993d5101b..823dd66168e 100644
--- a/app/views/reports/_bookmark_rating_report.html.erb
+++ b/app/views/reports/_bookmark_rating_report.html.erb
@@ -19,7 +19,7 @@
<% if maps.count > 0 %>
rowspan= <%= maps.count %>>
- <% @reviewer_name = @user.fullname(session[:ip]) %>
+ <% @reviewer_name = @user.name(session[:ip]) %>
<%= link_to @reviewer_name, :controller => 'popup', :action => 'reviewer_details_popup', :id => r.reviewer_id, :assignment_id => @id %>
diff --git a/app/views/reports/_feedback_report.html.erb b/app/views/reports/_feedback_report.html.erb
index 0ff142358ee..090ab64b76b 100644
--- a/app/views/reports/_feedback_report.html.erb
+++ b/app/views/reports/_feedback_report.html.erb
@@ -52,7 +52,7 @@
<% %w[one two three].each do |round| %>
<% if @first_col_identifier %>
- <% @reviewer_name = rejoinder.user.fullname(session[:ip]) %>
+ <% @reviewer_name = rejoinder.user.name(session[:ip]) %>
<%row_span = @assignment.varying_rubrics_by_round? ? (@rspan_round_one + @rspan_round_two + @rspan_round_three) : @rspan %>
<%# If no feedback has been submitted, rowspan is seen as 0, then rowspan manually set to 1 so that it takes up its own row.%>
<% if row_span.zero? %>
@@ -91,14 +91,14 @@
<%= link_to user_name = Participant.find(review_response.response_map.reviewer_id).user.username(session[:ip]), impersonate_impersonate_path(:user => {:username => user_name}), :method => :post, :title => "Click here to impersonate this user" %>
- (<%= Participant.find(review_response.response_map.reviewer_id).user.fullname(session[:ip]) %>)
+ (<%= Participant.find(review_response.response_map.reviewer_id).user.name(session[:ip]) %>)
No
<% else %>
- <% @reviewee_name = Participant.find(@frm.reviewee_id).user.fullname(session[:ip]) %>
+ <% @reviewee_name = Participant.find(@frm.reviewee_id).user.name(session[:ip]) %>
<% if Response.exists?(map_id: @frm.id) %>
<% feedback_response = Response.where(map_id: @frm.id).first %>
@@ -137,7 +137,7 @@
<% if row_span.zero? %>
>
- <% @reviewer_name = rejoinder.user.fullname(session[:ip]) %>
+ <% @reviewer_name = rejoinder.user.name(session[:ip]) %>
<%= link_to @reviewer_name, :controller => 'popup', :action => 'reviewer_details_popup', :id => rejoinder.id, :assignment_id => @id %>
@@ -146,7 +146,7 @@
<%else %>
>
- <% @reviewer_name = rejoinder.user.fullname(session[:ip]) %>
+ <% @reviewer_name = rejoinder.user.name(session[:ip]) %>
<%= link_to @reviewer_name, :controller => 'popup', :action => 'reviewer_details_popup', :id => rejoinder.id, :assignment_id => @id %>
<%end %>
@@ -166,14 +166,14 @@
<%= link_to user_name = Participant.find(review_response.response_map.reviewer_id).user.username(session[:ip]), impersonate_impersonate_path(:user => {:username => user_name}), :method => :post, :title => "Click here to impersonate this user" %>
- (<%= reviewee_name = Participant.find(review_response.response_map.reviewer_id).user.fullname(session[:ip]) %>)
+ (<%= reviewee_name = Participant.find(review_response.response_map.reviewer_id).user.name(session[:ip]) %>)
No
<% else %>
- <% @reviewee_name = Participant.find(@frm.reviewee_id).user.fullname(session[:ip]) %>
+ <% @reviewee_name = Participant.find(@frm.reviewee_id).user.name(session[:ip]) %>
<% if Response.exists?(map_id: @frm.id) %>
<% feedback_response = Response.where(map_id: @frm.id).first %>
diff --git a/app/views/reports/_review_report.html.erb b/app/views/reports/_review_report.html.erb
index 1f913645f1e..833eae6c353 100644
--- a/app/views/reports/_review_report.html.erb
+++ b/app/views/reports/_review_report.html.erb
@@ -69,7 +69,7 @@
<%= index + 1 %>.
<%= link_to user.username(session[:ip]), impersonate_impersonate_path(:user => {:username => user.username(session[:ip])}), :method => :post, :class => "user_unityID" %>
- (<%= user.fullname(session[:ip]) %> )
+ (<%= user.name(session[:ip]) %> )
diff --git a/app/views/reports/_self_review_report.html.erb b/app/views/reports/_self_review_report.html.erb
index 9ae1f6ffbc5..67f22a91b47 100644
--- a/app/views/reports/_self_review_report.html.erb
+++ b/app/views/reports/_self_review_report.html.erb
@@ -12,7 +12,7 @@
align='left'>
<% if sr.response.first %>
- <%= link_to @user_name, controller: 'popup', action: 'self_review_popup', response_id: sr.response.first.id, user_fullname: Participant.find(sr.reviewer_id).user.fullname(session[:ip]) %>
+ <%= link_to @user_name, controller: 'popup', action: 'self_review_popup', response_id: sr.response.first.id, user_name: Participant.find(sr.reviewer_id).user.name(session[:ip]) %>
<% else %>
<%= @user_name %>
<% end %>
diff --git a/app/views/reports/_teammate_review_report.html.erb b/app/views/reports/_teammate_review_report.html.erb
index 0528a5c672d..159852b6bdd 100644
--- a/app/views/reports/_teammate_review_report.html.erb
+++ b/app/views/reports/_teammate_review_report.html.erb
@@ -44,7 +44,7 @@
<% @team_member_count > 1 ? @rspan = @team_member_count : @rspan = 1 %>
<%if Participant.exists?(id: reviewer.reviewer_id) %>
- <% @reviewer_name = @user.fullname(session[:ip]) %>
+ <% @reviewer_name = @user.name(session[:ip]) %>
>
<%= link_to @reviewer_name, :controller => 'popup', :action => 'reviewer_details_popup', :id => reviewer.reviewer_id, :assignment_id => @id%>
diff --git a/app/views/review_mapping/_list_review_mappings.html.erb b/app/views/review_mapping/_list_review_mappings.html.erb
index 508184eb75f..859a3f42efa 100644
--- a/app/views/review_mapping/_list_review_mappings.html.erb
+++ b/app/views/review_mapping/_list_review_mappings.html.erb
@@ -59,12 +59,12 @@
<% if assignment.max_team_size < 2 %>
<% user_id = TeamsUser.where(team_id: contributor.id).first.user_id %>
- <%= User.find(user_id).fullname(session[:ip]) %> (<%= User.find(user_id).username(session[:ip]) %>)
+ <%= User.find(user_id).name(session[:ip]) %> (<%= User.find(user_id).username(session[:ip]) %>)
<% else %>
<%= contributor.username %>
<% team_members = TeamsUser.where(team_id: contributor.id) %>
<% team_members.each do |team_member| %>
- <%= User.find(team_member['user_id']).fullname(session[:ip]) %>
+ <%= User.find(team_member['user_id']).name(session[:ip]) %>
(<%= User.find(team_member['user_id']).username(session[:ip]) %>)
<% end %>
<% end %>
diff --git a/app/views/student_quizzes/review_questions.html.erb b/app/views/student_quizzes/review_questions.html.erb
index 7483115c925..c4d82b5e8e0 100644
--- a/app/views/student_quizzes/review_questions.html.erb
+++ b/app/views/student_quizzes/review_questions.html.erb
@@ -20,7 +20,7 @@
<% response_maps.each do |response_map| %>
<% reviewer_paritcipant_id = response_map.reviewer_id%>
<% reviewer_user_id = Participant.find(reviewer_paritcipant_id).user_id%>
- <%=User.find(reviewer_user_id).fullname%>
+ <%=User.find(reviewer_user_id).name%>
<%end%>
<% quiz_scores = [] %>
diff --git a/app/views/student_teams/_send_invitations.html.erb b/app/views/student_teams/_send_invitations.html.erb
index ce54d69f293..58db4f77799 100644
--- a/app/views/student_teams/_send_invitations.html.erb
+++ b/app/views/student_teams/_send_invitations.html.erb
@@ -36,7 +36,7 @@
<% @users_on_waiting_list.each do |user|%>
<%=user.username(session[:ip])%>
- <%=user.fullname(session[:ip])%>
+ <%=user.name(session[:ip])%>
<%=user.email(session[:ip])%>
<% end%>
diff --git a/app/views/student_teams/_team_display.html.erb b/app/views/student_teams/_team_display.html.erb
index 914f81bb91c..5741c0e1049 100644
--- a/app/views/student_teams/_team_display.html.erb
+++ b/app/views/student_teams/_team_display.html.erb
@@ -16,7 +16,7 @@
<% @student.team.participants.each do |member| %>
<%= member.user.username(session[:ip]) %>
- <%= member.user.fullname(session[:ip]) %>
+ <%= member.user.name(session[:ip]) %>
<%if @student.assignment.duty_based_assignment? %>
<% team_user = member.team_user %>
diff --git a/app/views/student_teams/mentor.html.erb b/app/views/student_teams/mentor.html.erb
index 9a85193ecd2..89c8220f81f 100644
--- a/app/views/student_teams/mentor.html.erb
+++ b/app/views/student_teams/mentor.html.erb
@@ -32,7 +32,7 @@
<% unless MentorManagement.user_a_mentor?(member.user) %>
<%= member.user.username(session[:ip]) %>
- <%= member.user.fullname(session[:ip]) %>
+ <%= member.user.name(session[:ip]) %>
<%if @student.assignment.duty_based_assignment? %>
<% team_user = member.team_user %>
diff --git a/app/views/student_teams/view.html.erb b/app/views/student_teams/view.html.erb
index e509a83893f..3de5fb2f0be 100644
--- a/app/views/student_teams/view.html.erb
+++ b/app/views/student_teams/view.html.erb
@@ -62,7 +62,7 @@
<% @student.team.participants.each do |member| %>
<%= member.user.username(session[:ip]) %>
- <%= member.user.fullname(session[:ip]) %>
+ <%= member.user.name(session[:ip]) %>
<%if @student.assignment.duty_based_assignment? %>
<% team_user = member.team_user %>
@@ -142,7 +142,7 @@
<% @student.team.participants.each do |member| %>
<%= member.user.username(session[:ip]) %>
- <%= member.user.fullname(session[:ip]) %>
+ <%= member.user.name(session[:ip]) %>
<%= member.user.email(session[:ip]) %>
<% status = TeamsUser.find_by(user_id: member.user.id, team_id: member.team.id).pair_programming_status %>
<% if (status == "W" || status.nil?) and current_user.id != member.user.id %>
@@ -246,7 +246,7 @@
<% @users_on_waiting_list.each do |user|%>
<%=user.username(session[:ip])%>
- <%=user.fullname(session[:ip])%>
+ <%=user.name(session[:ip])%>
<%=user.email(session[:ip])%>
<% end%>
diff --git a/app/views/users/_name.html.erb b/app/views/users/_name.html.erb
index 09a29018697..1756654a6a8 100644
--- a/app/views/users/_name.html.erb
+++ b/app/views/users/_name.html.erb
@@ -1,2 +1,2 @@
-<%=t ".name_convention"%>
- <%= text_field 'user', 'fullname', class: "form-control width-250"%>
+<%=t ".name_convention"%>
+ <%= text_field 'user', 'name', class: "form-control width-250"%>
diff --git a/app/views/users/keys.html.erb b/app/views/users/keys.html.erb
index d4f8235bdb8..40255394396 100644
--- a/app/views/users/keys.html.erb
+++ b/app/views/users/keys.html.erb
@@ -3,7 +3,7 @@
Full Name:
- <%= @user.fullname(session[:ip]) %>
+ <%= @user.name(session[:ip]) %>
Email Address:
diff --git a/app/views/users/list.html.erb b/app/views/users/list.html.erb
index 705f90762a6..57422087b6b 100644
--- a/app/views/users/list.html.erb
+++ b/app/views/users/list.html.erb
@@ -22,7 +22,7 @@
<% if (params[:show] != 'true' && !user.username(session[:ip]).include?("_hidden")) || params[:show] == 'true'%>
<%= link_to user.username(session[:ip]), impersonate_impersonate_path(:user => {:username => user.username(session[:ip])}), :method => :post %>
- <%= link_to user.fullname(session[:ip]), :controller=> 'users', :action => 'show', :id => user.id %>
+ <%= link_to user.name(session[:ip]), :controller=> 'users', :action => 'show', :id => user.id %>
<%= user.email(session[:ip]) %>
<%= link_to user.role.name, :controller => 'roles', :action => 'show', :id => user.role.id %>
<%= user.parent.try :name %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 9bb26b9b212..b115626bea4 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -3,7 +3,7 @@
Full Name:
- <%= @user.fullname(session[:ip]) %>
+ <%= @user.name(session[:ip]) %>
Email Address:
diff --git a/config/locales/en_US.yml b/config/locales/en_US.yml
index e4b85f2f023..d6e8034ce4e 100644
--- a/config/locales/en_US.yml
+++ b/config/locales/en_US.yml
@@ -265,7 +265,7 @@ en_US:
team_name_up: "Team Name:"
team_members: "Team members"
username: "Username"
- fullname: "Full name"
+ name: "Full name"
email_address: "Email address"
review_action: "Review action"
send_invite: "Send invitations"
diff --git a/config/locales/hi_IN.yml b/config/locales/hi_IN.yml
index f593fc65987..18af3d04baa 100644
--- a/config/locales/hi_IN.yml
+++ b/config/locales/hi_IN.yml
@@ -255,7 +255,7 @@ hi_IN:
team_name_up: "टीम का नाम:"
team_members: "टीम के सदस्या"
username: "यूजरनाम "
- fullname: "पूरा नाम"
+ name: "पूरा नाम"
email_address: "ईमेल एड्रेस"
review_action: "रिव्यु एक्शन"
send_invite: "निमंत्रण भेजें"
diff --git a/db/data_migrations/scrub_database.rb b/db/data_migrations/scrub_database.rb
index 12b3e1756a9..475260b4fc2 100644
--- a/db/data_migrations/scrub_database.rb
+++ b/db/data_migrations/scrub_database.rb
@@ -11,7 +11,7 @@ def self.run!
num = rand(1..9)
role = user.role.name.downcase.gsub(/[- ]/, '_')
user.username = role == 'student' ? "#{fake_name}_#{fake_lastname[0..3]}#{num}" : "#{role}_#{fake_name}__#{fake_lastname[0..3]}"
- user.fullname = role == 'student' ? "#{fake_lastname}, #{fake_name}" : "#{fake_name}, #{role}"
+ user.name = role == 'student' ? "#{fake_lastname}, #{fake_name}" : "#{fake_name}, #{role}"
user.email = 'expertiza@mailinator.com'
user.handle = 'handle'
user.password = 'password'
diff --git a/db/migrate/20241009142307_rename_name_and_fullname_in_users.rb b/db/migrate/20241009142307_rename_name_and_fullname_in_users.rb
index 8d22f973eb0..2be1fe111f1 100644
--- a/db/migrate/20241009142307_rename_name_and_fullname_in_users.rb
+++ b/db/migrate/20241009142307_rename_name_and_fullname_in_users.rb
@@ -1,7 +1,8 @@
class RenameNameAndFullnameInUsers < ActiveRecord::Migration[5.1]
def change
- # Renaming columns
rename_column :users, :name, :username
rename_column :account_requests, :name, :username
+ rename_column :users, :fullname, :name
+ rename_column :account_requests, :fullname, :username
end
end
\ No newline at end of file
diff --git a/db/schema.rb b/db/schema.rb
index 7f2c00ba68a..2b6ad48596b 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -15,7 +15,7 @@
create_table "account_requests", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1" do |t|
t.string "username"
t.integer "role_id"
- t.string "fullname"
+ t.string "name"
t.string "institution_id"
t.string "email"
t.string "status"
@@ -977,7 +977,7 @@
t.string "crypted_password", limit: 40, default: "", null: false
t.integer "role_id", default: 0, null: false
t.string "password_salt"
- t.string "fullname"
+ t.string "name"
t.string "email"
t.integer "parent_id"
t.boolean "private_by_default", default: false
diff --git a/spec/controllers/account_request_controller_spec.rb b/spec/controllers/account_request_controller_spec.rb
index 5409d0d21a7..83a58e8010e 100644
--- a/spec/controllers/account_request_controller_spec.rb
+++ b/spec/controllers/account_request_controller_spec.rb
@@ -11,7 +11,7 @@
let(:institution1) { build(:institution, id: 1) }
let(:requested_user1) do
- AccountRequest.new id: 4, username: 'requester1', role_id: 2, fullname: 're, requester1',
+ AccountRequest.new id: 4, username: 'requester1', role_id: 2, name: 're, requester1',
institution_id: 1, email: 'requester1@test.com', status: nil, self_introduction: 'no one'
end
let(:superadmin) { build(:superadmin) }
@@ -120,7 +120,7 @@
requested_user: { self_introduction: 'I am good' },
user: { username: 'instructor6',
role_id: 2,
- fullname: '6, instructor',
+ name: '6, instructor',
institution_id: 1,
email: 'chenzy@gmail.com' }
}
diff --git a/spec/controllers/conference_controller_spec.rb b/spec/controllers/conference_controller_spec.rb
index b334258c6a0..03bdcc0ba70 100644
--- a/spec/controllers/conference_controller_spec.rb
+++ b/spec/controllers/conference_controller_spec.rb
@@ -49,7 +49,7 @@
user: { username: 'lily',
role_id: 2,
email: 'chenzy@gmail.com',
- fullname: 'John Bumgardner',
+ name: 'John Bumgardner',
assignment: '2' }
}
allow(Assignment).to receive(:find_by_id).with('2').and_return(assignment1)
@@ -78,7 +78,7 @@
user: { username: 'lily',
role_id: 2,
email: 'chenzy@gmail.com',
- fullname: 'John Bumgardner',
+ name: 'John Bumgardner',
assignment: '2' }
}
allow(Assignment).to receive(:find_by_id).with('2').and_return(assignment1)
@@ -91,7 +91,7 @@
user: { username: 'lily23',
role_id: 2,
email: 'chenzy@gmail.com',
- fullname: 'John Bumgardner',
+ name: 'John Bumgardner',
assignment: '2' }
}
allow(Assignment).to receive(:find_by_id).with('2').and_return(assignment1)
@@ -110,7 +110,7 @@
crypted_password: 'password',
role_id: 1,
password_salt: 1,
- fullname: '6, instructor',
+ name: '6, instructor',
email: 'chenzy@gmail.com',
parent_id: 1,
private_by_default: false,
@@ -140,7 +140,7 @@
crypted_password: 'password',
role_id: 1,
password_salt: 1,
- fullname: '6, instructor',
+ name: '6, instructor',
email: 'chenzy2@gmail.com',
parent_id: 1,
private_by_default: false,
diff --git a/spec/controllers/invitations_controller_spec.rb b/spec/controllers/invitations_controller_spec.rb
index 8e4ea76bb59..65aeec844ea 100644
--- a/spec/controllers/invitations_controller_spec.rb
+++ b/spec/controllers/invitations_controller_spec.rb
@@ -59,7 +59,7 @@
allow(User).to receive(:skip_callback).with(:create, :after, :email_welcome).and_return(true)
request_params = {
user: { username: 'testuser@gmail.com',
- fullname: 'John Bumgardner',
+ name: 'John Bumgardner',
parent_id: 1,
institution_id: 1 },
student_id: 1,
diff --git a/spec/controllers/participants_controller_spec.rb b/spec/controllers/participants_controller_spec.rb
index c48f9fa3cc0..649f6c7dec1 100644
--- a/spec/controllers/participants_controller_spec.rb
+++ b/spec/controllers/participants_controller_spec.rb
@@ -236,9 +236,9 @@
allow(participant).to receive(:permission_granted?).and_return(true)
allow(participant).to receive(:user).and_return(student)
allow(student).to receive(:username).and_return('name')
- allow(student).to receive(:fullname).and_return('fullname')
+ allow(student).to receive(:name).and_return('name')
pc = ParticipantsController.new
- expect(pc.send(:get_user_info, student, assignment)).to eq(username: 'name', fullname: 'fullname', pub_rights: 'Granted', verified: false)
+ expect(pc.send(:get_user_info, student, assignment)).to eq(username: 'name', name: 'name', pub_rights: 'Granted', verified: false)
end
end
diff --git a/spec/controllers/password_retrieval_controller_spec.rb b/spec/controllers/password_retrieval_controller_spec.rb
index ba9fdd5bea1..01375109517 100644
--- a/spec/controllers/password_retrieval_controller_spec.rb
+++ b/spec/controllers/password_retrieval_controller_spec.rb
@@ -3,7 +3,7 @@
it 'create new entry in password_resets table' do
@user = User.new
@user.email = 'example@example.edu'
- @user.fullname = 'John Bumgardner'
+ @user.name = 'John Bumgardner'
@user.username = 'exe'
@user.save!
request_params = { user: { email: 'example@example.edu' } }
@@ -13,7 +13,7 @@
it 'modifies the token in password_resets_table' do
@user = User.new
@user.email = 'example@example.edu'
- @user.fullname = 'John Bumgardner'
+ @user.name = 'John Bumgardner'
@user.username = 'Shubham'
@user.save!
@password_retrival = PasswordReset.new
@@ -29,7 +29,7 @@
@user = User.new
@user.email = 'aexample@example.edu'
@user.username = 'Shubham'
- @user.fullname = 'John Bumgardner'
+ @user.name = 'John Bumgardner'
@user.save!
request_params = { user: { email: 'example@example.edu' } }
post :send_password, params: request_params
diff --git a/spec/controllers/popup_controller_spec.rb b/spec/controllers/popup_controller_spec.rb
index a97f34b2153..3f3db5e3c3d 100644
--- a/spec/controllers/popup_controller_spec.rb
+++ b/spec/controllers/popup_controller_spec.rb
@@ -123,14 +123,14 @@
describe '#reviewer_details_popup' do
it 'render reviewer_details_popup page successfully' do
participant = double(:participant, user_id: 1)
- user = double(:user, fullname: 'Test User', username: 'Test', email: 'test@gmail.com', handle: 1)
+ user = double(:user, name: 'Test User', username: 'Test', email: 'test@gmail.com', handle: 1)
allow(Participant).to receive(:find).with('1').and_return(participant)
allow(User).to receive(:find).with(participant.user_id).and_return(user)
request_params = { id: 1, assignment_id: 1 }
user_session = { user: instructor }
get :reviewer_details_popup, params: request_params, session: user_session
expect(@response).to have_http_status(200)
- expect(user.fullname).to eq('Test User')
+ expect(user.name).to eq('Test User')
expect(user.username).to eq('Test')
expect(user.email).to eq('test@gmail.com')
expect(user.handle).to eq(1)
diff --git a/spec/controllers/review_bids_controller_spec.rb b/spec/controllers/review_bids_controller_spec.rb
index 27a53365890..e6ee503e72d 100644
--- a/spec/controllers/review_bids_controller_spec.rb
+++ b/spec/controllers/review_bids_controller_spec.rb
@@ -1,7 +1,7 @@
describe ReviewBidsController do
# let(:assignment) { double('Assignment', id: 1) }
# let(:participant) { double('AssignmentParticipant', id: 1, can_review: false, user: double('User', id: 1)) }
- let(:student) { build(:student, id: 1, username: 'name', fullname: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student) { build(:student, id: 1, username: 'name', name: 'no one', email: 'expertiza@mailinator.com') }
let(:assignment) { build(:assignment, id: 1, name: 'Test Assgt', rounds_of_reviews: 2) }
let(:participant) { build(:participant, id: 1, parent_id: 1, user: student) }
diff --git a/spec/controllers/sample_reviews_controller_spec.rb b/spec/controllers/sample_reviews_controller_spec.rb
index d77a3980533..a2bf9a47a97 100644
--- a/spec/controllers/sample_reviews_controller_spec.rb
+++ b/spec/controllers/sample_reviews_controller_spec.rb
@@ -23,8 +23,8 @@
let(:response1) { build(:response, id: 2, map_id: 1, round: 2, response_map: review_response_map) }
let(:response2) { build(:response, id: 3, map_id: 1, round: nil, response_map: review_response_map, is_submitted: true) }
let(:metareview_response_map) { build(:meta_review_response_map, reviewed_object_id: 1) }
- let(:student) { build(:student, id: 1, username: 'name', fullname: 'no one', email: 'expertiza@mailinator.com') }
- let(:student1) { build(:student, id: 2, username: 'name1', fullname: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student) { build(:student, id: 1, username: 'name', name: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student1) { build(:student, id: 2, username: 'name1', name: 'no one', email: 'expertiza@mailinator.com') }
let(:questionnaire) { Questionnaire.new(id: 1, type: 'ReviewQuestionnaire') }
let(:answer) { Answer.new(id: 5, question_id: 1) }
let(:samplereview1) { SampleReview.new id: 3, assignment_id: 10, response_id: 5 }
diff --git a/spec/controllers/submission_records_controller_spec.rb b/spec/controllers/submission_records_controller_spec.rb
index 3f16ea80276..c970d0dbf1e 100644
--- a/spec/controllers/submission_records_controller_spec.rb
+++ b/spec/controllers/submission_records_controller_spec.rb
@@ -6,7 +6,7 @@
let(:ta) { build(:teaching_assistant, id: 8) }
let(:assignment) { build(:assignment, id: 1, name: 'Test Assgt', rounds_of_reviews: 2, instructor_id: 10) }
- let(:student) { build(:student, id: 1, username: 'name', fullname: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student) { build(:student, id: 1, username: 'name', name: 'no one', email: 'expertiza@mailinator.com') }
let(:team) { build(:assignment_team, id: 1, name: 'team no name', assignment: assignment, users: [student], parent_id: 1) }
let(:submission_record) { build(:submission_record, id: 1, team_id: 27158, assignment_id: 1) }
diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb
index b2e741f39d9..4f9b9547adc 100644
--- a/spec/controllers/users_controller_spec.rb
+++ b/spec/controllers/users_controller_spec.rb
@@ -12,7 +12,7 @@
let(:institution1) { build(:institution, id: 1) }
let(:requested_user1) do
- AccountRequest.new id: 4, username: 'requester1', role_id: 2, fullname: 're, requester1',
+ AccountRequest.new id: 4, username: 'requester1', role_id: 2, name: 're, requester1',
institution_id: 1, email: 'requester1@test.com', status: nil, self_introduction: 'no one'
end
let(:superadmin) { build(:superadmin) }
@@ -204,7 +204,7 @@
crypted_password: 'password',
role_id: 2,
password_salt: 1,
- fullname: '6, instructor',
+ name: '6, instructor',
email: 'chenzy@gmail.com',
parent_id: 1,
private_by_default: false,
@@ -234,7 +234,7 @@
crypted_password: 'password',
role_id: 2,
password_salt: 1,
- fullname: '6, instructor',
+ name: '6, instructor',
email: 'chenzy@gmail.com',
parent_id: 1,
private_by_default: false,
@@ -265,7 +265,7 @@
crypted_password: 'password',
role_id: 2,
password_salt: 1,
- fullname: '6, instructor',
+ name: '6, instructor',
email: 'chenzy@gmail.com',
parent_id: 1,
private_by_default: false,
diff --git a/spec/factories/factories.rb b/spec/factories/factories.rb
index dbcb358029d..27b7792796b 100644
--- a/spec/factories/factories.rb
+++ b/spec/factories/factories.rb
@@ -53,7 +53,7 @@
role { Role.where(name: 'Administrator').first || association(:role_of_administrator) }
password 'password'
password_confirmation 'password'
- sequence(:fullname) { |n| "#{n}, administrator" }
+ sequence(:name) { |n| "#{n}, administrator" }
email 'expertiza@mailinator.com'
parent_id 1
private_by_default false
@@ -75,7 +75,7 @@
role { Role.where(name: 'Super-Administrator').first || association(:role_of_superadministrator) }
password 'password'
password_confirmation 'password'
- sequence(:fullname) { |n| "#{n}, superadministrator" }
+ sequence(:name) { |n| "#{n}, superadministrator" }
email 'expertiza@mailinator.com'
parent_id 1
private_by_default false
@@ -125,7 +125,7 @@
role { Role.where(name: 'Student').first || association(:role_of_student) }
password 'password'
password_confirmation 'password'
- sequence(:fullname) { |n| n = n % 3; "206#{n + 4}, student" }
+ sequence(:name) { |n| n = n % 3; "206#{n + 4}, student" }
email 'expertiza@mailinator.com'
parent_id 1
private_by_default false
@@ -147,7 +147,7 @@
role { Role.where(name: 'Instructor').first || association(:role_of_instructor) }
password 'password'
password_confirmation 'password'
- fullname '6, instructor'
+ name '6, instructor'
email 'expertiza@mailinator.com'
parent_id 1
private_by_default false
@@ -169,7 +169,7 @@
role { Role.where(name: 'Teaching Assistant').first || association(:role_of_teaching_assistant) }
password 'password'
password_confirmation 'password'
- fullname '5888, teaching assistant'
+ name '5888, teaching assistant'
email 'expertiza@mailinator.com'
parent_id 1
private_by_default false
@@ -574,7 +574,7 @@
factory :requested_user, class: AccountRequest do
username 'requester1'
role_id 2
- fullname 'requester, requester'
+ name 'requester, requester'
institution_id 1
email 'requester1@test.com'
status 'Under Review'
@@ -641,7 +641,7 @@
factory :test_user, class: User do
username 'username'
- fullname 'full name'
+ name 'full name'
email 'abc@mailinator.com'
end
diff --git a/spec/features/quiz_spec.rb b/spec/features/quiz_spec.rb
index cd4f53dd25d..338d7e7823c 100644
--- a/spec/features/quiz_spec.rb
+++ b/spec/features/quiz_spec.rb
@@ -310,7 +310,7 @@ def init_instructor_tests
visit "/student_quizzes/review_questions?id=#{@assignment.id}&type=Assignment"
student = all('tr > td')[0]
score = all('tr > td')[1]
- expect(student).to have_text(@student2.fullname)
+ expect(student).to have_text(@student2.name)
expect(score).to have_text('100.0')
expect(page).to have_text('Average score for quiz takers: 100.0')
expect(page).to have_text('1')
diff --git a/spec/helpers/answer_helper_spec.rb b/spec/helpers/answer_helper_spec.rb
index 286fe6310b3..d3bb76e01b7 100644
--- a/spec/helpers/answer_helper_spec.rb
+++ b/spec/helpers/answer_helper_spec.rb
@@ -20,7 +20,7 @@
@assignment_questionnaire1 = create(:assignment_questionnaire, id: 1, assignment_id: @assignment1.id, questionnaire_id: @questionnaire1.id, used_in_round: 1)
@assignment_questionnaire2 = create(:assignment_questionnaire, id: 2, assignment_id: @assignment1.id, questionnaire_id: @questionnaire2.id, used_in_round: 2)
@assignment_questionnaire3 = create(:assignment_questionnaire, id: 3, assignment_id: @assignment2.id, questionnaire_id: @questionnaire3.id, used_in_round: nil)
- @user = create(:student, username: 'name', fullname: 'name')
+ @user = create(:student, username: 'name', name: 'name')
@participant = create(:participant, user_id: @user.id, parent_id: @assignment1.id)
@response_map = create(:review_response_map, reviewer: @participant, assignment: @assignment1)
@response = create(:response, response_map: @response_map, created_at: '2019-11-01 23:30:00')
diff --git a/spec/helpers/participants_helper_spec.rb b/spec/helpers/participants_helper_spec.rb
index 4c64e4de6c7..a27d02ae891 100644
--- a/spec/helpers/participants_helper_spec.rb
+++ b/spec/helpers/participants_helper_spec.rb
@@ -3,14 +3,14 @@
context 'when define_attributes is called' do
#Checking if attributes have been correctly defined
line_split = ['Test1','test@ncsu.edu']
- config = {'name'=>'0','fullname'=>'test2','email'=>'1'}
+ config = {'name'=>'test2','email'=>'1'}
it 'returns correct hash "attributes" when define_attributes is called' do
allow(Role).to receive(:find_by).with({:name=>'Student'}).and_return(1)
attribute = ParticipantsHelper.define_attributes(line_split,config)
expect(attribute['role_id']).to eq(1)
expect(attribute['username']).to eq('Test1')
- expect(attribute['fullname']).to eq('test2')
+ expect(attribute['name']).to eq('test2')
expect(attribute['email']).to eq('test@ncsu.edu')
expect(attribute['password'].length).to eq(8)
expect(attribute['email_on_submission']).to eq(1)
@@ -26,12 +26,12 @@
let(:instructor1) { build(:instructor, id: 10, role_id: 3, parent_id: 3, username: 'Instructor1') }
it 'returns correct user when create_new_user is called' do
- attributes = {'role_id' => 1, 'username' => 'Test1', 'fullname' => 'test2', 'email' => 'test@ncsu.edu', 'email_on_submission' => 1, 'email_on_review' => 1, 'email_on_review_of_review' => 1}
+ attributes = {'role_id' => 1, 'username' => 'Test1', 'name' => 'test2', 'email' => 'test@ncsu.edu', 'email_on_submission' => 1, 'email_on_review' => 1, 'email_on_review_of_review' => 1}
session = {user: instructor1}
user = ParticipantsHelper.create_new_user(attributes, session)
expect(user['role_id']).to eq(1)
expect(user['username']).to eq('Test1')
- expect(user['fullname']).to eq('test2')
+ expect(user['name']).to eq('test2')
expect(user['email']).to eq('test@ncsu.edu')
expect(user['email_on_submission']).to eq(true)
expect(user['email_on_review']).to eq(true)
diff --git a/spec/helpers/review_mapping_helper_spec.rb b/spec/helpers/review_mapping_helper_spec.rb
index 8a0193f3d54..2a94a0a46fa 100644
--- a/spec/helpers/review_mapping_helper_spec.rb
+++ b/spec/helpers/review_mapping_helper_spec.rb
@@ -436,7 +436,7 @@
# return the user name if team size equal 1
it 'should return (Adam) if max_team_size = 1' do
max_team_size = 1
- student = create(:student, fullname: 'Adam')
+ student = create(:student, name: 'Adam')
create(:team_user, user: student, team: @reviewee)
@response = create(:response, response_map: @response_map)
@@ -1004,7 +1004,7 @@
@assignment1 = create(:assignment, name: 'name1')
@questionnaire = create(:questionnaire)
@question = create(:question, questionnaire_id: @questionnaire.id)
- @user = create(:student, username: 'name', fullname: 'name')
+ @user = create(:student, username: 'name', name: 'name')
@participant = create(:participant, user_id: @user.id, parent_id: @assignment1.id)
@response_map = create(:review_response_map, reviewer: @participant, assignment: @assignment1)
@response = create(:response, response_map: @response_map, created_at: '2019-11-01 23:30:00')
@@ -1022,7 +1022,7 @@
@assignment1 = create(:assignment, name: 'name1')
@questionnaire = create(:questionnaire)
@question = create(:question, questionnaire_id: @questionnaire.id)
- @user = create(:student, username: 'name', fullname: 'name')
+ @user = create(:student, username: 'name', name: 'name')
@participant = create(:participant, user_id: @user.id, parent_id: @assignment1.id)
@response_map = create(:review_response_map, reviewer: @participant, assignment: @assignment1)
@response = create(:response, response_map: @response_map, created_at: '2019-11-01 23:30:00')
@@ -1042,7 +1042,7 @@
@assignment1 = create(:assignment, name: 'name1')
@questionnaire = create(:questionnaire)
@question = create(:question, questionnaire_id: @questionnaire.id)
- @user = create(:student, username: 'name', fullname: 'name')
+ @user = create(:student, username: 'name', name: 'name')
@participant = create(:participant, user_id: @user.id, parent_id: @assignment1.id)
@response_map = create(:review_response_map, reviewer: @participant, assignment: @assignment1)
@id = @assignment1.id
@@ -1058,7 +1058,7 @@
@assignment1 = create(:assignment, name: 'name1')
@questionnaire = create(:questionnaire)
@question = create(:question, questionnaire_id: @questionnaire.id)
- @user = create(:student, username: 'name', fullname: 'name')
+ @user = create(:student, username: 'name', name: 'name')
@participant = create(:participant, user_id: @user.id, parent_id: @assignment1.id)
@response_map = create(:review_response_map, reviewer: @participant, assignment: @assignment1)
@id = @assignment1.id
diff --git a/spec/lib/scoring_spec.rb b/spec/lib/scoring_spec.rb
index a1152c31dfb..879acf8f733 100644
--- a/spec/lib/scoring_spec.rb
+++ b/spec/lib/scoring_spec.rb
@@ -12,7 +12,7 @@
let(:signed_up_team) { build(:signed_up_team, team_id: contributor.id) }
# ReviewResponseMap Spec Additions
- let(:student) { build(:student, id: 1, username: 'name', fullname: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student) { build(:student, id: 1, username: 'name', name: 'no one', email: 'expertiza@mailinator.com') }
let(:participant) { build(:participant, id: 1, parent_id: 1, user: student) }
let(:response3) { build(:response) }
let(:question) { double('Question') }
diff --git a/spec/models/administrator_spec.rb b/spec/models/administrator_spec.rb
index a2dc878e9af..2f57fd32617 100644
--- a/spec/models/administrator_spec.rb
+++ b/spec/models/administrator_spec.rb
@@ -1,7 +1,7 @@
describe Administrator do
describe 'class' do
it 'creates a valid object' do
- expect(Administrator.new(username: 'name', fullname: 'John Bumgardner', email: 'email@email.com')).to be_valid
+ expect(Administrator.new(username: 'name', name: 'John Bumgardner', email: 'email@email.com')).to be_valid
end
end
end
diff --git a/spec/models/answer_tag_spec.rb b/spec/models/answer_tag_spec.rb
index 1702ca1471a..ca0b7a74dd7 100644
--- a/spec/models/answer_tag_spec.rb
+++ b/spec/models/answer_tag_spec.rb
@@ -10,7 +10,7 @@
let(:tag_prompt_cb) { TagPrompt.create id: 1, prompt: '??', desc: 'desc', control_type: 'checkbox' }
let(:tag_deploy) { TagPromptDeployment.create id: 1, tag_prompt: tag_prompt, question_type: 'Criterion' }
let(:tag_deploy_cb) { TagPromptDeployment.create id: 1, tag_prompt: tag_prompt_cb, question_type: 'Criterion' }
- let(:user) { User.new username: 'abc', fullname: 'abc xyz', email: 'abcxyz@gmail.com', password: '12345678', password_confirmation: '12345678' }
+ let(:user) { User.new username: 'abc', name: 'abc xyz', email: 'abcxyz@gmail.com', password: '12345678', password_confirmation: '12345678' }
it 'is invalid without valid attributes' do
expect(AnswerTag.new).not_to be_valid
diff --git a/spec/models/assignment_participant_spec.rb b/spec/models/assignment_participant_spec.rb
index 3c3c064c510..7526fb05078 100644
--- a/spec/models/assignment_participant_spec.rb
+++ b/spec/models/assignment_participant_spec.rb
@@ -135,7 +135,7 @@
context 'when no user is found by offered username' do
context 'when the record has less than 4 items' do
it 'raises an ArgumentError' do
- row = { username: 'no one', fullname: 'no one', email: 'no_one@email.com' }
+ row = { username: 'no one', name: 'no one', email: 'no_one@email.com' }
expect(ImportFileHelper).not_to receive(:create_new_user)
expect { AssignmentParticipant.import(row, nil, nil, nil) }.to raise_error('The record containing no one does not have enough items.')
end
@@ -143,10 +143,10 @@
context 'when new user needs to be created' do
let(:row) do
- { username: 'no one', fullname: 'no one', email: 'name@email.com', role: 'user_role_name', parent: 'user_parent_name' }
+ { username: 'no one', name: 'no one', email: 'name@email.com', role: 'user_role_name', parent: 'user_parent_name' }
end
let(:attributes) do
- { role_id: 1, name: 'no one', fullname: 'no one', email: 'name@email.com', email_on_submission: 'name@email.com',
+ { role_id: 1, name: 'no one', name: 'no one', email: 'name@email.com', email_on_submission: 'name@email.com',
email_on_review: 'name@email.com', email_on_review_of_review: 'name@email.com' }
end
let(:test_user) do
@@ -156,7 +156,7 @@
ActionMailer::Base.deliveries.clear
allow(ImportFileHelper).to receive(:define_attributes).with(row).and_return(attributes)
allow(ImportFileHelper).to receive(:create_new_user) do
- test_user = User.new(username: 'abc', fullname: 'abc bbc', email: 'abcbbc@gmail.com')
+ test_user = User.new(username: 'abc', name: 'abc bbc', email: 'abcbbc@gmail.com')
test_user.id = 123
test_user.save!
password = test_user.reset_password # the password is reset
@@ -177,10 +177,10 @@
context 'when the record has more than 4 items' do
let(:row) do
- { username: 'no one', fullname: 'no one', email: 'name@email.com', role: 'user_role_name', parent: 'user_parent_name' }
+ { username: 'no one', name: 'no one', email: 'name@email.com', role: 'user_role_name', parent: 'user_parent_name' }
end
let(:attributes) do
- { role_id: 1, name: 'no one', fullname: 'no one', email: 'name@email.com', email_on_submission: 'name@email.com',
+ { role_id: 1, name: 'no one', name: 'no one', email: 'name@email.com', email_on_submission: 'name@email.com',
email_on_review: 'name@email.com', email_on_review_of_review: 'name@email.com' }
end
before(:each) do
@@ -213,7 +213,7 @@
describe '.export' do
it 'exports all participants in current assignment' do
allow(AssignmentParticipant).to receive_message_chain(:where, :find_each).with(parent_id: 1).with(no_args).and_yield(participant)
- allow(participant).to receive(:user).and_return(build(:student, username: 'student2065', fullname: '2065, student'))
+ allow(participant).to receive(:user).and_return(build(:student, username: 'student2065', name: '2065, student'))
options = { 'personal_details' => 'true', 'role' => 'true', 'handle' => 'true', 'parent' => 'true', 'email_options' => 'true' }
expect(AssignmentParticipant.export([], 1, options)).to eq(
[['student2065',
diff --git a/spec/models/assignment_survey_response_map_spec.rb b/spec/models/assignment_survey_response_map_spec.rb
index 9c2541d3c9b..bb458b779ba 100644
--- a/spec/models/assignment_survey_response_map_spec.rb
+++ b/spec/models/assignment_survey_response_map_spec.rb
@@ -1,10 +1,10 @@
describe AssignmentSurveyResponseMap, type: :model do
- let(:participant) { build(:participant, user_id: 1, user: build(:student, username: 'Jane', fullname: 'Doe, Jane', id: 1)) }
+ let(:participant) { build(:participant, user_id: 1, user: build(:student, username: 'Jane', name: 'Doe, Jane', id: 1)) }
let(:assignment_questionnaire1) { build(:assignment_questionnaire, id: 1, assignment_id: 1, questionnaire_id: 1) }
let(:previous_day) { (Time.now.getlocal - 1 * 86_400).strftime('%Y-%m-%d %H:%M:%S') }
let(:next_day) { (Time.now.getlocal + 1 * 86_400).strftime('%Y-%m-%d %H:%M:%S') }
let(:assignment) { build(:assignment, id: 1, name: 'Assignment1') }
- let(:user) { build(:student, email: 'expertiza.debugging@gmail.com', username: 'Jane', fullname: 'Doe, Jane', id: 1) }
+ let(:user) { build(:student, email: 'expertiza.debugging@gmail.com', username: 'Jane', name: 'Doe, Jane', id: 1) }
before(:each) do
survey_deployment = AssignmentSurveyDeployment.new questionnaire_id: 1, start_date: previous_day, end_date: next_day, parent_id: '12345678', type: 'AssignmentSurveyDeployment'
@assignment_survey_response_map = AssignmentSurveyResponseMap.new
diff --git a/spec/models/cake_spec.rb b/spec/models/cake_spec.rb
index 673a5be1f48..334a5c2742c 100644
--- a/spec/models/cake_spec.rb
+++ b/spec/models/cake_spec.rb
@@ -4,7 +4,7 @@
let(:answer) { Answer.new answer: 45 }
let(:answer1) { Answer.new answer: 50 }
let(:team) { build(:assignment_team, id: 1, name: 'no team', users: [user]) }
- let(:user) { build(:student, id: 1, username: 'no name', fullname: 'no one', participants: [participant]) }
+ let(:user) { build(:student, id: 1, username: 'no name', name: 'no one', participants: [participant]) }
let(:participant) { build(:participant, user_id: 1) }
describe '#edit' do
it 'returns the html ' do
diff --git a/spec/models/course_analytic_spec.rb b/spec/models/course_analytic_spec.rb
index 99e435a1900..9a1b2c917bf 100644
--- a/spec/models/course_analytic_spec.rb
+++ b/spec/models/course_analytic_spec.rb
@@ -12,9 +12,9 @@ def initialize(course, participants, assignments)
describe CourseAnalytic do
let(:course) { build(:course, id: 1, name: 'ECE517') }
- let(:participant) { build(:participant, user: build(:student, username: 'Jane', fullname: 'Doe, Jane', id: 1)) }
- let(:participant2) { build(:participant, user: build(:student, username: 'John', fullname: 'Doe, John', id: 2)) }
- let(:participant3) { build(:participant, can_review: false, user: build(:student, username: 'King', fullname: 'Titan, King', id: 3)) }
+ let(:participant) { build(:participant, user: build(:student, username: 'Jane', name: 'Doe, Jane', id: 1)) }
+ let(:participant2) { build(:participant, user: build(:student, username: 'John', name: 'Doe, John', id: 2)) }
+ let(:participant3) { build(:participant, can_review: false, user: build(:student, username: 'King', name: 'Titan, King', id: 3)) }
let(:assignment) { build(:assignment, id: 1, name: 'no assignment', participants: [participant], teams: [team]) }
let(:assignment2) { build(:assignment, id: 2, name: 'no assignment', participants: [participant], teams: [team]) }
let(:assignment3) { build(:assignment, id: 3, name: 'no assignment', participants: [participant], teams: [team]) }
diff --git a/spec/models/course_node_spec.rb b/spec/models/course_node_spec.rb
index bad4fc64dda..c153f582837 100644
--- a/spec/models/course_node_spec.rb
+++ b/spec/models/course_node_spec.rb
@@ -1,7 +1,7 @@
describe CourseNode do
let(:course) { build(:course, id: 1, name: 'ECE517') }
let(:course_node) { build(:course_node, id: 1) }
- let(:user1) { User.new username: 'abc', fullname: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }
+ let(:user1) { User.new username: 'abc', name: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }
let(:assignment) { build(:assignment, id: 1) }
before(:each) do
course_node.node_object_id = 1
diff --git a/spec/models/course_participant_spec.rb b/spec/models/course_participant_spec.rb
index 99029023a47..78762987ad1 100644
--- a/spec/models/course_participant_spec.rb
+++ b/spec/models/course_participant_spec.rb
@@ -28,7 +28,7 @@
end
it 'raise error if record does not have enough items ' do
- row = { username: 'user_name', fullname: 'user_fullname', email: 'name@email.com' }
+ row = { username: 'user_name', name: 'user_name', email: 'name@email.com' }
expect { CourseParticipant.import(row, nil, nil, nil) }.to raise_error("The record containing #{row[:username]} does not have enough items.")
end
@@ -38,7 +38,7 @@
row = []
allow(Course).to receive(:find).and_return(nil)
allow(session[:user]).to receive(:id).and_return(1)
- row = { username: 'user_name', fullname: 'user_fullname', email: 'name@gmail.com', password: 'user_password' }
+ row = { username: 'user_name', name: 'user_name', email: 'name@gmail.com', password: 'user_password' }
expect { CourseParticipant.import(row, nil, session, 2) }.to raise_error('The course with the id "2" was not found.')
end
@@ -48,7 +48,7 @@
row = []
allow(Course).to receive(:find).and_return(course)
allow(session[:user]).to receive(:id).and_return(1)
- row = { username: 'user_name', fullname: 'user_fullname', email: 'name@email.com', role: 'user_role_name', parent: 'user_parent_name' }
+ row = { username: 'user_name', name: 'user_name', email: 'name@email.com', role: 'user_role_name', parent: 'user_parent_name' }
course_part = CourseParticipant.import(row, nil, session, 2)
expect(course_part).to be_an_instance_of(CourseParticipant)
end
diff --git a/spec/models/course_spec.rb b/spec/models/course_spec.rb
index 52bdc11c55f..fe4ad3778ef 100644
--- a/spec/models/course_spec.rb
+++ b/spec/models/course_spec.rb
@@ -3,10 +3,10 @@
let(:course_team1) { build(:course_team, id: 1) }
let(:course_team2) { build(:course_team, id: 2) }
let(:instructor) { build(:instructor, id: 6) }
- let(:user1) { User.new username: 'abc', fullname: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }
- let(:user2) { User.new username: 'bcd', fullname: 'cbd ccd', email: 'bcdccd@gmail.com', password: '123456789', password_confirmation: '123456789' }
- let(:participant) { build(:participant, user: build(:student, username: 'Jane', fullname: 'Doe, Jane', id: 1)) }
- let(:participant2) { build(:participant, user: build(:student, username: 'John', fullname: 'Doe, John', id: 2)) }
+ let(:user1) { User.new username: 'abc', name: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }
+ let(:user2) { User.new username: 'bcd', name: 'cbd ccd', email: 'bcdccd@gmail.com', password: '123456789', password_confirmation: '123456789' }
+ let(:participant) { build(:participant, user: build(:student, username: 'Jane', name: 'Doe, Jane', id: 1)) }
+ let(:participant2) { build(:participant, user: build(:student, username: 'John', name: 'Doe, John', id: 2)) }
let(:assignment) { build(:assignment, id: 1, name: 'no assgt') }
describe 'validations' do
diff --git a/spec/models/course_survey_response_map_spec.rb b/spec/models/course_survey_response_map_spec.rb
index 2f2cc9f9bb3..9d22a55481a 100644
--- a/spec/models/course_survey_response_map_spec.rb
+++ b/spec/models/course_survey_response_map_spec.rb
@@ -1,9 +1,9 @@
describe CourseSurveyResponseMap do
- let(:participant) { build(:participant, user_id: 1, user: build(:student, username: 'Jane', fullname: 'Doe, Jane', id: 1)) }
+ let(:participant) { build(:participant, user_id: 1, user: build(:student, username: 'Jane', name: 'Doe, Jane', id: 1)) }
let(:course_survey_questionnaire) { CourseSurveyQuestionnaire.new id: 985, name: 'course_survey', private: 0, min_question_score: 0, max_question_score: 10, instructor_id: 1234 }
let(:previous_day) { (Time.now.getlocal - 1 * 86_400).strftime('%Y-%m-%d %H:%M:%S') }
let(:next_day) { (Time.now.getlocal + 1 * 86_400).strftime('%Y-%m-%d %H:%M:%S') }
- let(:user) { build(:student, email: 'expertiza.debugging@gmail.com', username: 'Jane', fullname: 'Doe, Jane', id: 1) }
+ let(:user) { build(:student, email: 'expertiza.debugging@gmail.com', username: 'Jane', name: 'Doe, Jane', id: 1) }
let(:course) { build(:course, id: 1, name: 'ECE517') }
before(:each) do
survey_deployment = CourseSurveyDeployment.new questionnaire_id: 985, start_date: previous_day, end_date: next_day, parent_id: '12345678', type: 'CourseSurveyDeployment'
diff --git a/spec/models/duty_spec.rb b/spec/models/duty_spec.rb
index 726e1716531..a0196a57f16 100644
--- a/spec/models/duty_spec.rb
+++ b/spec/models/duty_spec.rb
@@ -3,9 +3,9 @@
let(:participant) { build(:participant, id: 1, user_id: 1) }
let(:participant2) { build(:participant, id: 2, user_id: 2) }
let(:participant3) { build(:participant, id: 3, user_id: 3) }
- let(:user) { build(:student, id: 1, username: 'no name', fullname: 'no one', participants: [participant]) }
- let(:user2) { build(:student, id: 2, username: 'no name2', fullname: 'no one2', participants: [participant2]) }
- let(:user3) { build(:student, id: 3, username: 'no name3', fullname: 'no one3', participants: [participant3]) }
+ let(:user) { build(:student, id: 1, username: 'no name', name: 'no one', participants: [participant]) }
+ let(:user2) { build(:student, id: 2, username: 'no name2', name: 'no one2', participants: [participant2]) }
+ let(:user3) { build(:student, id: 3, username: 'no name3', name: 'no one3', participants: [participant3]) }
let(:team1) { build(:assignment_team, id: 1, name: 'no team', users: [user, user2, user3]) }
let(:sample_duty_taken) { build(:duty, id: 1, name: 'Developer', max_members_for_duty: 1, assignment_id: 1) }
diff --git a/spec/models/feedback_response_map_spec.rb b/spec/models/feedback_response_map_spec.rb
index 97afa0a4d6a..f99d3ce0738 100644
--- a/spec/models/feedback_response_map_spec.rb
+++ b/spec/models/feedback_response_map_spec.rb
@@ -9,7 +9,7 @@
let(:review_response_map) { build(:review_response_map, id: 2, assignment: assignment, reviewer: participant, reviewee: team) }
let(:answer) { Answer.new(answer: 1, comments: 'Answer text', question_id: 1) }
let(:response) { build(:response, id: 1, map_id: 1, response_map: review_response_map, scores: [answer]) }
- let(:user1) { User.new username: 'abc', fullname: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }
+ let(:user1) { User.new username: 'abc', name: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }
before(:each) do
questionnaires = [questionnaire1, questionnaire2]
allow(feedback_response_map).to receive(:reviewee).and_return(participant)
diff --git a/spec/models/instructor_spec.rb b/spec/models/instructor_spec.rb
index c104464cb1a..e6c094ce18c 100644
--- a/spec/models/instructor_spec.rb
+++ b/spec/models/instructor_spec.rb
@@ -5,8 +5,8 @@
let(:participant2) { build(:participant, id: 2) }
let(:team) { build(:assignment_team, id: 1, name: 'no team') }
let(:course) { build(:course) }
- let(:user1) { User.new username: 'abc', fullname: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }
- let(:user2) { User.new username: 'abc', fullname: 'abc bbc', email: 'abcbbe@gmail.com', password: '123456789', password_confirmation: '123456789' }
+ let(:user1) { User.new username: 'abc', name: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }
+ let(:user2) { User.new username: 'abc', name: 'abc bbc', email: 'abcbbe@gmail.com', password: '123456789', password_confirmation: '123456789' }
let(:ta_mapping1) { TaMapping.new }
let(:ta_mapping2) { TaMapping.new }
before(:each) do
diff --git a/spec/models/lock_spec.rb b/spec/models/lock_spec.rb
index 441f9f7b034..33524dc2ba9 100644
--- a/spec/models/lock_spec.rb
+++ b/spec/models/lock_spec.rb
@@ -7,10 +7,10 @@
before(:each) do
# I was unable to use regular create! calls for user.
# I think this might be because the writers of user.rb overrode User.initialize
- @smyoder = User.new(username: 'smyoder', fullname: 'John Bumgardner', email: 'smyoder@ncsu.edu')
+ @smyoder = User.new(username: 'smyoder', name: 'John Bumgardner', email: 'smyoder@ncsu.edu')
@smyoder.save!
- @smyoder1 = User.new(username: 'smyoder1', fullname: 'John Bumgardner', email: 'smyoder1@ncsu.edu')
+ @smyoder1 = User.new(username: 'smyoder1', name: 'John Bumgardner', email: 'smyoder1@ncsu.edu')
@smyoder1.save!
@response = Response.create!(round: 1)
end
diff --git a/spec/models/metareview_response_map_spec.rb b/spec/models/metareview_response_map_spec.rb
index 0267d412897..f9d8e256397 100644
--- a/spec/models/metareview_response_map_spec.rb
+++ b/spec/models/metareview_response_map_spec.rb
@@ -24,9 +24,9 @@
let(:response2) { build(:response, id: 3, map_id: 1, round: nil, response_map: review_response_map, is_submitted: true) }
let(:response3) { build(:response) }
let(:metareview_response_map) { build(:meta_review_response_map, review_mapping: review_response_map) }
- let(:student) { build(:student, id: 1, username: 'name', fullname: 'no one', email: 'expertiza@mailinator.com') }
- let(:student1) { build(:student, id: 2, username: 'name1', fullname: 'no one', email: 'expertiza@mailinator.com') }
- let(:student2) { build(:student, id: 3, username: 'name2', fullname: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student) { build(:student, id: 1, username: 'name', name: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student1) { build(:student, id: 2, username: 'name1', name: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student2) { build(:student, id: 3, username: 'name2', name: 'no one', email: 'expertiza@mailinator.com') }
let(:assignment_questionnaire1) { build(:assignment_questionnaire, id: 1, assignment_id: 1, questionnaire_id: 1) }
let(:assignment_questionnaire2) { build(:assignment_questionnaire, id: 2, assignment_id: 1, questionnaire_id: 2) }
let(:questionnaire1) { build(:questionnaire, type: 'ReviewQuestionnaire') }
diff --git a/spec/models/participant_spec.rb b/spec/models/participant_spec.rb
index ebb358fe350..6cce5d682be 100644
--- a/spec/models/participant_spec.rb
+++ b/spec/models/participant_spec.rb
@@ -1,11 +1,11 @@
describe Participant do
let(:team) { build(:assignment_team, id: 1, name: 'myTeam') }
- let(:user) { build(:student, id: 4, username: 'no name', fullname: 'no two') }
+ let(:user) { build(:student, id: 4, username: 'no name', name: 'no two') }
let(:team_user) { build(:team_user, id: 1, user: user, team: team) }
let(:topic) { build(:topic) }
- let(:participant) { build(:participant, user: build(:student, username: 'Jane', fullname: 'Doe, Jane', id: 1)) }
- let(:participant2) { build(:participant, user: build(:student, username: 'John', fullname: 'Doe, John', id: 2)) }
- let(:participant3) { build(:participant, can_review: false, user: build(:student, username: 'King', fullname: 'Titan, King', id: 3)) }
+ let(:participant) { build(:participant, user: build(:student, username: 'Jane', name: 'Doe, Jane', id: 1)) }
+ let(:participant2) { build(:participant, user: build(:student, username: 'John', name: 'Doe, John', id: 2)) }
+ let(:participant3) { build(:participant, can_review: false, user: build(:student, username: 'King', name: 'Titan, King', id: 3)) }
let(:participant4) { Participant.new }
let(:assignment) { build(:assignment, id: 1, name: 'no assgt') }
let(:participant5) { build(:participant, user: user, assignment: assignment) }
diff --git a/spec/models/response_map_spec.rb b/spec/models/response_map_spec.rb
index 8102c923927..f1f7341265f 100644
--- a/spec/models/response_map_spec.rb
+++ b/spec/models/response_map_spec.rb
@@ -5,9 +5,9 @@
let(:participant) { build(:participant, id: 1, parent_id: 1, user: student) }
let(:participant1) { build(:participant, id: 2, parent_id: 2, user: student1) }
let(:participant2) { build(:participant, id: 3, parent_id: 3, user: student2) }
- let(:student) { build(:student, id: 1, username: 'name', fullname: 'no one', email: 'expertiza@mailinator.com') }
- let(:student1) { build(:student, id: 2, username: 'name1', fullname: 'no one', email: 'expertiza@mailinator.com') }
- let(:student2) { build(:student, id: 3, username: 'name2', fullname: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student) { build(:student, id: 1, username: 'name', name: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student1) { build(:student, id: 2, username: 'name1', name: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student2) { build(:student, id: 3, username: 'name2', name: 'no one', email: 'expertiza@mailinator.com') }
let(:assignment) { build(:assignment, id: 1, name: 'Test Assgt', rounds_of_reviews: 2) }
let(:assignment1) { build(:assignment, id: 2, name: 'Test Assgt2', rounds_of_reviews: 2) }
diff --git a/spec/models/response_spec.rb b/spec/models/response_spec.rb
index e46cdc94041..be75421dab7 100644
--- a/spec/models/response_spec.rb
+++ b/spec/models/response_spec.rb
@@ -1,6 +1,6 @@
describe Response do
- let(:user) { build(:student, id: 1, role_id: 1, username: 'no name', fullname: 'no one') }
- let(:user2) { build(:student, id: 2, role_id: 2, username: 'no name2', fullname: 'no one2') }
+ let(:user) { build(:student, id: 1, role_id: 1, username: 'no name', name: 'no one') }
+ let(:user2) { build(:student, id: 2, role_id: 2, username: 'no name2', name: 'no one2') }
let(:participant) { build(:participant, id: 1, parent_id: 1, user: user) }
let(:participant2) { build(:participant, id: 2, parent_id: 2, user: user2) }
let(:assignment) { build(:assignment, id: 1, name: 'Test Assgt') }
diff --git a/spec/models/review_bid_spec.rb b/spec/models/review_bid_spec.rb
index 7ecda347fec..efe0b78c2c7 100644
--- a/spec/models/review_bid_spec.rb
+++ b/spec/models/review_bid_spec.rb
@@ -1,7 +1,7 @@
describe ReviewBid do
let(:bid1) { build(:review_bid, priority: 3, participant_id: 7601, signuptopic_id: 123, assignment_id: 2085, updated_at: '2018-01-01 00:00:00') }
let(:bid2) { build(:review_bid, priority: 2, participant_id: '7602', signuptopic_id: 124, assignment_id: 2086) }
- let(:student) { build(:student, id: 1, username: 'name', fullname: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student) { build(:student, id: 1, username: 'name', name: 'no one', email: 'expertiza@mailinator.com') }
let(:participant) { build(:participant, id: 1, parent_id: 1, user: student, assignment: assignment1) }
let(:topic) { build(:topic, id: 1, topic_name: 'New Topic') }
let(:assignment1) { build(:assignment, id: 2, name: 'Test Assgt', rounds_of_reviews: 1) }
diff --git a/spec/models/review_response_map_spec.rb b/spec/models/review_response_map_spec.rb
index da88716371d..163ebfe1fee 100755
--- a/spec/models/review_response_map_spec.rb
+++ b/spec/models/review_response_map_spec.rb
@@ -24,8 +24,8 @@
let(:response2) { build(:response, id: 3, map_id: 1, round: nil, response_map: review_response_map, is_submitted: true) }
let(:response3) { build(:response) }
let(:metareview_response_map) { build(:meta_review_response_map, reviewed_object_id: 1) }
- let(:student) { build(:student, id: 1, username: 'name', fullname: 'no one', email: 'expertiza@mailinator.com') }
- let(:student1) { build(:student, id: 2, username: 'name1', fullname: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student) { build(:student, id: 1, username: 'name', name: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student1) { build(:student, id: 2, username: 'name1', name: 'no one', email: 'expertiza@mailinator.com') }
let(:assignment_questionnaire1) { build(:assignment_questionnaire, id: 1, assignment_id: 1, questionnaire_id: 1) }
let(:assignment_questionnaire2) { build(:assignment_questionnaire, id: 2, assignment_id: 1, questionnaire_id: 2) }
let(:questionnaire1) { build(:questionnaire, type: 'ReviewQuestionnaire') }
diff --git a/spec/models/sign_up_topic_spec.rb b/spec/models/sign_up_topic_spec.rb
index f60fe19e0dd..748b0953257 100755
--- a/spec/models/sign_up_topic_spec.rb
+++ b/spec/models/sign_up_topic_spec.rb
@@ -216,7 +216,7 @@
let(:instructor) do
User.create!(
username: 'Instructor',
- fullname: 'Full', # Ensure this matches the expected format if there are specific validations.
+ name: 'Full', # Ensure this matches the expected format if there are specific validations.
email: 'instructor@example.com', # Provide a valid email format.
password: 'securepassword', # Assume a password is required for user creation.
password_confirmation: 'securepassword' # Match the password confirmation if necessary.
diff --git a/spec/models/signed_up_team_spec.rb b/spec/models/signed_up_team_spec.rb
index 88b01ab3e12..60164a55160 100644
--- a/spec/models/signed_up_team_spec.rb
+++ b/spec/models/signed_up_team_spec.rb
@@ -7,7 +7,7 @@
let(:user2) { create(:student, username: 'qwertyui', id: 5) }
describe '.drop_signup_record' do
- let(:instructor) { User.create!(username: 'Instructor', fullname: 'FullInstructor', email: 'instructor@example.com', password: 'securepassword', password_confirmation: 'securepassword') }
+ let(:instructor) { User.create!(username: 'Instructor', name: 'FullInstructor', email: 'instructor@example.com', password: 'securepassword', password_confirmation: 'securepassword') }
let(:assignment) { Assignment.create!(name: 'Test Assignment', instructor_id: instructor.id, directory_path: 'test/path') }
let(:topic) { SignUpTopic.create!(topic_name: 'Sample Topic', assignment: assignment) }
let(:team) { Team.create!(name: 'Sample Team') }
diff --git a/spec/models/student_task_spec.rb b/spec/models/student_task_spec.rb
index 14a659b392b..d15897ace2b 100644
--- a/spec/models/student_task_spec.rb
+++ b/spec/models/student_task_spec.rb
@@ -226,7 +226,7 @@
allow(AssignmentParticipant).to receive(:find_by).with(user_id: 1, parent_id: assignment.id).and_return(participant)
allow(AssignmentParticipant).to receive(:find_by).with(user_id: 5, parent_id: assignment.id).and_return(participant2)
allow(Assignment).to receive(:find_by).with(id: team.parent_id).and_return(assignment)
- expect(StudentTask.teamed_students(user)).to eq(assignment.course_id => [user2.fullname])
+ expect(StudentTask.teamed_students(user)).to eq(assignment.course_id => [user2.name])
end
end
end
diff --git a/spec/models/super_administrator_spec.rb b/spec/models/super_administrator_spec.rb
index 4546a77c4a4..fc12fe1a90a 100644
--- a/spec/models/super_administrator_spec.rb
+++ b/spec/models/super_administrator_spec.rb
@@ -1,6 +1,6 @@
describe SuperAdministrator do
- let(:user1) { User.new username: 'abc', fullname: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }
- let(:user2) { User.new username: 'abc', fullname: 'abc bbc', email: 'abcbbe@gmail.com', password: '123456789', password_confirmation: '123456789' }
+ let(:user1) { User.new username: 'abc', name: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }
+ let(:user2) { User.new username: 'abc', name: 'abc bbc', email: 'abcbbe@gmail.com', password: '123456789', password_confirmation: '123456789' }
let(:superadmin) { build(:superadmin) }
describe '#get_user_list' do
it 'should return a list of all users in the system' do
diff --git a/spec/models/ta_spec.rb b/spec/models/ta_spec.rb
index 2dfa15aaf03..d2c1d3bf8ea 100644
--- a/spec/models/ta_spec.rb
+++ b/spec/models/ta_spec.rb
@@ -6,7 +6,7 @@
let(:assignment) { build(:assignment, id: 1, name: 'no assignment', participants: [participant], teams: [team]) }
let(:participant) { build(:participant, id: 1) }
let(:team) { build(:assignment_team, id: 1, name: 'no team') }
- let(:user) { build(:student, id: 4, username: 'no name', fullname: 'no two') }
+ let(:user) { build(:student, id: 4, username: 'no name', name: 'no two') }
describe '#teaching_assistant?' do
it 'returns true for a teaching assistant' do
diff --git a/spec/models/team_spec.rb b/spec/models/team_spec.rb
index 1eaab626523..9ec27d29c42 100644
--- a/spec/models/team_spec.rb
+++ b/spec/models/team_spec.rb
@@ -3,7 +3,7 @@
let(:participant) { build(:participant, user_id: 1) }
let(:participant2) { build(:participant, user_id: 2) }
let(:participant3) { build(:participant, user_id: 3) }
- let(:user) { build(:student, id: 1, username: 'no name', fullname: 'no one', participants: [participant]) }
+ let(:user) { build(:student, id: 1, username: 'no name', name: 'no one', participants: [participant]) }
let(:user2) { build(:student, id: 2) }
let(:user3) { build(:student, id: 3) }
let(:team) { build(:assignment_team, id: 1, name: 'no team', users: [user]) }
diff --git a/spec/models/teammate_review_response_map_spec.rb b/spec/models/teammate_review_response_map_spec.rb
index 009d4c97213..a000bdd452a 100644
--- a/spec/models/teammate_review_response_map_spec.rb
+++ b/spec/models/teammate_review_response_map_spec.rb
@@ -13,8 +13,8 @@
let(:assignment) { build(:assignment, id: 1, name: 'Test Assgt', rounds_of_reviews: 2) }
let(:assignment1) { build(:assignment, id: 2, name: 'Test Assgt', rounds_of_reviews: 1) }
let(:response) { build(:response, id: 1, map_id: 1, round: 1, response_map: teammate_review_response_map1, is_submitted: true) }
- let(:student) { build(:student, id: 1, username: 'name', fullname: 'no one', email: 'expertiza@mailinator.com') }
- let(:student1) { build(:student, id: 2, username: 'name1', fullname: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student) { build(:student, id: 1, username: 'name', name: 'no one', email: 'expertiza@mailinator.com') }
+ let(:student1) { build(:student, id: 2, username: 'name1', name: 'no one', email: 'expertiza@mailinator.com') }
# let(:assignment_teammate_questionnaire1) { build(:assignment_teammate_questionnaire, id: 1, assignment: assignment1, questionnaire: teammate_questionnaire1) }
# let(:assignment_teammate_questionnaire2) { build(:assignment_teammate_questionnaire, id: 2, assignment_id: 2, questionnaire_id: 2) }
# let(:teammate_questionnaire1) { build(:teammate_questionnaire, id: 1, type: 'TeammateReviewQuestionnaire') }
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index a9ba7ecab8e..fd98ee9a0d1 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -1,10 +1,10 @@
describe User do
let(:user) do
- User.new username: 'abc', fullname: 'abc xyz', email: 'abcxyz@gmail.com', password: '12345678', password_confirmation: '12345678',
+ User.new username: 'abc', name: 'abc xyz', email: 'abcxyz@gmail.com', password: '12345678', password_confirmation: '12345678',
email_on_submission: 1, email_on_review: 1, email_on_review_of_review: 0, copy_of_emails: 1, handle: 'handle'
end
- let(:user1) { User.new username: 'abc', fullname: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }
- let(:user2) { User.new username: 'abc', fullname: 'abc bbc', email: 'abcbbe@gmail.com', password: '123456789', password_confirmation: '123456789' }
+ let(:user1) { User.new username: 'abc', name: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }
+ let(:user2) { User.new username: 'abc', name: 'abc bbc', email: 'abcbbe@gmail.com', password: '123456789', password_confirmation: '123456789' }
describe '#username' do
it 'returns the username of the user' do
@@ -25,18 +25,18 @@
end
end
- describe '#fullname' do
+ describe '#name' do
it 'returns the full name of the user' do
- expect(user.fullname).to eq('abc xyz')
+ expect(user.name).to eq('abc xyz')
end
- it 'Validate presence of fullname which cannot be blank' do
- user.fullname = ' '
+ it 'Validate presence of name which cannot be blank' do
+ user.name = ' '
expect(user).not_to be_valid
end
it 'Validate the email format correctness' do
- user.fullname = 'John Bumgardner'
+ user.name = 'John Bumgardner'
expect(user).to be_valid
end
end
@@ -207,18 +207,18 @@
describe '.import' do
it 'raises error if import column does not equal to 3' do
- row = { 'username' => 'abc', 'fullname' => 'abc xyz' }
+ row = { 'username' => 'abc', 'name' => 'abc xyz' }
expect { User.import(row, nil, nil, nil) }.to raise_error(ArgumentError)
end
it 'updates an existing user with info from impor file' do
create(:student, username: 'abc')
- row = { username: 'abc', fullname: 'test, test', email: 'test@gmail.com' }
+ row = { username: 'abc', name: 'test, test', email: 'test@gmail.com' }
allow(user).to receive(:id).and_return(6)
User.import(row, nil, { user: user }, nil)
updated_user = User.find_by(username: 'abc')
expect(updated_user.email).to eq 'test@gmail.com'
- expect(updated_user.fullname).to eq 'test, test'
+ expect(updated_user.name).to eq 'test, test'
expect(updated_user.parent_id).to eq 6
end
end
@@ -455,7 +455,7 @@
before(:each) do
allow(User).to receive_message_chain(:order, :where).with('(role_id in (?) or id = ?) and username like ?', role.get_available_roles, @user_id, '%username%')
- allow(User).to receive_message_chain(:order, :where).with('(role_id in (?) or id = ?) and fullname like ?', role.get_available_roles, @user_id, '%fullname%')
+ allow(User).to receive_message_chain(:order, :where).with('(role_id in (?) or id = ?) and name like ?', role.get_available_roles, @user_id, '%name%')
allow(User).to receive_message_chain(:order, :where).with('(role_id in (?) or id = ?) and email like ?', role.get_available_roles, @user_id, '%email%')
user_id = double
end
@@ -469,7 +469,7 @@
it 'when the search_by is 2' do
search_by = '2'
allow(User).to receive_message_chain(:order, :where).and_return(user)
- expect(User.search_users(role, @user_id, 'fullname', search_by)).to eq user
+ expect(User.search_users(role, @user_id, 'name', search_by)).to eq user
end
it 'when the search_by is 3' do
diff --git a/spec/models/vm_user_answer_tagging_spec.rb b/spec/models/vm_user_answer_tagging_spec.rb
index c4d86661bad..568ef2bfa6c 100644
--- a/spec/models/vm_user_answer_tagging_spec.rb
+++ b/spec/models/vm_user_answer_tagging_spec.rb
@@ -1,5 +1,5 @@
describe VmUserAnswerTagging do
- let(:user1) { User.new username: 'abc', fullname: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }
+ let(:user1) { User.new username: 'abc', name: 'abc bbc', email: 'abcbbc@gmail.com', password: '123456789', password_confirmation: '123456789' }
describe '#initialize' do
it 'sets the instance variables' do
vm_user_answer_tagging = VmUserAnswerTagging.new(user1, 75, true, true, true, '3000-01-31')