diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 508d005a4..b6bba1f34 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -253,7 +253,10 @@ class ApplicationController < ActionController::Base
if Digest::MD5.hexdigest(content) == params[:chinaoocKey]
user = open_class_user
- start_user_session(user) if user
+ if user
+ start_user_session(user)
+ set_autologin_cookie(user)
+ end
User.current = user
end
end
diff --git a/app/controllers/commons_controller.rb b/app/controllers/commons_controller.rb
index 43ea31c97..bcb0fa45a 100644
--- a/app/controllers/commons_controller.rb
+++ b/app/controllers/commons_controller.rb
@@ -51,7 +51,7 @@ class CommonsController < ApplicationController
200
end
when 'journals_for_message'
- course = @object.jour&.course || @object.jour&.student_work&.homework_common&.course
+ course = @object&.jour_type.to_s == "StudentWorksScore" ? @object.jour&.student_work&.homework_common&.course : @object.jour&.course
if current_user.course_identity(course) >= Course::STUDENT && @object.user != current_user
403
else
diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb
index 0dc8829da..d2c9f88d2 100644
--- a/app/controllers/courses_controller.rb
+++ b/app/controllers/courses_controller.rb
@@ -128,8 +128,8 @@ class CoursesController < ApplicationController
# POST /courses
# POST /courses.json
def create
- ActiveRecord::Base.transaction do
- begin
+ begin
+ ActiveRecord::Base.transaction do
@course = Course.new(name: params[:name], class_period: params[:class_period], credit: params[:credit],
end_date: params[:end_date], is_public: params[:is_public], school_id: @school.id,
authentication: params[:authentication], professional_certification: params[:professional_certification])
@@ -174,11 +174,12 @@ class CoursesController < ApplicationController
course_module_types = params[:course_module_types]
@course.create_course_modules(course_module_types)
end
- rescue => e
- uid_logger_error(e.message)
- tip_exception(e.message)
- raise ActiveRecord::Rollback
end
+ CreateSubjectCourseStudentJob.perform_later(@course.id) if @course.subject && @course.subject.subject_appointments.count > 0
+ rescue => e
+ uid_logger_error(e.message)
+ tip_exception(e.message)
+ raise ActiveRecord::Rollback
end
end
diff --git a/app/jobs/create_subject_course_student_job.rb b/app/jobs/create_subject_course_student_job.rb
new file mode 100644
index 000000000..a7b8cb8af
--- /dev/null
+++ b/app/jobs/create_subject_course_student_job.rb
@@ -0,0 +1,22 @@
+class CreateSubjectCourseStudentJob < ApplicationJob
+ queue_as :default
+
+ def perform(course_id)
+ course = Course.find_by(id: course_id)
+ return if course.blank? || course.subject.blank?
+
+ attrs = %i[course_id user_id role created_at updated_at]
+ same_attrs = {course_id: course.id, role: 4}
+
+ Rails.logger.info("1:course.students.count:##{course.students.count}")
+ CourseMember.bulk_insert(*attrs) do |worker|
+ course.subject.subject_appointments.each do |app|
+ Rails.logger.info("##{course.students.where(user_id: app.user_id)}")
+ next if course.students.where(user_id: app.user_id).any?
+ worker.add same_attrs.merge(user_id: app.user_id)
+ end
+ end
+ Rails.logger.info("2:course.students.count:##{course.students.count}")
+ course.subject.subject_appointments.destroy_all
+ end
+end
diff --git a/app/views/searchs/index.json.jbuilder b/app/views/searchs/index.json.jbuilder
index 164e90b53..65c4d248c 100644
--- a/app/views/searchs/index.json.jbuilder
+++ b/app/views/searchs/index.json.jbuilder
@@ -10,9 +10,11 @@ json.results do
# 去除开头标点符号
reg = /^[,。?:;‘’!“”—……、]/
# 附件的替换
- atta_reg = /!\[\]\(\/api\/attachments\/\d+\)/
- highlights[:description]&.first&.sub!(reg, '').sub!(atta_reg, '')
- highlights[:content]&.first&.sub!(reg, '').sub!(atta_reg, '')
+ atta_reg = /!\[.*]\(\/api\/attachments\/\d+\)/
+ highlights[:description]&.first&.sub!(reg, '')
+ highlights[:description]&.map{|des| des.gsub!(atta_reg, '')}
+ highlights[:content]&.first&.sub!(reg, '')
+ highlights[:content]&.map{|des| des.gsub!(atta_reg, '')}
json.content highlights
end
diff --git a/app/views/shixun_lists/index.json.jbuilder b/app/views/shixun_lists/index.json.jbuilder
index c925d6876..79ce4b09c 100644
--- a/app/views/shixun_lists/index.json.jbuilder
+++ b/app/views/shixun_lists/index.json.jbuilder
@@ -8,9 +8,12 @@ json.shixun_list do
# 去除开头标点符号
reg = /^[,。?:;‘’!“”—……、]/
# 附件的替换
- atta_reg = /!\[\]\(\/api\/attachments\/\d+\)/
- highlights[:description]&.first&.sub!(reg, '')&.sub!(atta_reg, '')
- highlights[:content]&.first&.sub!(reg, '')&.sub!(atta_reg, '')
+ atta_reg = /!\[.*]\(\/api\/attachments\/\d+\)/
+
+ highlights[:description]&.first&.sub!(reg, '')
+ highlights[:description]&.map{|des| des.gsub!(atta_reg, '')}
+ highlights[:content]&.first&.sub!(reg, '')
+ highlights[:content]&.map{|des| des.gsub!(atta_reg, '')}
json.title highlights.delete(:name)&.join('...') || obj.searchable_title
json.description highlights[:description]&.join('...') || Util.extract_content(obj.description)[0..300]&.sub!(atta_reg, '')
diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js
index 60065f43e..6fdde6aeb 100644
--- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js
+++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js
@@ -22,7 +22,7 @@ import 'moment/locale/zh-cn';
import './yslexercisetable.css';
import {getImageUrl, toPath} from 'educoder';
import CheckBoxGroup from "../../page/component/CheckBoxGroup";
-
+import NoneData from '../../../modules/courses/coursesPublic/NoneData'
const Search = Input.Search;
const RadioGroup = Radio.Group;
const CheckboxGroup = Checkbox.Group;
@@ -1217,6 +1217,7 @@ class Studentshavecompletedthelist extends Component {
)
},
],
+ exercise_status:0,
}
// console.log("Studentshavecompletedthelist");
// console.log(props.current_status);
@@ -1277,6 +1278,20 @@ class Studentshavecompletedthelist extends Component {
}catch (e) {
}
+ try {
+ if(this.props.Commonheadofthetestpaper.exercise_status !== undefined){
+ this.setState({
+ exercise_status:this.props.Commonheadofthetestpaper.exercise_status,
+ })
+ }else{
+ this.setState({
+ exercise_status:0,
+ })
+ }
+ }catch (e) {
+
+ }
+
}
componentWillReceiveProps = (nextProps) => {
@@ -2065,11 +2080,11 @@ class Studentshavecompletedthelist extends Component {
this.setState({
loadingstate: false,
})
- console.log(response);
- console.log(1997);
+ // console.log(response);
+ // console.log(1997);
this.Generatenewdatasy(response.data.exercise_users, response);
}).catch((error) => {
- console.log(error)
+ // console.log(error)
this.setState({
loadingstate: false,
})
@@ -2472,7 +2487,7 @@ class Studentshavecompletedthelist extends Component {
render() {
const isAdmin = this.props.isAdmin();
- let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable, course_groupyslstwodatas, limit, course_groupysls, course_groupyslstwodata, course_groupyslstwo, teacherlists, Teacherliststudentlist, order, columnss, course_groupsdatas, course_groups, Evaluationarray, unlimited, unlimiteds, unlimitedtwo, teacherlist, searchtext, loadingstate, review, nocomment, commented, unsubmitted, submitted, columnsys, exercise_users,mylistansum} = this.state;
+ let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable,exercise_status, course_groupyslstwodatas, limit, course_groupysls, course_groupyslstwodata, course_groupyslstwo, teacherlists, Teacherliststudentlist, order, columnss, course_groupsdatas, course_groups, Evaluationarray, unlimited, unlimiteds, unlimitedtwo, teacherlist, searchtext, loadingstate, review, nocomment, commented, unsubmitted, submitted, columnsys, exercise_users,mylistansum} = this.state;
// console.log("Studentshavecompletedthelist");
// console.log(this.props.current_status);
return (
@@ -2483,202 +2498,211 @@ class Studentshavecompletedthelist extends Component {
" min-width": " 1200px",
}}>
{/*老师*/}
-
-
+ {
+ exercise_status===0 || exercise_status===1 ?
+
+
+
+ :
+
+
+
- {/*你的评阅:*/}
- {
- Teacherliststudentlist === undefined || Teacherliststudentlist.exercise_types.subjective === 0 ?
- -
- 作品状态:
-
- this.checkeboxstwo(e, course_groupyslstwodata && course_groupyslstwodata)}>
- {
- course_groupyslstwodata.map((item, key) => {
- return (
- {item.tu}({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unanswer_users : Teacherliststudentlist.exercise_types.answer_users})
- )
- })
- }
-
-
- this.onSearchKeywordKeyUp(e)}
- onInput={this.inputSearchValues}
- onSearch={this.searchValues}
- >
-
-
- :
-
-
-
- 你的评阅:
-
-
- this.checkeboxs(e, course_groupyslstwodata && course_groupyslstwodata)}>
- {
- course_groupyslstwodatas.map((item, key) => {
- return (
- {item.tu}({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unreview_counts : Teacherliststudentlist.exercise_types.review_counts})
- )
- })
- }
-
-
- this.onSearchKeywordKeyUp(e)}
- onInput={this.inputSearchValues}
- onSearch={this.searchValues}
- >
-
-
- {/*作品状态*/}
-
-
- 作品状态:
-
- this.checkeboxstwo(e, course_groupyslstwodata && course_groupyslstwodata)}>
- {
- course_groupyslstwodata.map((item, key) => {
- return (
- {item.tu}({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unanswer_users : Teacherliststudentlist.exercise_types.answer_users})
- )
- })
- }
-
-
-
+ {/*你的评阅:*/}
+ {
+ Teacherliststudentlist === undefined || Teacherliststudentlist.exercise_types.subjective === 0 ?
+ -
+ 作品状态:
+
+ this.checkeboxstwo(e, course_groupyslstwodata && course_groupyslstwodata)}>
+ {
+ course_groupyslstwodata.map((item, key) => {
+ return (
+ {item.tu}({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unanswer_users : Teacherliststudentlist.exercise_types.answer_users})
+ )
+ })
+ }
+
+
+ this.onSearchKeywordKeyUp(e)}
+ onInput={this.inputSearchValues}
+ onSearch={this.searchValues}
+ >
+
+
+ :
+
+
-
+ 你的评阅:
+
+
+ this.checkeboxs(e, course_groupyslstwodata && course_groupyslstwodata)}>
+ {
+ course_groupyslstwodatas.map((item, key) => {
+ return (
+ {item.tu}({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unreview_counts : Teacherliststudentlist.exercise_types.review_counts})
+ )
+ })
+ }
+
+
+ this.onSearchKeywordKeyUp(e)}
+ onInput={this.inputSearchValues}
+ onSearch={this.searchValues}
+ >
+
+
+ {/*作品状态*/}
+
-
+ 作品状态:
+
+ this.checkeboxstwo(e, course_groupyslstwodata && course_groupyslstwodata)}>
+ {
+ course_groupyslstwodata.map((item, key) => {
+ return (
+ {item.tu}({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unanswer_users : Teacherliststudentlist.exercise_types.answer_users})
+ )
+ })
+ }
+
+
+
- }
- {/*分班情况*/}
- {course_groups === undefined ? "" : course_groups === null ? "" : course_groups.length < 2 ? "" : JSON.stringify(course_groups) === "[]" ? "" :
- -
-
- 分班情况: |
-
- |
-
- this.funtaskstatustwo(e, course_groups && course_groups)}
- style={{paddingTop: '4px', display: "inline"}}>
- {
- course_groups.map((item, key) => {
- return (
- {item.exercise_group_name}({item.exercise_group_students})
- )
- })
- }
-
+ }
+ {/*分班情况*/}
+ {course_groups === undefined ? "" : course_groups === null ? "" : course_groups.length < 2 ? "" : JSON.stringify(course_groups) === "[]" ? "" :
+ -
+
+ 分班情况: |
+
+ |
+
+ this.funtaskstatustwo(e, course_groups && course_groups)}
+ style={{paddingTop: '4px', display: "inline"}}>
+ {
+ course_groups.map((item, key) => {
+ return (
+ {item.exercise_group_name}({item.exercise_group_students})
+ )
+ })
+ }
+
- |
-
+ |
+
-
- }
+
+ }
-
+
-
-
+
+
{Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.total_users}个检索结果({Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.exercise_all_users}学生)
-
+
-
-
+
+
- {JSON.stringify(data) !== "[]" ?
-
-
-
- {data === undefined ? "" :
}
-
-
+
+ {data === undefined ? "" :
}
+
+
- :
-
-
-
-
}/)
-
暂时还没有相关数据哦!
-
-
+ :
+
+
+
+
}/)
+
暂时还没有相关数据哦!
+
+
-
- }
+
+ }
-
- {
- Teacherliststudentlist && Teacherliststudentlist.exercise_types.total_users && Teacherliststudentlist.exercise_types.total_users > limit ?
-
+ {
+ Teacherliststudentlist && Teacherliststudentlist.exercise_types.total_users && Teacherliststudentlist.exercise_types.total_users > limit ?
+
+ : ""
+ }
- : ""
}
@@ -2691,16 +2715,22 @@ class Studentshavecompletedthelist extends Component {
-
+ {
+ exercise_status === 0 || exercise_status === 1 ?
+
+
+
+ :
+
-
+
-
+
{Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.answer_users}}
-
+
-
+
- {JSON.stringify(datas) === "[]" ?
-
-
-
-
}/)
-
暂时还没有相关数据哦!
-
-
+ {JSON.stringify(datas) === "[]" ?
+
+
+
+
}/)
+
暂时还没有相关数据哦!
+
+
-
- :
-
-
-
- {datas === undefined ? "" :
}
-
-
- }
-
+
+ {datas === undefined ? "" :
}
+
+
+ }
-
+
+ }
@@ -2766,10 +2796,17 @@ class Studentshavecompletedthelist extends Component {
"padding-bottom": "100px",
" min-width": " 1200px"
}}>
-
-
-
- {data === undefined ? "" :
}
-
- {JSON.stringify(datas) === "[]" ?
-
-
-
-
-
}/)
-
暂时还没有相关数据哦!
+ }
+
+
+ {data === undefined ? "" :
}
-
+ {JSON.stringify(datas) === "[]" ?
-
- :
-
- < div id="graduation_work_list" style={{
- padding: '0px 30px 10px 30px',
- "margin-top": "20px",
- "margin-bottom": "10px"
- }}>
+
+
+
+
}/)
+
暂时还没有相关数据哦!
+
+
-
+
+ :
+
+ < div id="graduation_work_list" style={{
+ padding: '0px 30px 10px 30px',
+ "margin-top": "20px",
+ "margin-bottom": "10px"
+ }}>
+
+
{Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.answer_users} {Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.exercise_end_time}}
-
-
-
-
-
-
-
- {datas === undefined ? "" :
}
-
+
+ {datas === undefined ? "" :
}
+
-
+
- }
-
+ }
+
- {
- mylistansum && mylistansum > limit ?
-
-
+ {
+ mylistansum && mylistansum > limit ?
+
+ : ""
+ }
- : ""
}
diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js
index 5775bd240..ba3cee3d3 100644
--- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js
+++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js
@@ -436,7 +436,7 @@ class Testpapersettinghomepage extends Component{
/>
{
// 教师列表
- parseInt(tab[0])==0 && this.setcourse_groupysls(value)} current_status = {this.state.current_status}>
+ parseInt(tab[0])==0 && this.setcourse_groupysls(value)} current_status = {this.state.current_status} Commonheadofthetestpaper={this.state.Commonheadofthetestpaper}>
}
{/*统计结果*/}
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
index ac2133aab..a5423b6e9 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
@@ -33,6 +33,8 @@ import Startshixuntask from "../coursesPublic/Startshixuntask";
import ModulationModal from "../coursesPublic/ModulationModal";
import HomeworkModal from "../coursesPublic/HomeworkModal";
import ShixunWorkModal from "./Shixunworkdetails/ShixunWorkModal";
+import NoneData from '../../../modules/courses/coursesPublic/NoneData'
+
const Search = Input.Search;
const RadioGroup = Radio.Group;
const CheckboxGroup = Checkbox.Group;
@@ -1451,6 +1453,7 @@ class Listofworksstudentone extends Component {
],
yslpros:false,
datajs:[],
+ homework_status:[],
}
}
@@ -1569,7 +1572,8 @@ class Listofworksstudentone extends Component {
allow_late:result.data.allow_late,
loadingstate: false,
computeTimetype:true,
- })
+ homework_status:result.data.homework_status,
+ });
this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1);
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
@@ -1626,7 +1630,8 @@ class Listofworksstudentone extends Component {
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
view_report:result.data.view_report,
- })
+ homework_status:result.data.homework_status,
+ });
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata(result.data);
} else {
@@ -2129,7 +2134,8 @@ class Listofworksstudentone extends Component {
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
view_report:result.data.view_report,
- })
+ homework_status:result.data.homework_status,
+ });
this.seacthdata(result.data);
this.props.Getdataback(result,result.data);
}
@@ -2242,7 +2248,8 @@ class Listofworksstudentone extends Component {
end_immediately: result.data.end_immediately,
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
- })
+ homework_status:result.data.homework_status,
+ });
this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
this.props.Getdataback(result,result.data);
// }
@@ -3037,7 +3044,7 @@ class Listofworksstudentone extends Component {
})
}
render() {
- let {columns,course_groupysls,datajs,isAdmin, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible,visibles, game_list,columnsstu,columnsstu2, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state;
+ let {columns,course_groupysls,datajs,isAdmin,homework_status, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible,visibles, game_list,columnsstu,columnsstu2, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state;
const antIcon = ;
// console.log(this.state.student_works);
@@ -3068,89 +3075,100 @@ class Listofworksstudentone extends Component {
}
return (
+
this.props.isAdmin() === true ?
- (
-
- {visible === true ?
this.saveModulationModal(value, num)}
- /> : ""}
-
- {this.state.showmodel === true ? this.hideshowmodel()}
- updatas={() => this.isupdatas()}
- /> : ""}
-
-
- {visibles === true ?
-
-
- this.cancelModulationModels()}
- />
-
-
- : ""
- }
-
- {/*立即发布*/}
- this.getcourse_groupslist(id)}
- starttimes={this.state.starttimes}
- typs={this.state.typs}
- />
-
-
-
-
-
-
-
+ this.cancelModulationModels()}
+ />
+
+
+ : ""
+ }
+
+ {/*立即发布*/}
+
this.getcourse_groupslist(id)}
+ starttimes={this.state.starttimes}
+ typs={this.state.typs}
+ />
+ {
+ homework_status.length===0?
+
+
+
+ :
+ homework_status.length>0 && homework_status[0]==="未发布"?
+
+
+
+ :
+
+
+
+
+
+
+
- {computeTimetype===false?
-
-
+
+ {computeTimetype===false?
+
+
正在执行成绩计算,完成后将为您自动刷新结果。温馨提示:执行时间因作品数量而异
- :""}
+ :""}
- {/*作品状态GraduationTaskssettinglist*/}
-
- -
- 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}
+ {/*作品状态GraduationTaskssettinglist*/}
+
+ -
+ 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}
-
- {course_is_end===true?"":
+
+ {course_is_end===true?"":
{teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true?
(this.props.isNotMember()===false?
查看最新成绩
@@ -3223,7 +3241,7 @@ class Listofworksstudentone extends Component {
:"")
}
}
-
+
-
-
-
- -
-
- 作品状态:
-
- this.funtaskstatust(e, task_status && task_status)}
- style={{paddingTop: '4px'}}>
-
- {task_status === undefined ? "" : task_status.map((item, key) => {
- return (
-
+
+
+
+ -
+
+ 作品状态:
+
+ this.funtaskstatust(e, task_status && task_status)}
+ style={{paddingTop: '4px'}}>
+
+ {task_status === undefined ? "" : task_status.map((item, key) => {
+ return (
+
{item.name}
@@ -3257,96 +3275,96 @@ class Listofworksstudentone extends Component {
- )
- })}
-
- {/*请输入姓名或学号搜索*/}
-
-
-
-
-
- {/*分班情况*/}
-
- -
- {JSON.stringify(course_group_info) === "[]" ? "" : course_group_info === undefined ? "" : course_group_info.length < 2 ? "" :
-
-
分班情况:
-
-
this.funtaskstatustwot(e, course_group_info && course_group_info)}
- style={{paddingTop: '4px',width:'1017px'}}>
- {course_group_info === undefined ? "" :
- course_group_info.map((item, key) => {
- return (
-
+ )
+ })}
+
+ {/*请输入姓名或学号搜索*/}
+
+
+
+
+
+ {/*分班情况*/}
+
+
-
+ {JSON.stringify(course_group_info) === "[]" ? "" : course_group_info === undefined ? "" : course_group_info.length < 2 ? "" :
+
+ 分班情况:
+
+ this.funtaskstatustwot(e, course_group_info && course_group_info)}
+ style={{paddingTop: '4px',width:'1017px'}}>
+ {course_group_info === undefined ? "" :
+ course_group_info.map((item, key) => {
+ return (
+
{item.group_group_name}
({item.count})
- )
- })
- }
-
-
}
-
+ )
+ })
+ }
+
+
}
+
-
+
-
+
-
+
{teacherdata === undefined ? "" : teacherdata.all_member_count}个检索结果({teacherdata === undefined ? "" : teacherdata.all_member_count}学生)
-
-
-
-
-
-
-
- {
- JSON.stringify(datajs) === "[]" ?
-
-
-
-
-
}/)
-
暂时还没有相关数据哦!
-
-
-
-
- :
-
-
+
+
+ {
+ JSON.stringify(datajs) === "[]" ?
+
+
+
+
+
}/)
+
暂时还没有相关数据哦!
+
+
+
+
+ :
+
+
+
-
- {datajs === undefined ? "" :
}
-
-
- }
-
-
-
- {
- teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
-
- : ""
- }
-
-
-
- )
+
+ {datajs === undefined ? "" :
}
+
+
+ }
+
+
+
+ {
+ teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
+
+ : ""
+ }
+
+ }
+
:
- (
-
- {
- teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
- // 学生不能查看别人的
-
-
- {visibles === true ?
-
-
-
+ {visibles === true ?
+
+
+
- this.cancelModulationModels()}
- />
-
- : ""
- }
+ }
+
+
this.cancelModulationModels()}
+ />
+
+ : ""
+ }
+
+ {
+ homework_status.length===0?
+
+
+
+ :
+ homework_status.length>0 && homework_status[0]==="未发布"?
+
+
+
+ :
-
-
-
- {computeTimetype===false?
-
-
+
+ {computeTimetype===false?
+
+
正在执行成绩计算,完成后将为您自动刷新结果。温馨提示:执行时间因作品数量而异
- :""}
+ :""}
- {JSON.stringify(data) !== "[]" ?
-
-
+ {JSON.stringify(data) !== "[]" ?
+
+
-
+
-
+
-
计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}
- { course_is_end===true?"":teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":
+ 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}
+ { course_is_end===true?"":teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":
{computeTimetype===true?
(this.props.isNotMember()===false?
@@ -3539,14 +3569,14 @@ class Listofworksstudentone extends Component {
}
}
-
+
-
+
-
-
-
-
- {data === undefined ? "" :
}
-
-
-
+
+ {data === undefined ? "" :
}
+
+
+
- :
-
-
-
-
}/)
-
暂时还没有相关数据哦!
-
-
+ :
+
+
+
+
}/)
+
暂时还没有相关数据哦!
+
+
-
- }
+
+ }
-
+
-
+
+ }
+
+ :
+ // 学生能查看别人的
+
+ {/*双层*/}
+
+
+ {visibles === true ?
+ this.cancelModulationModels()}
+ /> : ""
+ }
-
- :
- // 学生能查看别人的
-
- {/*双层*/}
-
-
- {visibles === true ?
-
this.cancelModulationModels()}
- /> : ""
- }
-
+ {
+ homework_status.length===0?
+
+
+
+ :
+ homework_status.length>0 && homework_status[0]==="未发布"?
+
+
+
+ :
+
-
-
+
- {computeTimetype===false?
-
-
+ {computeTimetype===false?
+
+
正在执行成绩计算,完成后将为您自动刷新结果。温馨提示:执行时间因作品数量而异
- :""}
+ :""}
-
-
- {data === undefined ? "" :
}
-
- {JSON.stringify(datas) !== "[]" ?
-
-
-
+ }
+
+
+ {data === undefined ? "" :
}
+
+ {JSON.stringify(datas) !== "[]" ?
+
+
+
{teacherdata === undefined ? "0" : teacherdata.commit_count === undefined ? "0" : teacherdata.commit_count}
@@ -3692,8 +3734,8 @@ class Listofworksstudentone extends Component {
style={{color: '#FF6800'}}>{teacherdata.left_time.time}}
-
-
+
+
-
计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}
- { course_is_end===true?"":teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":
+ 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}
+ { course_is_end===true?"":teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":
{computeTimetype===true?
(this.props.isNotMember()===false?
查看最新成绩
@@ -3750,12 +3792,12 @@ class Listofworksstudentone extends Component {
:"")
}
}
-
-
-
-
-
-
- {datas === undefined ? "" :
}
+
+ {datas === undefined ? "" :
}
+
+
+ {
+ teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
+
+ : ""
+ }
+
+ :
+
+
+
+
}/)
+
暂时还没有相关数据哦!
+
+
+
+ }
- {
- teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
-
- : ""
}
- :
-
-
-
-
}/)
-
暂时还没有相关数据哦!
-
-
-
- }
-
-
-
+
}
- )
+
)
}
diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
index bee373bd9..e9c100648 100644
--- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
+++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
@@ -86,7 +86,7 @@ class Trainingjobsetting extends Component {
latepenaltytype: false,
unifiedsetting: true,
allowreplenishment: undefined,
- completionefficiencyscore: true,
+ completionefficiencyscore: false,
whethertopay: false,
proportion: undefined,
level: undefined,
@@ -120,6 +120,7 @@ class Trainingjobsetting extends Component {
showmodel:false,
code_review:false,
testscripttiptype:false,
+
end_timebool:false,
late_timesbool:false,
}
@@ -1701,6 +1702,8 @@ class Trainingjobsetting extends Component {
flagPageEditstwo:releasetime,
flagPageEditsthrees:deadline,
flagPageEditsfor:endtime,
+ completionefficiencyscore:true,
+ latedeductiontwo:20,
unifiedsetting:this.state.unifiedsetting,
})
if(this.state.proportion === "自定义分值"){
@@ -1733,6 +1736,8 @@ class Trainingjobsetting extends Component {
hand__e_tip: "",
hand_flags: false,
handclass: undefined,
+ completionefficiencyscore:false,
+ latedeductiontwo:0,
unit_e_tip: "",
})
this.refs.targetElementTrainingjobsetting.scrollIntoView();
@@ -2139,7 +2144,7 @@ class Trainingjobsetting extends Component {
分值
-
diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js
index 55dfac7fc..eb59ce6f1 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js
@@ -1064,8 +1064,7 @@ class ShixunHomework extends Component{
- {/*{datas&&datas.category_name===undefined||datas&&datas.category_name===null?datas&&datas.main_category_name:datas&&datas.category_name+" 作业列表"}*/}
- 实训作业
+ {datas&&datas.category_name===undefined||datas&&datas.category_name===null?datas&&datas.main_category_name:datas&&datas.category_name+" 作业列表"}
{datas===undefined?"":datas.homeworks && datas.homeworks.length>1?this.props.isAdminOrCreator()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null?
diff --git a/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js b/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js
index 312bfeecf..ead6e4c29 100644
--- a/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js
+++ b/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js
@@ -39,20 +39,20 @@ class EcStudentList extends Component {
let major_id=this.props.match.params.major_id;
let year_id=this.props.match.params.year_id;
- const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data';
- axios.get(url, {
- withCredentials: true,
- }).then((response) => {
- if(response.status===200){
- this.setState({
- majorschoollist:response.data,
- ismanager:response.data.ismanager,
- })
- }
- })
- .catch(function (error) {
- console.log(error);
- });
+ // const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data';
+ // axios.get(url, {
+ // withCredentials: true,
+ // }).then((response) => {
+ // if(response.status===200){
+ // this.setState({
+ // majorschoollist:response.data,
+ // ismanager:response.data.ismanager,
+ // })
+ // }
+ // })
+ // .catch(function (error) {
+ // console.log(error);
+ // });
// let majorschoollist={
// ec_students: [{index: 1, student_name: "同意", student_id: "s20111458"},
// {index: 1, student_name: "同意", student_id: "s20111458"},
diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js
index fccfbb0b2..1b1accd2b 100644
--- a/public/react/src/modules/message/js/MessagSub.js
+++ b/public/react/src/modules/message/js/MessagSub.js
@@ -479,6 +479,8 @@ class MessagSub extends Component{
return '';
case "PublicCourseStart":
return window.open(`/courses/${item.container_id}/informs`);
+ case "SubjectStartCourse":
+ return window.open(`/paths/${item.container_id}`);
default :
return window.open("/")
}
diff --git a/spec/jobs/create_subject_course_student_job_spec.rb b/spec/jobs/create_subject_course_student_job_spec.rb
new file mode 100644
index 000000000..1b506fe68
--- /dev/null
+++ b/spec/jobs/create_subject_course_student_job_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe CreateSubjectCourseStudentJob, type: :job do
+ pending "add some examples to (or delete) #{__FILE__}"
+end