Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

courseware
anke1460 5 years ago
commit 2e479e2754

@ -714,9 +714,9 @@ module ExercisesHelper
end
teacher_review = ex_user.subjective_score < 0.0 ? false : true
if (user_status == 0 && commit_status == 1) || (user_status == 1 && ex_user_exercise_status == 3 && commit_status == 1) #老师都可以看,学生,需在试卷已提交,且已截止的情况下看
ex_object_score = ex_user.objective_score < 0.0 ? 0.0 : ex_user.objective_score.round(1).to_s
ex_subject_score = ex_user.subjective_score < 0.0 ? nil : ex_user.subjective_score.round(1).to_s
score = ex_user.score.present? ? ex_user.score.round(1).to_s : 0.0.to_s
ex_object_score = ex_user.objective_score <= 0.0 ? 0 : ex_user.objective_score.round(1).to_s
ex_subject_score = ex_user.subjective_score < 0.0 ? nil : (ex_user.subjective_score > 0.0 ? ex_user.subjective_score.round(1).to_s : 0)
score = ex_user.score.present? && ex_user.score > 0.0 ? ex_user.score.round(1).to_s : 0.to_s
else
ex_object_score = nil
ex_subject_score = nil

@ -5,6 +5,6 @@ class ExerciseBankChoice < ApplicationRecord
scope :find_choice_custom, lambda {|k,v| where("#{k} = ?",v)} #根据传入的参数查找问题
scope :left_choice_choose, lambda {|k,v| where("#{k} > ?",v)} #根据传入的参数查找问题
validates :choice_text, length: { maximum: 500, too_long: "不能超过500个字符" }
# validates :choice_text, length: { maximum: 500, too_long: "不能超过500个字符" }
end

@ -11,7 +11,7 @@ class ExerciseBankQuestion < ApplicationRecord
scope :left_question_choose, lambda {|k,v| where("#{k} > ?",v)} #根据传入的参数查找问题
scope :find_objective_questions, -> {where("question_type != ?",4)} #查找全部客观题
validates :question_title, length: { maximum: 1000, too_long: "不能超过1000个字符" }
# validates :question_title, length: { maximum: 1000, too_long: "不能超过1000个字符" }
def question_type_name
case self.question_type

@ -7,6 +7,6 @@ class ExerciseChoice < ApplicationRecord
scope :find_choice_custom, lambda {|k,v| where("#{k} = ?",v)} #根据传入的参数查找问题
scope :left_choice_choose, lambda {|k,v| where("#{k} > ?",v)} #根据传入的参数查找问题
validates :choice_text, length: { maximum: 500, too_long: "不能超过500个字符" }
# validates :choice_text, length: { maximum: 500, too_long: "不能超过500个字符" }
end

@ -16,7 +16,7 @@ class ExerciseQuestion < ApplicationRecord
scope :left_question_choose, lambda {|k,v| where("#{k} > ?",v)} #根据传入的参数查找问题
scope :find_objective_questions, -> {where("question_type != ?",4)} #查找全部客观题
validates :question_title, length: { maximum: 1000, too_long: "不能超过1000个字符" }
# validates :question_title, length: { maximum: 1000, too_long: "不能超过1000个字符" }
def question_type_name

@ -133,13 +133,15 @@ class TPIContextProvider extends Component {
})
}
componentWillMount () {
// 拦截判断是否离开当前页面
}
componentWillUnmount() {
this.costTimeInterval && window.clearInterval(this.costTimeInterval)
}
componentDidMount() {
window.$(window).unload( ()=>{
console.log(12321)
});
// TODO 登录状态的判断?
// request
@ -161,12 +163,15 @@ class TPIContextProvider extends Component {
}
}, 1000)
// 页面离开时存下用户的任务耗时
window.$(window).bind('beforeunload', function (e) {
console.log(111111)
// // 页面离开时存下用户的任务耗时
window.$(window).bind('beforeunload',()=>{
this._updateCostTime();
})
// window.$(window).unload( ()=>{
// this._updateCostTime();
// });
// // 页面离开时存下用户的任务耗时
// window.$(window).unload( ()=>{
// this._updateCostTime();

@ -9,6 +9,7 @@ import bilibili from './images/bilibili.png';
import tencent from './images/tencent.png';
import WeiBaiTong from './images/WeiBaiTong.png';
import douyu from './images/douyu.jpg';
import zoom from './images/zoom.png';
class Live extends Component{
render(){
@ -16,32 +17,65 @@ class Live extends Component{
return(
<div className="livePanel">
<style>
{
`
.verticallayout{
display: flex;
flex-direction:column;
}
.myspacearound{
display: flex;
justify-content: space-around;
}
.mr0{
margin-right: 0px !important;
}
.mr5{
margin-right: 5px !important;
}
.ml0{
margin-left: 0px !important;
}
`
}
</style>
<p className="mt30 mb10 color-grey-9 pl10">EduCoder支持所有第三方直播平台特别推荐</p>
<ul className="platform">
<li>
<ul className="platform myspacearound">
<li className="verticallayout mr0">
<a href="https://ke.qq.com/act/speed_pc/index.html?from=800021837" target="_blank"><img alt="" src={tencent} className="mr8" width="28px"/>
<label className="color-grey-3 pointer">腾讯课堂</label>
</a>
<a href="https://pub.idqqimg.com/pc/misc/files/20200204/2e4cb765bef54f0c919c0ab8ab79d969.pdf" target="_blank" className="color-blue ml20">(简明手册)</a>
<a href="https://pub.idqqimg.com/pc/misc/files/20200204/2e4cb765bef54f0c919c0ab8ab79d969.pdf" target="_blank" className="color-blue ml0">(简明手册)</a>
</li>
<li>
<li className="verticallayout mr0">
<a href="https://live.bilibili.com/liveHime?visit_id=a81rbm7v2kk0" target="_blank"><img alt="" src={bilibili} className="mr8" width="52px"/>
<label className="color-grey-3 pointer">哔哩哔哩</label>
</a>
<a href="https://www.bilibili.com/blackboard/live/broadcast-intro.html#/" target="_blank" className="color-blue ml20">(简明手册)</a>
<a href="https://www.bilibili.com/blackboard/live/broadcast-intro.html#/" target="_blank" className="color-blue ml0">(简明手册)</a>
</li>
<li>
<li className="verticallayout mr0">
<a href="https://www.douyu.com/" target="_blank"><img alt="" src={douyu} className="mr8" width="28px"/>
<label className="color-grey-3 pointer">斗鱼</label>
</a>
<a href="https://www.douyu.com/special/guide/anchor" target="_blank" className="color-blue ml20">(简明手册)</a>
<a href="https://www.douyu.com/special/guide/anchor" target="_blank" className="color-blue ml0">(简明手册)</a>
</li>
<li>
<div><img alt="" src={WeiBaiTong} className="mr8" width="28px"/>
<li className="verticallayout mr0">
<div>
<img alt="" src={WeiBaiTong} className="mr8" width="28px"/>
<label className="color-grey-3">威佰通</label>
</div>
<a href="https://www.educoder.net/forums/3734" target="_blank" className="color-blue ml20">(简明手册)</a>
<a href="https://www.educoder.net/forums/3734" target="_blank" className="color-blue ml0">(简明手册)</a>
</li>
<li className="verticallayout mr0">
<a href="https://zoom.com.cn/download" target="_blank"><img alt="" src={zoom} className="mr8" width="63px"/>
<label className="color-grey-3" style={{
cursor:"pointer"
}}>zoom</label>
</a>
<a href="https://support.zoom.us/hc/zh-cn/articles/201362033-Windows%E5%92%8CMAC%E5%85%A5%E9%97%A8%E6%8C%87%E5%8D%97" target="_blank" className="color-blue ml0">(简明手册)</a>
</li>
</ul>
{
lives && lives.length > 0 ?
@ -79,4 +113,4 @@ class Live extends Component{
)
}
}
export default Live;
export default Live;

@ -9,7 +9,7 @@ import axios from 'axios';
const { TextArea } = Input;
const { Option } = Select;
const array=['腾讯课堂','斗鱼直播','Bilibili','威佰通'];
const array=['腾讯课堂','斗鱼直播','Bilibili','威佰通','zoom'];
function range(start, end) {
const result = [];
@ -290,7 +290,7 @@ class LiveNew extends Component{
<TextArea rows={4} placeholder="可在此介绍开播具体事项,如开播时间安排等。" />
)}
</Form.Item>
</Form>
<div className="clearfix mt30 edu-txt-center">
<a onClick={this.cancelNew} className="task-btn mr30">取消</a>
@ -303,4 +303,4 @@ class LiveNew extends Component{
}
}
const WrappedLiveNew = Form.create({name: 'LiveNew'})(LiveNew);
export default WrappedLiveNew;
export default WrappedLiveNew;

@ -299,8 +299,7 @@ class VideoIndex extends Component {
const flag = parseInt(course_identity) < 5;
const newOperation = flag;
const new_upload = flag && (is_teacher && this.props.checkIfProfessionalCertification());
let isAdmin = this.props&&this.props.isAdmin();
return (
<React.Fragment>
@ -404,7 +403,10 @@ class VideoIndex extends Component {
</React.Fragment>
:
<WordsBtn style="blue" className="font-16 ml30" onClick={this.liveSetting}>添加直播</WordsBtn>
isAdmin===true?
<WordsBtn style="blue" className="font-16 ml30" onClick={this.liveSetting}>添加直播</WordsBtn>
:
""
}
</li>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

@ -601,26 +601,38 @@ class CoursesBanner extends Component {
</div>
<div>
<a href={"/users/" + coursedata.teacher_login} className="fl">
<img alt="头像" className="radius fl mt3 bannerimgname"
src={getImageUrl(`images/` + coursedata.teacher_img)}/>
</a>
<div className="fl mt13">
<p className="color-white">
<a href={"/users/" + coursedata.teacher_login}
className="color-white bannnerusername">{coursedata.teacher_name}</a>
</p>
</div>
<div className="fl mt13">
<p className="color-white bannnerusernames">{coursedata.teacher_school}</p>
</div>
<div className="clearfix ">
<div className="fl fl mr40 mb20">
<a href={"/users/" + coursedata.teacher_login} className="fl">
<img alt="头像" className="radius fl mt3 bannerimgname"
src={getImageUrl(`images/` + coursedata.teacher_img)}/>
</a>
<div className="fl mt13">
<p className="color-white">
<a href={"/users/" + coursedata.teacher_login}
className="color-white bannnerusername">{coursedata.teacher_name}</a>
</p>
</div>
</div>
<div className="fl mt13">
<p className="color-white bannnerusernames">{coursedata.teacher_school}</p>
</div>
<div className="clearfix ">
<div className="fl fl mr40 mb20" >
<div className="task-hide" style={{height:25,marginBottom:10,marginLeft:60}}>
{coursedata.teacher_users.length===0?'':
<span className="color-white" >协作老师
{coursedata.teacher_users.map((iem,idx)=>{
return(
<span className="task-hide" style={{width:50,marginLeft:5}}>{idx<3?iem:''} {coursedata.teacher_users.length>3&&idx===2?'...':''} </span>
)
})
}
</span>
}
</div>
</div>

@ -1,9 +1,7 @@
import React, {Component} from "react";
import {WordsBtn} from 'educoder';
import {Table, InputNumber, Tooltip} from "antd";
import {Link, Switch, Route, Redirect} from 'react-router-dom';
import {Table, InputNumber, Tooltip,Badge} from "antd";
import axios from 'axios';
import './Shixunbage.css';
class OfficialAcademicTranscript extends Component {
constructor(props) {
@ -116,14 +114,15 @@ class OfficialAcademicTranscript extends Component {
className: "TaskForms",
render: (text, record) => (
<span>
<span className={"task-hide linhe15"} style={{color: "#676767"}}><a className="tasknameName font-14"
onClick={() => this.myjumptopic("id" + record.customs)}
title={record.taskname.name.length > 15 ? record.taskname.name : ""}>
{record.taskname.name}
</a>
{record.taskname.complete_status === 2 ?
<span className={"tasknamebox ml10"}>延时</span> : record.taskname.complete_status === 3 ?
<span className={"tasknameboxs ml10"}>延时</span> : ""}
<span className={"task-hide"} style={{color: "#676767"}}>
<a className="relative font-14" onClick={() => this.myjumptopic("id" + record.customs)}
title={record.taskname.name.length > 15 ? record.taskname.name : ""}>
<span className={"tasknameName fl mr5"}>{record.taskname.name}</span>
{record.taskname.complete_status === 2 ?
<Badge count={"延时"} className="site-badge-red fl pdt3" /> : record.taskname.complete_status === 3 ?
<Badge count={"无效"} className="site-badge-white fl pdt3" />: ""}
</a>
</span>
</span>
),
@ -305,10 +304,11 @@ class OfficialAcademicTranscript extends Component {
.tasknameName:link{color:#676767}
.tasknameName:hover{color:#4CACFF}
.tasknameName{
overflow: hidden;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 225px;
max-width: 210px;
text-align: left !important;
}
.TaskForms{
@ -331,6 +331,9 @@ class OfficialAcademicTranscript extends Component {
.mr22{
margin-right: 22px;
}
.pdt3{
padding-top:3px;
}
`}
</style>
{datas === undefined ? "" : <Table

@ -0,0 +1,15 @@
.site-badge-red .ant-badge-count {
background-color: #FC2B6A;
color: #fff;
/*box-shadow: 0 0 0 1px #d9d9d9 inset;*/
}
.site-badge-white .ant-badge-count {
background-color: #EDEDED;
color: #666666;
/*box-shadow: 0 0 0 1px #d9d9d9 inset;*/
}
.relative{
position: relative;
}

@ -428,7 +428,7 @@
color: #4CACFF;
}
.xiaoshou{
cursor:pointer !important;
cursor: !important;
}
.xiaoshout{
cursor:default !important;

@ -1372,14 +1372,14 @@ class TPMBanner extends Component {
{this.props.identity < 8 && shixunsDetails.shixun_status != -1 && shixunsDetails.shixun_status != 0?
<div className="fr kaike kkbth mr20 width155"
<div className="fr kaike kkbth mr20"
style={{display: shixunsDetails.can_copy === false || shixunsDetails.can_copy === null ? "none" : "flex"}}>
<Tooltip placement="bottom" title={"基于这个实训修改形成新的实训"}>
<span className="flex1 edu-txt-center fl font-18"
onClick={this.copyForkvisible}
style={{display: shixunsDetails.can_copy === false || shixunsDetails.can_copy === null ? "none" : "inline-block"}}
>
复制实训
复制
</span>
</Tooltip>

Loading…
Cancel
Save