parent
eb3ac06b40
commit
1fee210924
|
@ -331,18 +331,9 @@ class HomeworkAttachController < ApplicationController
|
||||||
if User.current.admin? || User.current.member_of_course?(course)
|
if User.current.admin? || User.current.member_of_course?(course)
|
||||||
name = params[:homework_name]
|
name = params[:homework_name]
|
||||||
description = params[:homework_description]
|
description = params[:homework_description]
|
||||||
if params[:homework_attach]
|
|
||||||
if params[:homework_attach][:project_id]
|
|
||||||
project_id = params[:homework_attach][:project_id]
|
|
||||||
else
|
|
||||||
project_id = 0
|
|
||||||
end
|
|
||||||
else
|
|
||||||
project_id = 0
|
|
||||||
end
|
|
||||||
@homework.name = name
|
@homework.name = name
|
||||||
@homework.description = description
|
@homework.description = description
|
||||||
@homework.project_id = project_id
|
@homework.project_id = params[:project_id] || 0
|
||||||
if params[:attachments]
|
if params[:attachments]
|
||||||
@homework.save_attachments(params[:attachments])
|
@homework.save_attachments(params[:attachments])
|
||||||
end
|
end
|
||||||
|
|
|
@ -41,13 +41,13 @@
|
||||||
<div class="Newwork">
|
<div class="Newwork">
|
||||||
<div id="tb_" class="tb_">
|
<div id="tb_" class="tb_">
|
||||||
<ul>
|
<ul>
|
||||||
<li id="tb_1" class="hovertab" onclick="switchTab(1);this.blur();return false;" style="width: auto; padding:5px 10px 0;">
|
<li id="tb_1" class="hovertab" onclick="switchTab(1);this.blur();return false;" style="width: auto; padding:10px 10px 0;">
|
||||||
修改作业
|
修改作业
|
||||||
</li>
|
</li>
|
||||||
<li id="tb_2" class="normaltab" onclick="switchTab(2);this.blur();return false;">
|
<li id="tb_2" class="normaltab" onclick="switchTab(2);this.blur();return false;">
|
||||||
成员
|
成员
|
||||||
</li>
|
</li>
|
||||||
<li class="N_top" style="width: 747px;">
|
<li class="N_top" style="width: 747px;line-height: 1.9;">
|
||||||
<%= link_to(l(:label_project_new), {:controller => 'projects',
|
<%= link_to(l(:label_project_new), {:controller => 'projects',
|
||||||
:action => 'new',
|
:action => 'new',
|
||||||
:course => 0,
|
:course => 0,
|
||||||
|
|
|
@ -41,10 +41,10 @@
|
||||||
<div class="Newwork">
|
<div class="Newwork">
|
||||||
<div id="tb_" class="tb_">
|
<div id="tb_" class="tb_">
|
||||||
<ul>
|
<ul>
|
||||||
<li id="tb_1" class="hovertab" onmouseover="x:HoverLi(1);" style="width: auto; padding:5px 10px 0;">
|
<li id="tb_1" class="hovertab" onmouseover="x:HoverLi(1);" style="width: auto; padding:10px 10px 0;">
|
||||||
创建作品
|
创建作品
|
||||||
</li>
|
</li>
|
||||||
<li class="N_top" style="width: 835px;">
|
<li class="N_top" style="width: 835px;line-height: 1.9;">
|
||||||
<%= link_to(l(:label_project_new), {:controller => 'projects',
|
<%= link_to(l(:label_project_new), {:controller => 'projects',
|
||||||
:action => 'new',
|
:action => 'new',
|
||||||
:course => 0,
|
:course => 0,
|
||||||
|
|
|
@ -130,7 +130,7 @@ a:hover.ping_sub{ background:#14a8b9;}
|
||||||
.w350{ width:350px;}
|
.w350{ width:350px;}
|
||||||
.w620{ width:580px; height:160px; border:1px solid #CCC !important; padding-left: 3px !important;}
|
.w620{ width:580px; height:160px; border:1px solid #CCC !important; padding-left: 3px !important;}
|
||||||
.bo{height:26px; border:1px solid #CCC !important; padding: 0 !important;}
|
.bo{height:26px; border:1px solid #CCC !important; padding: 0 !important;}
|
||||||
a.tijiao{ height:28px !important; display:block !important; width:80px !important; color:#fff !important; background:#15bccf !important; text-align:center !important; padding-top:4px !important; float:left !important; margin-right:10px !important;}
|
a.tijiao{ height:28px !important; display:block !important; width:80px !important; color:#fff !important; background:#15bccf !important; text-align:center !important; padding-top:4px !important; float:left !important; margin-right:10px !important;line-height: 1.9;}
|
||||||
a:hover.tijiao{ background:#0f99a9 !important;}
|
a:hover.tijiao{ background:#0f99a9 !important;}
|
||||||
.members_left{ float:left; width:570px; margin-right:20px;}
|
.members_left{ float:left; width:570px; margin-right:20px;}
|
||||||
.members_left{}
|
.members_left{}
|
||||||
|
|
Loading…
Reference in New Issue