Merge branch 'daiao_dev' of https://git.trustie.net/jacknudt/trustieforge into daiao_dev
This commit is contained in:
commit
fff13f426a
|
@ -511,7 +511,7 @@ class ExerciseController < ApplicationController
|
|||
def commit_exercise
|
||||
# 老师不需要提交
|
||||
if User.current.allowed_to?(:as_teacher,@course)
|
||||
if @exercise.publish_time.nil?
|
||||
if @exercise.publish_time.nil? || @exercise.publish_time <= Time.now
|
||||
@exercise.update_attributes(:show_result => params[:show_result])
|
||||
@exercise.update_attributes(:exercise_status => 2)
|
||||
@exercise.update_attributes(:publish_time => Time.now)
|
||||
|
|
|
@ -145,11 +145,11 @@
|
|||
alert("测验标题不能为空");
|
||||
} else if($.trim($("#exercise_end_time").val()) =="") {
|
||||
alert("截止时间不能为空");
|
||||
} else if((Date.parse($("#exercise_end_time").val())+(24*60*60-1)*1000) < Date.now()) {
|
||||
} else if((Date.parse($("#exercise_end_time").val())+(24*60*60-1)*1000) <= Date.now()) {
|
||||
alert("截止时间不能小于当前时间");
|
||||
} else if($.trim($("#exercise_time").val()) !="" && !/^[1-9][0-9]*$/.test($.trim($("#exercise_time").val()))) {
|
||||
alert("测验时长必须为非零开头的数字");
|
||||
} else if($.trim($("#exercise_publish_time").val()) !="" && Date.parse($("#exercise_publish_time").val()) > Date.now()) {
|
||||
} else if($.trim($("#exercise_publish_time").val()) !="" && ((Date.parse($("#exercise_publish_time").val())+(24*60*60-1)*1000) < Date.now())) {
|
||||
alert("发布时间不能小于当前时间");
|
||||
} else if($.trim($("#exercise_publish_time").val()) !="" && Date.parse($("#exercise_end_time").val()) < Date.parse($("#exercise_publish_time").val())) {
|
||||
alert("截止时间不能小于发布时间");
|
||||
|
|
|
@ -1139,7 +1139,7 @@ zh:
|
|||
text_account_destroy_confirmation: |-
|
||||
确定继续处理?
|
||||
您的账号一旦删除,将无法再次激活使用。
|
||||
error_session_expired: 您的会话已过期。请重新登陆。
|
||||
error_session_expired: 您的会话已过期。请重新登录。
|
||||
text_session_expiration_settings: "警告: 更改这些设置将会使包括你在内的当前会话失效。"
|
||||
setting_session_lifetime: 会话最大有效时间
|
||||
setting_session_timeout: 会话闲置超时
|
||||
|
|
Loading…
Reference in New Issue