对非课堂成员隐藏学号信息

dev_bj
cxt 6 years ago
parent 11418510e3
commit 87afa69232

@ -5,7 +5,9 @@
<tr class="eduCenternew"> <tr class="eduCenternew">
<th width="10%" class="tabeltext-alignleft">用户ID</th> <th width="10%" class="tabeltext-alignleft">用户ID</th>
<th width="10%" class="tabeltext-alignleft">姓名</th> <th width="10%" class="tabeltext-alignleft">姓名</th>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<th width="10%" class="tabeltext-alignleft">学号</th> <th width="10%" class="tabeltext-alignleft">学号</th>
<% end %>
<th width="10%" class="tabeltext-alignleft">分班</th> <th width="10%" class="tabeltext-alignleft">分班</th>
<!--<th width="13%" style="white-space:nowrap; overflow:hidden; text-overflow:ellipsis" class="tabeltext-alignleft">课堂成绩</th> <!--<th width="13%" style="white-space:nowrap; overflow:hidden; text-overflow:ellipsis" class="tabeltext-alignleft">课堂成绩</th>
<th width="10%">活跃度</th>--> <th width="10%">活跃度</th>-->
@ -22,9 +24,11 @@
<% end %> <% end %>
<span class="edu-txt-w140 task-hide mt5"><%= user.login %></span></td> <span class="edu-txt-w140 task-hide mt5"><%= user.login %></span></td>
<td class="tabeltext-alignleft"><%= link_to user.show_real_name, user_path(user), :class => 'edu-txt-w140 task-hide mt5 color-grey-3', :target => '_blank' %></td> <td class="tabeltext-alignleft"><%= link_to user.show_real_name, user_path(user), :class => 'edu-txt-w140 task-hide mt5 color-grey-3', :target => '_blank' %></td>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<td class="tabeltext-alignleft"> <td class="tabeltext-alignleft">
<span class="edu-txt-w140 task-hide mt5"><%= user.user_extensions ? user.user_extensions.student_id : '' %></span> <span class="edu-txt-w140 task-hide mt5"><%= user.user_extensions ? user.user_extensions.student_id : '' %></span>
</td> </td>
<% end %>
<td class="tabeltext-alignleft"><%= member.course_group_id == 0 || member.course_group_id.nil? ? '未分班' : member.course_group.name %></td> <td class="tabeltext-alignleft"><%= member.course_group_id == 0 || member.course_group_id.nil? ? '未分班' : member.course_group.name %></td>
<% if false %> <% if false %>
<td class="tabeltext-alignleft"><%= format("%.1f", member.course_score) %></td><!--课堂成绩--> <td class="tabeltext-alignleft"><%= format("%.1f", member.course_score) %></td><!--课堂成绩-->

@ -12,7 +12,9 @@
<th>序号</th> <th>序号</th>
<th>姓名</th> <th>姓名</th>
<th class="with10">分班</th> <th class="with10">分班</th>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<th>学号</th> <th>学号</th>
<% end %>
<th>提交状态</th> <th>提交状态</th>
<th>提交时间</th> <th>提交时间</th>
<th>客观题得分</th> <th>客观题得分</th>
@ -35,9 +37,11 @@
<td title="<%= member.try(:course_group_id).to_i == 0 ? '未分班' : member.course_group.name %>"> <td title="<%= member.try(:course_group_id).to_i == 0 ? '未分班' : member.course_group.name %>">
<span class="task-hide" style="display: block;max-width: 120px;"><%= member.try(:course_group_id).to_i == 0 ? '未分班' : member.course_group.name %></span> <span class="task-hide" style="display: block;max-width: 120px;"><%= member.try(:course_group_id).to_i == 0 ? '未分班' : member.course_group.name %></span>
</td> </td>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<td title="<%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id %>"> <td title="<%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id %>">
<%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id %> <%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id %>
</td> </td>
<% end %>
<td> <td>
<%= (ex_poll_work_status exercise.commit_status).html_safe %> <%= (ex_poll_work_status exercise.commit_status).html_safe %>
</td> </td>

@ -16,27 +16,29 @@
</div> </div>
</div> </div>
<div class="clearfix minH-280"> <div class="clearfix minH-280">
<table cellpadding="0" cellspacing="0" class="edu-txt-center edu-pop-table aroundRange"> <table class="edu-pop-table edu-txt-center hover-td" cellspacing="0" cellpadding="0">
<thead> <thead>
<tr> <tr>
<th width="4%">序号</th> <th>序号</th>
<th width="10%">姓名</th> <th width="10%">姓名</th>
<th class="flex1">学号</th> <% if User.current.admin || User.current.member_of_course?(@course) %>
<th width="7%">分班</th> <th>学号</th>
<% end %>
<th>分班</th>
<% if @task.task_type == 2 %> <% if @task.task_type == 2 %>
<th width="7%">分组</th> <th>分组</th>
<% if @task.base_on_project %> <% if @task.base_on_project %>
<th width="12%">关联项目</th> <th>关联项目</th>
<% end %> <% end %>
<% end %> <% end %>
<th width="6%">提交状态</th> <th>提交状态</th>
<th width="12%">更新时间</th> <th>更新时间</th>
<th width="8%">教师评分</th> <th>教师评分</th>
<% if @task.cross_comment %> <% if @task.cross_comment %>
<th width="8%">交叉评分</th> <th>交叉评分</th>
<% end %> <% end %>
<th width="8%">最终成绩</th> <th>最终成绩</th>
<th width="11%">操作</th> <th>操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -44,16 +46,20 @@
<% @works.each_with_index do |work, i| %> <% @works.each_with_index do |work, i| %>
<% score_open = task_score_open || work.user == User.current %> <% score_open = task_score_open || work.user == User.current %>
<tr> <tr>
<td width="4%"><%= (@page - 1) * @limit + i + 1 %></td> <td><%= (@page - 1) * @limit + i + 1 %></td>
<td width="10%"><%= link_to work.user.show_real_name, user_path(work.user), :target => "_blank" %></td> <td><%= link_to work.user.show_real_name, user_path(work.user), :target => "_blank" %></td>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<% student_id = work.user.user_extensions.nil? ? "--" : work.user.user_extensions.student_id %> <% student_id = work.user.user_extensions.nil? ? "--" : work.user.user_extensions.student_id %>
<td class="task-hide flex1"><%= student_id %></td> <td class="task-hide"><%= student_id %></td>
<% end %>
<% group_name = member_group_name @course.members, work.user_id %> <% group_name = member_group_name @course.members, work.user_id %>
<td width="7%" class="task-hide" title="<%= group_name %>"><%= group_name %></td> <td title="<%= group_name %>">
<span class="task-hide" style="display: block;max-width: 120px;"><%= group_name %></span>
</td>
<% if @task.task_type == 2 %> <% if @task.task_type == 2 %>
<td width="7%" class="task-hide"><%= work.group_id == 0 ? '--' : '分组'+work.group_id.to_s %></td> <td class="task-hide"><%= work.group_id == 0 ? '--' : '分组'+work.group_id.to_s %></td>
<% if @task.base_on_project %> <% if @task.base_on_project %>
<td width="12%" class="student_score_info edu-position"> <td class="student_score_info edu-position">
<% if work.project %> <% if work.project %>
<% project = work.project %> <% project = work.project %>
<% if project.status != 9 && (project.is_public || User.current.member_of?(project) || @is_teacher) %> <% if project.status != 9 && (project.is_public || User.current.member_of?(project) || @is_teacher) %>
@ -85,18 +91,18 @@
</td> </td>
<% end %> <% end %>
<% end %> <% end %>
<td width="6%"><%= (ex_poll_work_status work.work_status).html_safe %></td> <td><%= (ex_poll_work_status work.work_status).html_safe %></td>
<td width="12%" class="color-grey-9"><%= work.work_status == 0 ? '--' : format_time(work.update_time) %></td> <td class="color-grey-9"><%= work.work_status == 0 ? '--' : format_time(work.update_time) %></td>
<td width="8%" class="<%= score_color (!score_open || work.teacher_score.nil? ? nil : work.teacher_score)%>"> <td class="<%= score_color (!score_open || work.teacher_score.nil? ? nil : work.teacher_score)%>">
<%= work.work_status == 0 ? '--' : (work.teacher_score.nil? ? "未批阅" : (!score_open ? "**" : format("%.1f", work.teacher_score.round(1)))) %> <%= work.work_status == 0 ? '--' : (work.teacher_score.nil? ? "未批阅" : (!score_open ? "**" : format("%.1f", work.teacher_score.round(1)))) %>
</td> </td>
<% if @task.cross_comment %> <% if @task.cross_comment %>
<td width="8%" class="<%= score_color (!score_open || work.cross_score.nil? ? nil : work.cross_score)%>"> <td class="<%= score_color (!score_open || work.cross_score.nil? ? nil : work.cross_score)%>">
<%= work.work_status == 0 ? '--' : (work.cross_score.nil? ? "未批阅" : (!score_open ? "**" : (format("%.1f", work.cross_score.round(1)) + "#{work.graduation_work_scores.where(:reviewer_role => 2).group_by(&:user_id).count}"))) %> <%= work.work_status == 0 ? '--' : (work.cross_score.nil? ? "未批阅" : (!score_open ? "**" : (format("%.1f", work.cross_score.round(1)) + "#{work.graduation_work_scores.where(:reviewer_role => 2).group_by(&:user_id).count}"))) %>
</td> </td>
<% end %> <% end %>
<% score = work.work_score %> <% score = work.work_score %>
<td width="8%" class="<%= score_color (!score_open || score.nil? ? nil : score)%> edu-position"> <td class="<%= score_color (!score_open || score.nil? ? nil : score)%> edu-position">
<%= score.nil? ? "--" : (!score_open ? "**" : format("%.1f",score<0 ? 0 : score.round(1)))%> <%= score.nil? ? "--" : (!score_open ? "**" : format("%.1f",score<0 ? 0 : score.round(1)))%>
<% if score.present? %> <% if score.present? %>
<div class="popup_tip_box-black" style="left: 65px;"> <div class="popup_tip_box-black" style="left: 65px;">
@ -110,7 +116,7 @@
</div> </div>
<% end %> <% end %>
</td> </td>
<td width="11%"> <td>
<% if @is_teacher && @task.cross_comment && @task.comment_status == 2 %> <% if @is_teacher && @task.cross_comment && @task.comment_status == 2 %>
<a href="<%= assign_teacher_graduation_work_path(work) %>" data-remote="true" class="color-blue ml5 mr5 allotTeacher">分配</a> <a href="<%= assign_teacher_graduation_work_path(work) %>" data-remote="true" class="color-blue ml5 mr5 allotTeacher">分配</a>
<% end %> <% end %>

@ -3,7 +3,9 @@
<p> <p>
<span>序号</span> <span>序号</span>
<span class="s-w">姓名</span> <span class="s-w">姓名</span>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<span class="m-w">学号</span> <span class="m-w">学号</span>
<% end %>
<span class="m-w">分班</span> <span class="m-w">分班</span>
<span class="m-w">选题时间</span> <span class="m-w">选题时间</span>
<span class="l-w flex1">确认结果</span> <span class="l-w flex1">确认结果</span>
@ -15,8 +17,10 @@
<p> <p>
<span class="color-grey-6"><%= index + 1 %></span> <span class="color-grey-6"><%= index + 1 %></span>
<span class="s-w color-grey-3"><a href="<%= user_path(student_topic.user) %>" target="_blank"><%= student_topic.user.show_real_name %></a></span> <span class="s-w color-grey-3"><a href="<%= user_path(student_topic.user) %>" target="_blank"><%= student_topic.user.show_real_name %></a></span>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<% student_id = student_topic.user.user_extensions.try(:student_id).present? ? student_topic.user.user_extensions.student_id : "--" %> <% student_id = student_topic.user.user_extensions.try(:student_id).present? ? student_topic.user.user_extensions.student_id : "--" %>
<span class="m-w"><%= student_id %></span> <span class="m-w"><%= student_id %></span>
<% end %>
<span class="m-w"><%= student_topic.member.course_group.try(:name) %></span> <span class="m-w"><%= student_topic.member.course_group.try(:name) %></span>
<span class="m-w"><%= format_time student_topic.created_at %></span> <span class="m-w"><%= format_time student_topic.created_at %></span>
<%= (student_topic_status student_topic.status).html_safe %> <%= (student_topic_status student_topic.status).html_safe %>

@ -10,7 +10,9 @@
<th>序号</th> <th>序号</th>
<th>姓名</th> <th>姓名</th>
<th class="with20">分班</th> <th class="with20">分班</th>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<th>学号</th> <th>学号</th>
<% end %>
<th>提交状态</th> <th>提交状态</th>
<th>提交时间</th> <th>提交时间</th>
<% if @poll.un_anonymous && @is_teacher %> <% if @poll.un_anonymous && @is_teacher %>
@ -29,9 +31,11 @@
<td title="<%= member.try(:course_group_id).to_i == 0 ? '未分班' : member.course_group.name %>"> <td title="<%= member.try(:course_group_id).to_i == 0 ? '未分班' : member.course_group.name %>">
<span class="task-hide" style="display: block;max-width: 230px;"><%= member.try(:course_group_id).to_i == 0 ? '未分班' : member.course_group.name %></span> <span class="task-hide" style="display: block;max-width: 230px;"><%= member.try(:course_group_id).to_i == 0 ? '未分班' : member.course_group.name %></span>
</td> </td>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<td title="<%= poll.user.user_extensions.nil? ? "--" : poll.user.user_extensions.student_id %>"> <td title="<%= poll.user.user_extensions.nil? ? "--" : poll.user.user_extensions.student_id %>">
<%= poll.user.user_extensions.nil? ? "--" : poll.user.user_extensions.student_id %> <%= poll.user.user_extensions.nil? ? "--" : poll.user.user_extensions.student_id %>
</td> </td>
<% end %>
<td> <td>
<%= (ex_poll_work_status poll.commit_status).html_safe %> <%= (ex_poll_work_status poll.commit_status).html_safe %>
</td> </td>

@ -3,7 +3,9 @@
<th>序号</th> <th>序号</th>
<th>姓名</th> <th>姓名</th>
<th class="with10">分班</th> <th class="with10">分班</th>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<th>学号</th> <th>学号</th>
<% end %>
<th>提交状态</th> <th>提交状态</th>
<th>更新时间</th> <th>更新时间</th>
<th>教师评分</th> <th>教师评分</th>
@ -33,10 +35,12 @@
<td title="<%= group_name %>"> <td title="<%= group_name %>">
<span class="task-hide" style="display: block;max-width: 120px;"><%= group_name %></span> <span class="task-hide" style="display: block;max-width: 120px;"><%= group_name %></span>
</td> </td>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<% student_id = student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %> <% student_id = student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %>
<td title="<%= student_id %>"> <td title="<%= student_id %>">
<%= student_id %> <%= student_id %>
</td> </td>
<% end %>
<td> <td>
<%= (ex_poll_work_status student_work.work_status).html_safe %> <%= (ex_poll_work_status student_work.work_status).html_safe %>
</td> </td>

@ -3,7 +3,9 @@
<th>序号</th> <th>序号</th>
<th>姓名</th> <th>姓名</th>
<th class="with10">分班</th> <th class="with10">分班</th>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<th>学号</th> <th>学号</th>
<% end %>
<th>分组</th> <th>分组</th>
<% if @homework.homework_detail_group.base_on_project == 1 %> <% if @homework.homework_detail_group.base_on_project == 1 %>
<th>关联项目</th> <th>关联项目</th>
@ -38,10 +40,12 @@
<td title="<%= group_name %>"> <td title="<%= group_name %>">
<span class="task-hide" style="display: block;max-width: 120px;"><%= group_name %></span> <span class="task-hide" style="display: block;max-width: 120px;"><%= group_name %></span>
</td> </td>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<% student_id = student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %> <% student_id = student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %>
<td title="<%= student_id %>"> <td title="<%= student_id %>">
<%= student_id %> <%= student_id %>
</td> </td>
<% end %>
<td> <td>
<%= student_work.group_id == 0 ? '--' : '分组'+student_work.group_id.to_s %> <%= student_work.group_id == 0 ? '--' : '分组'+student_work.group_id.to_s %>
</td> </td>

@ -3,7 +3,9 @@
<th>序号</th> <th>序号</th>
<th class="with10">姓名</th> <th class="with10">姓名</th>
<th>分班</th> <th>分班</th>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<th>学号</th> <th>学号</th>
<% end %>
<th>提交状态</th> <th>提交状态</th>
<th>提交耗时</th> <th>提交耗时</th>
<th>更新时间</th> <th>更新时间</th>
@ -30,10 +32,12 @@
<td title="<%= group_name %>"> <td title="<%= group_name %>">
<span class="task-hide"><%= group_name %></span> <span class="task-hide"><%= group_name %></span>
</td> </td>
<% if User.current.admin || User.current.member_of_course?(@course) %>
<% student_id = student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %> <% student_id = student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id %>
<td title="<%= student_id %>"> <td title="<%= student_id %>">
<%= student_id %> <%= student_id %>
</td> </td>
<% end %>
<td> <td>
<% status = list_work_status student_work, @homework, group_id %> <% status = list_work_status student_work, @homework, group_id %>
<span class='<%= status == "未提交" ? "" : ((status == "按时提交" || status == "正在提交") ? "color-light-green" : "color-red") %>'><%= status %></span> <span class='<%= status == "未提交" ? "" : ((status == "按时提交" || status == "正在提交") ? "color-light-green" : "color-red") %>'><%= status %></span>

Loading…
Cancel
Save