编辑普通作业功能完成
This commit is contained in:
parent
948a6c9138
commit
a94521f2e1
|
@ -3,6 +3,7 @@ class HomeworkCommonController < ApplicationController
|
|||
require 'json'
|
||||
require "base64"
|
||||
layout "base_courses"
|
||||
|
||||
include StudentWorkHelper
|
||||
before_filter :find_course, :only => [:index,:new,:create,:next_step]
|
||||
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# encoding: utf-8
|
||||
include UsersHelper
|
||||
module HomeworkCommonHelper
|
||||
#迟交扣分下拉框
|
||||
def late_penalty_option
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
<div class="mt5">
|
||||
<% if edit_mode %>
|
||||
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="submit_homework('edit_homework_common');">确定</a>
|
||||
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="submit_homework('edit_homework_common_<%= homework.id%>');">确定</a>
|
||||
<span class="fr mr10 mt3">或</span>
|
||||
<%= link_to "取消",user_homeworks_user_path(User.current.id),:class => "fr mr10 mt3"%>
|
||||
<% else %>
|
||||
|
|
|
@ -71,6 +71,7 @@ function submit_homework(id)
|
|||
$("#course_id").focus();
|
||||
}
|
||||
else{
|
||||
|
||||
homework_description_editor.sync();
|
||||
$("#"+id).submit();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue