parent
d3837ba03c
commit
44e3daa0d2
|
@ -6,12 +6,114 @@
|
|||
<%= l(:label_course_homework_new)%>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="hwork_new">
|
||||
<%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
|
||||
<%= hidden_field_tag "course",@course.id%>
|
||||
<%= render :partial => 'homework_common/homework_common_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
|
||||
<a href="javascript:void(0)" class="blue_btn fl mr10" onClick="submit_homework('new_homework_common');" >提交</a>
|
||||
<%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
|
||||
<% end%>
|
||||
<div class="hwork_new" id="hwork_new">
|
||||
<h3 class="c_blue f16 mb10">请选择将要发布的作业类型
|
||||
</h3>
|
||||
<input type="radio" class="mb10 fl" name="homework_common_type" id="homework_detail_manual_radio" checked/><span class="ml5 fl">人工评分的作业(支持匿名互评、灵活设置评分比例)</span>
|
||||
<div class="cl"></div>
|
||||
<input type="radio" class="mb20 fl" name="homework_common_type" id="homework_detail_programing_radio"/><span class="ml5 fl">自动评测的编程作业(支持C++程序的自动评分)</span>
|
||||
<div class="cl"></div>
|
||||
<a href="javascript:void(0);" class=" orange_btn" onclick="select_homework_common_type()">下一步</a>
|
||||
</div><!--hwork_new end-->
|
||||
<div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div id="homework_detail_manual" class="undis">
|
||||
<div class="hwork_new">
|
||||
<%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
|
||||
<%= hidden_field_tag "course",@course.id%>
|
||||
<%= render :partial => 'homework_common/homework_common_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
|
||||
<a href="javascript:void(0)" class="blue_btn fl mr10" onClick="submit_homework('new_homework_common');" >提交</a>
|
||||
<a href="javascript:void(0);" class="orange_btn_homework fl mr10" onclick="return_homework_common_type()">上一步</a>
|
||||
<%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
|
||||
<% end%>
|
||||
</div><!--hwork_new end-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div id="homework_detail_programing" class="undis">
|
||||
<div class="hwork_new">
|
||||
<ul class="hwork_new_basic">
|
||||
<li >
|
||||
<label class="label02"><span class="c_red">*</span> 名称: </label>
|
||||
<input type="text" name="" class="w548 h26 mb10 fl" >
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li >
|
||||
<label class="label02 "> 作业描述及 <br />评分依据: </label>
|
||||
<textarea name="" placeholder="请在此填入作业的要求及评分依据" class=" w548 h150 mb10 fl" ></textarea>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li >
|
||||
<label class="label02"> 附件: </label>
|
||||
<input type="submit" name="" value="文件浏览" class="sub_btn"> <span class=" c_grey ">-文件不超过200MB</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="fl">
|
||||
<label class="label02"><span class="c_red">*</span> 截止日期: </label>
|
||||
<input type="text" name="" class="hwork_input02 fl" value="2015-04-03 12:00" >
|
||||
<a href="javascript:void(0);" class="pic_date mt5 ml5"></a>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="fl ml100">
|
||||
<label class="label02"> 发布日期: </label>
|
||||
<input type="text" name="" class="hwork_input02 fl" value="2015-04-03 12:00" >
|
||||
<a href="javascript:void(0);" class="pic_date mt5 ml5"></a>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<label class="label02">迟交扣分: </label>
|
||||
<select class="fl mb10 h26 w70" name="s2" >
|
||||
<option >1</option>
|
||||
<option selected="selected">2</option>
|
||||
<option >3</option>
|
||||
<option >4</option>
|
||||
<option >5</option>
|
||||
</select>
|
||||
<span class="fl mt5"> 分</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul><!--hwork_new_basic end--->
|
||||
<div class="hwork_new_set">
|
||||
<p class="fl ml20 f14 mb10 c_orange">编程评测设置</p>
|
||||
<div class="cl"></div>
|
||||
<ul>
|
||||
<li >
|
||||
<label class="label02"> 开发语言: </label>
|
||||
<select class="fl mb10 h26 w150" >
|
||||
<option>C++</option>
|
||||
</select>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02"> 标准代码: </label>
|
||||
<textarea name="" class=" w459 h150 mb10 fl" ></textarea>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02"> 测试输入: </label>
|
||||
<input type="text" class="fl h26 w196 mb10" />
|
||||
</li>
|
||||
<li >
|
||||
<label class=" fl f14 ml10"> 输出: </label>
|
||||
<input type="text" class="fl h26 w196 mb10" />
|
||||
</li>
|
||||
<li><a class="icon_add ml10 " href="javascript:void(0);" title="添加测试"></a> <span class="green_btn fl ml5">OK !</span></li>
|
||||
<div class="cl"></div>
|
||||
<li >
|
||||
<label class="label02"> 测试输入: </label>
|
||||
<input type="text" class="fl h26 w196 mb10" />
|
||||
</li>
|
||||
<li >
|
||||
<label class="fl f14 ml10"> 输出: </label>
|
||||
<input type="text" class="fl h26 w196 mb10" />
|
||||
</li>
|
||||
<li><a class="icon_add ml10 " href="javascript:void(0);" title="添加测试"></a> <a href="javascript:void(0);" class="green_btn fl ml5 ">测试</a></li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
</div><!--hwork_new_set end-->
|
||||
<a href="courses_hworklist.html" class="blue_btn fl mr10 " >提交</a>
|
||||
<a href="javascript:void(0);" class="orange_btn_homework fl mr10" onclick="return_homework_common_type()">上一步</a>
|
||||
<a href="#" target="_blank" class="grey_btn fl ">取消</a>
|
||||
</div><!--hwork_new end-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
|
@ -394,6 +394,27 @@ function show_bid_dead_line(year,month,day,divname)
|
|||
+ "</form>"
|
||||
+ "<p class='fr'>作品提交还剩:</p>");
|
||||
}
|
||||
|
||||
//新建作业,下一步按钮
|
||||
function select_homework_common_type()
|
||||
{
|
||||
if($("#homework_detail_manual_radio").attr("checked") == "checked"){
|
||||
$("#homework_detail_manual").show();
|
||||
}
|
||||
else if($("#homework_detail_programing_radio").attr("checked") == "checked"){
|
||||
$("#homework_detail_programing").show();
|
||||
}
|
||||
$("#hwork_new").hide();
|
||||
}
|
||||
|
||||
//新建作业,上一步按钮
|
||||
function return_homework_common_type()
|
||||
{
|
||||
$("#homework_detail_manual").hide();
|
||||
$("#homework_detail_programing").hide();
|
||||
$("#hwork_new").show();
|
||||
}
|
||||
|
||||
//验证新建作业的名字
|
||||
function regex_homework_name()
|
||||
{
|
||||
|
|
|
@ -161,6 +161,7 @@ a.green_btn{background:#28be6c;color:#fff;font-size:14px; font-weight:normal; pa
|
|||
a:hover.green_btn{ background:#14ad5a;}
|
||||
.blue_btn{ background:#64bdd9; color:#fff; font-size:14px; font-weight:normal;padding:2px 10px; text-align:center;}
|
||||
a.blue_btn{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;}
|
||||
a.orange_btn_homework{background:#d63502;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;}
|
||||
a:hover.blue_btn{ background:#329cbd;cursor: pointer;}
|
||||
a.orange_btn{ background:#ff5722;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center; }
|
||||
a:hover.orange_btn{ background:#d63502;}
|
||||
|
|
Loading…
Reference in New Issue