courseware
杨树林 5 years ago
commit 6b25d9696e

@ -4,7 +4,7 @@ class StudentJoinAttendanceRecordJob < ApplicationJob
def perform(member_id) def perform(member_id)
member = CourseMember.find_by(id: member_id) member = CourseMember.find_by(id: member_id)
course = member&.course course = member&.course
return if member.blank? || course.blank? return if member.blank? || member.role != "STUDENT" || course.blank?
current_date = Date.current current_date = Date.current
current_end_time = Time.current.strftime("%H:%M:%S") current_end_time = Time.current.strftime("%H:%M:%S")

@ -165,7 +165,9 @@ class CourseMember < ApplicationRecord
private private
def create_attendance_record def create_attendance_record
if role == "STUDENT"
StudentJoinAttendanceRecordJob.perform_later(id) StudentJoinAttendanceRecordJob.perform_later(id)
end end
end
end end

@ -132,7 +132,7 @@ export function initAxiosInterceptors(props) {
// proxy = "https://testeduplus2.educoder.net" // proxy = "https://testeduplus2.educoder.net"
//proxy="http://47.96.87.25:48080" //proxy="http://47.96.87.25:48080"
proxy="https://pre-newweb.educoder.net" proxy="https://pre-newweb.educoder.net"
proxy="https://test-newweb.educoder.net" //proxy="https://test-newweb.educoder.net"
// proxy="https://test-jupyterweb.educoder.net" // proxy="https://test-jupyterweb.educoder.net"
// proxy="https://test-newweb.educoder.net" // proxy="https://test-newweb.educoder.net"
// proxy="https://test-jupyterweb.educoder.net" // proxy="https://test-jupyterweb.educoder.net"

@ -970,6 +970,13 @@ class CoursesIndex extends Component{
} }
></Route> ></Route>
{/* 主签到 */}
<Route path="/classrooms/:coursesId/attendances"
render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
}
></Route>
{/*/!*实训作业and课堂详情页*!/*/} {/*/!*实训作业and课堂详情页*!/*/}
<Route path="/classrooms/:coursesId" <Route path="/classrooms/:coursesId"
render={ render={

@ -89,7 +89,6 @@ class CoursesBanner extends Component {
} }
HideAddcoursestypess=(i)=>{ HideAddcoursestypess=(i)=>{
console.log("调用了");
this.setState({ this.setState({
Addcoursestypes:false, Addcoursestypes:false,
mydisplay:true, mydisplay:true,

@ -933,7 +933,7 @@ class CoursesNew extends Component {
> >
{getFieldDecorator("checkboxgroup", { {getFieldDecorator("checkboxgroup", {
initialValue: [ initialValue: [
"shixun_homework", "common_homework", "group_homework", "exercise", "attachment", "course_group","video" "shixun_homework", "common_homework", "group_homework", "exercise", "attachment", "course_group","video","attendance"
], ],
})( })(
<Checkbox.Group style={{ marginTop: "10px"}}> <Checkbox.Group style={{ marginTop: "10px"}}>
@ -949,6 +949,7 @@ class CoursesNew extends Component {
<Checkbox value={"board"} className="fl">讨论</Checkbox> <Checkbox value={"board"} className="fl">讨论</Checkbox>
<Checkbox value={"course_group"} className="fl">分班</Checkbox> <Checkbox value={"course_group"} className="fl">分班</Checkbox>
<Checkbox value={"statistics"} className="fl">统计</Checkbox> <Checkbox value={"statistics"} className="fl">统计</Checkbox>
<Checkbox value={"attendance"} className="fl">签到</Checkbox>
</Checkbox.Group> </Checkbox.Group>
)} )}
</Form.Item> </Form.Item>

@ -989,7 +989,7 @@ class Goldsubject extends Component {
{getFieldDecorator("checkboxgroup", { {getFieldDecorator("checkboxgroup", {
initialValue: [ initialValue: [
"announcement","online_learning","shixun_homework","common_homework", "announcement","online_learning","shixun_homework","common_homework","attendance"
], ],
})( })(
<Checkbox.Group style={{ marginTop: "10px"}}> <Checkbox.Group style={{ marginTop: "10px"}}>
@ -1003,6 +1003,7 @@ class Goldsubject extends Component {
<Checkbox value={"board"} className="fl">讨论</Checkbox> <Checkbox value={"board"} className="fl">讨论</Checkbox>
<Checkbox value={"course_group"} className="fl">分班</Checkbox> <Checkbox value={"course_group"} className="fl">分班</Checkbox>
<Checkbox value={"statistics"} className="fl">统计</Checkbox> <Checkbox value={"statistics"} className="fl">统计</Checkbox>
<Checkbox value={"attendance"} className="fl">签到</Checkbox>
</Checkbox.Group> </Checkbox.Group>
)} )}
</Form.Item> </Form.Item>

@ -77,7 +77,7 @@ class Detailss extends Component {
<Progress percent={jdt} showInfo={false} strokeColor="#1890ff"/> <Progress percent={jdt} showInfo={false} strokeColor="#1890ff"/>
</div> </div>
<div className="progressivpss h28s"> <div className="progressivpss h28s">
已签到{item && item.normal_count ? item.normal_count : 0} / 已签到 {item && item.normal_count ? item.normal_count : 0} /
应签到 {item && item.all_count ? item.all_count : 0} 应签到 {item && item.all_count ? item.all_count : 0}
</div> </div>
</div> </div>

@ -34,9 +34,9 @@ class Teacherentry extends Component {
} }
return ( return (
<React.Fragment> <React.Fragment>
<div className={index===0?"ws100s edu-back-white ": "ws100s edu-back-white mt20"}> <div className={index===0?"ws100s edu-back-white xiaoshou": "ws100s edu-back-white mt20 xiaoshou"}>
<div className="ws100s teacherentrydiv "> <div className="ws100s teacherentrydiv" onClick={isAdmin?(e)=>{e.stopPropagation();this.props.qiandaoxiangq(true,item.id)}:""}>
<p className={isAdmin?"ws100s teachedivp ymaxnamewidthdivp xiaoshou":"ws100s teachedivp ymaxnamewidthdivp"} onClick={isAdmin?()=>this.props.qiandaoxiangq(true,item.id):""}> <p className={isAdmin?"ws100s teachedivp ymaxnamewidthdivp xiaoshou color-blue":"ws100s teachedivp ymaxnamewidthdivp"} >
{ {
item.name item.name
} }
@ -51,7 +51,7 @@ class Teacherentry extends Component {
<Progress percent={jdt} showInfo={false} strokeColor="#1890ff"/> <Progress percent={jdt} showInfo={false} strokeColor="#1890ff"/>
</div> </div>
<div className="progressivpss"> <div className="progressivpss">
已签到{item.normal_count ? item.normal_count : 0} / 应签到 {item.all_count ? item.all_count : 0} 已签到 {item.normal_count ? item.normal_count : 0} / 应签到 {item.all_count ? item.all_count : 0}
</div> </div>
</div> </div>
@ -95,18 +95,18 @@ class Teacherentry extends Component {
isAdmin === true ? isAdmin === true ?
this.props.defaultActiveKey === "1" ? this.props.defaultActiveKey === "1" ?
<div className="ws100s xaxisreverseorder"> <div className="ws100s xaxisreverseorder">
<div className="jiezhis h40s xiaoshou" onClick={()=>this.props.thisEnd(item.id)}>截止</div> <div className="jiezhis h40s xiaoshou" onClick={(e)=>{e.stopPropagation();this.props.thisEnd(item.id)}}>截止</div>
<div className="shanchu h40s xiaoshou" onClick={()=>this.props.thisdelete(item.id)}>删除</div> <div className="shanchu h40s xiaoshou" onClick={(e)=>{e.stopPropagation();this.props.thisdelete(item.id)}}>删除</div>
</div> </div>
: :
item.edit_auth === true ? item.edit_auth === true ?
<div className="ws100s xaxisreverseorder"> <div className="ws100s xaxisreverseorder">
<div className="jiezhis h40s xiaoshou" onClick={()=>this.props.Signinnamestypes(item.id,true,item.name)}>编辑</div> <div className="jiezhis h40s xiaoshou" onClick={(e)=>{e.stopPropagation();this.props.Signinnamestypes(item.id,true,item.name)}}>编辑</div>
<div className="shanchu h40s xiaoshou" onClick={()=>this.props.thisdelete(item.id)}>删除</div> <div className="shanchu h40s xiaoshou" onClick={(e)=>{e.stopPropagation();this.props.thisdelete(item.id)}}>删除</div>
</div> </div>
: :
<div className="ws100s xaxisreverseorder"> <div className="ws100s xaxisreverseorder">
<div className="jiezhis h40s color-reds xiaoshou" onClick={()=>this.props.thisdelete(item.id)}>删除</div> <div className="jiezhis h40s color-reds xiaoshou" onClick={(e)=>{e.stopPropagation();this.props.thisdelete(item.id)}}>删除</div>
</div> </div>
: :
( (
@ -116,7 +116,7 @@ class Teacherentry extends Component {
item.attendance_status? item.attendance_status?
( (
item.attendance_status==="ABSENCE"? item.attendance_status==="ABSENCE"?
<div className="qiandaobutton xiaoshou" onClick={()=>this.props.Signin(item.mode,item.id,item.attendance_code)}> <div className="qiandaobutton xiaoshou" onClick={(e)=>{e.stopPropagation();this.props.Signin(item.mode,item.id,item.attendance_code)}}>
签到 签到
</div> </div>
: :

@ -211,3 +211,23 @@
padding: 0px !important; padding: 0px !important;
white-space: nowrap !important; white-space: nowrap !important;
} }
.color26C7C9 .ant-select-selection-selected-value{
margin: 0 30% !important;
}
.colorEAAE4E .ant-select-selection-selected-value{
margin: 0 40% !important;
}
.color909399 .ant-select-selection-selected-value{
margin: 0 37% !important;
}
.colorFF835C .ant-select-selection-selected-value{
margin: 0 37% !important;
}
/*.allSignedinlistbox .ant-select-selection-selected-value{*/
/* margin: 0 30% !important;*/
/*}*/

@ -358,6 +358,11 @@
} }
.colorbluesigin{
font-size:16px;
font-weight:bold;
color:rgba(51,51,51,1);
}
.sptits{ .sptits{
font-size:20px; font-size:20px;
font-family:MicrosoftYaHeiSemibold; font-family:MicrosoftYaHeiSemibold;

@ -260,9 +260,10 @@ class Signedinlist extends Component {
className: "textcenter", className: "textcenter",
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Select key={record.index} defaultValue={record.attendance_status} <Select key={record.index} defaultValue={record.attendance_status}
// className={"Signedinlistbox"} // className={"Signedinlistbox"}
className={record.attendance_status==="NORMAL"?"color26C7C9 Signedinlistbox sginboxcolor26C7C9":record.attendance_status==="LEAVE"?"colorEAAE4E Signedinlistbox sginboxcolorEAAE4E":record.attendance_status==="ABSENCE"?this.props.defaultActiveKey==="2"?"colorFF835C Signedinlistbox sginboxcolorFF835C":"color909399 Signedinlistbox sginboxcolor909399":"Signedinlistbox"} className={record.attendance_status==="NORMAL"?"color26C7C9 Signedinlistbox sginboxcolor26C7C9 marginleft10":record.attendance_status==="LEAVE"?"colorEAAE4E Signedinlistbox sginboxcolorEAAE4E marginleft10":record.attendance_status==="ABSENCE"?this.props.defaultActiveKey==="2"?"colorFF835C Signedinlistbox sginboxcolorFF835C marginleft10":"color909399 Signedinlistbox sginboxcolor909399 marginleft10":"Signedinlistbox"}
style={{ width: 167 }} onChange={(e)=>this.handleChange(e,record.user_id)}> style={{ width: 167 }} onChange={(e)=>this.handleChange(e,record.user_id)}>
{ {
@ -339,6 +340,15 @@ class Signedinlist extends Component {
</Col> </Col>
</Row> </Row>
<style>
{
`
.marginleft10{
margin-left: 10px !important;
}
`
}
</style>
<div className={"backfff mt10"}> <div className={"backfff mt10"}>
{ {
this.state.loading===true? this.state.loading===true?

@ -43,13 +43,10 @@ class Signindetails extends Component{
<div className="ws100s" style={{ <div className="ws100s" style={{
position: "relative", position: "relative",
}}> }}>
<div className="ws100s xaxisreverseorder" style={{ <div className="ws100s mb20">
position: "absolute",
top: "-29px",
}}>
<p className="sortinxdirection xiaoshou" onClick={()=>this.props.qiandaoxiangq(false)}> <p className="sortinxdirection xiaoshou" onClick={()=>this.props.qiandaoxiangq(false)}>
<i className="iconfont icon-zuojiantou posiivsiconmyss mr5"></i> <i className="iconfont icon-zuojiantou posiivsiconmyss mr5 colorbluesigin"></i>
<p className="fh mr20"> 返回</p> <p className="fh mr20 colorbluesigin">正在签到</p>
</p> </p>
</div> </div>

Loading…
Cancel
Save