Merge branch 'develop' into dev_cxt2

dev_cxt2
cxt 5 years ago
commit a4f365183d

@ -0,0 +1,2 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.

@ -0,0 +1,3 @@
// Place all the styles related to the trustie_hacks controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

@ -1,6 +1,11 @@
class Competitions::CertificatesController < Competitions::BaseController
def personal
prize_user = CompetitionPrizeUser.find_by!(user: current_user, id: params[:id])
prize_user =
if current_user.admin_or_business?
CompetitionPrizeUser.find(params[:id])
else
CompetitionPrizeUser.find_by!(user: current_user, id: params[:id])
end
return render_not_found unless prize_user.certificate_exist?
team = prize_user.competition_team
@ -12,7 +17,7 @@ class Competitions::CertificatesController < Competitions::BaseController
def team
team = CompetitionTeam.find(params[:id])
return render_forbidden unless team.team_members.exists?(user_id: current_user.id)
return render_forbidden unless current_user.admin_or_business? || team.team_members.exists?(user_id: current_user.id)
return render_not_found unless team.certificate_exists?
prize = team.competition_prize_users.first.competition_prize

@ -1,8 +1,10 @@
class Competitions::PrizesController < Competitions::BaseController
before_action :require_prize_user!
helper_method :current_prize_user
def show
self_prizes = current_competition.competition_prize_users.where(user_id: current_user.id).includes(:competition_team).order(:competition_prize_id)
self_prizes = current_competition.competition_prize_users.where(user_id: current_prize_user.id).includes(:competition_team).order(:competition_prize_id)
@leader = self_prizes.any?{ |prize_user| prize_user.leader? && prize_user.competition_prize.category == 'bonus' } # 是否为队长并且有奖金奖励
if @leader
@ -22,8 +24,13 @@ class Competitions::PrizesController < Competitions::BaseController
private
def require_prize_user!
return if current_competition.competition_prize_users.exists?(user: current_user)
return if current_competition.competition_prize_users.exists?(user: current_prize_user)
return if current_user.admin_or_business? || current_user.id == current_prize_user.id
render_forbidden
end
def current_prize_user
@_current_prize_user ||= User.find(params[:user_id])
end
end

@ -0,0 +1,48 @@
class TrustieHacksController < ApplicationController
before_action :require_admin, :except => [:index]
before_action :require_login, :except => [:index]
before_action :find_hackathon
before_action :find_hack, :except => [:create, :index]
def index
## 分页参数
page = params[:page] || 1
limit = params[:limit] || 16
hacks = @hackathon.trustie_hacks
@hackathon_users_count = hacks ? 0 : hacks.sum(:hack_users_count)
@hacks = hacks.page(page).per(limit)
end
def edit ;end
def create
@hackathon.trustie_hacks.create!(name: params[:name], description: params[:description])
render_ok
end
def update
@hack.update_attributes(name: params[:name], description: params[:description])
end
def edit_hackathon ;end
def update_hackathon
@hackathon.update_attributes(name: params[:name], description: params[:description])
end
private
def find_hackathon
@hackathon = TrustieHackathon.first ||
TrustieHackathon.create(name: params[:name], description: params[:description])
end
def find_hack
@hack = TrustieHack.find params[:id]
end
end

@ -0,0 +1,2 @@
module TrustieHacksHelper
end

@ -0,0 +1,3 @@
class HackUser < ApplicationRecord
belongs_to :trustie_hack, counter_cache: true
end

@ -0,0 +1,4 @@
class TrustieHack < ApplicationRecord
has_many :hack_users, :dependent => :destroy
belongs_to :trustie_hackathon, counter_cache: true
end

@ -0,0 +1,5 @@
class TrustieHackathon < ApplicationRecord
has_many :trustie_hacks, :dependent => :destroy
end

@ -5,7 +5,7 @@ if @leader
json.bank_account_editable @bank_account_editable
end
json.all_certified current_user.all_certified?
json.all_certified current_prize_user.all_certified?
json.personal_certifications do
json.array! @self_prizes do |prize_user|
json.url personal_competition_certificate_path(current_competition.identifier, prize_user)

@ -0,0 +1 @@
json.(@hack, :id, :name, :description)

@ -0,0 +1,2 @@
json.name @hackathon&.name
json.description @hackathon&.description

@ -0,0 +1,9 @@
json.hackathon do
json.(@hackathon, :id, :name, :description)
json.hackathon_users_count @hackathon_users_count
end
json.hacks @hacks do |hack|
json.(hack, :id, :name, :description, :hack_users_count)
end

@ -513,7 +513,6 @@ Rails.application.routes.draw do
post :join_exercise_banks # 加入习题集
post :publish # 立即发布
post :end_exercise # 立即截止
``
end
end
@ -875,6 +874,14 @@ Rails.application.routes.draw do
resources :searchs, only: [:index]
end
resources :trustie_hacks, path: :osshackathon do
collection do
get :edit_hackathon
post :update_hackathon
end
end
end
namespace :admins do

@ -0,0 +1,10 @@
class CreateTrustieHackathons < ActiveRecord::Migration[5.2]
def change
create_table :trustie_hackathons do |t|
t.string :name
t.string :description
t.integer :trustie_hacks_count, default: 0
t.timestamps
end
end
end

@ -0,0 +1,11 @@
class CreateTrustieHacks < ActiveRecord::Migration[5.2]
def change
create_table :trustie_hacks do |t|
t.string :name
t.string :description
t.references :user
t.integer :hack_users_count, default: 0
t.timestamps
end
end
end

@ -0,0 +1,9 @@
class CreateHackUsers < ActiveRecord::Migration[5.2]
def change
create_table :hack_users do |t|
t.references :user
t.references :trustie_hack
t.timestamps
end
end
end

@ -0,0 +1,111 @@
class Migrate2808ExerciseScore < ActiveRecord::Migration[5.2]
def challenge_path(path)
cha_path = path.present? ? path.split("") : []
cha_path.reject(&:blank?)[0].try(:strip)
end
# 版本库文件内容,带转码
def git_fle_content(repo_path, path)
begin
Rails.logger.info("git file content: repo_path is #{repo_path}, path is #{path}")
content = GitService.file_content(repo_path: repo_path, path: path)
Rails.logger.info("git file content: content is #{content}")
decode_content = nil
if content.present?
content = content["content"] #6.24 -hs 这个为新增,因为当实训题里含有选择题时,这里会报错,undefined method `[]' for nil:NilClass
content = Base64.decode64(content)
cd = CharDet.detect(content)
Rails.logger.info "encoding: #{cd['encoding']} confidence: #{cd['confidence']}"
# 字符编码问题GB18030编码识别率不行
decode_content =
if cd["encoding"] == 'GB18030' && cd['confidence'] > 0.8
content.encode('UTF-8', 'GBK', {:invalid => :replace, :undef => :replace, :replace => ' '})
else
content.force_encoding('UTF-8')
end
end
decode_content
rescue Exception => e
Rails.logger.error(e.message)
raise Educoder::TipException.new("文档内容获取异常")
end
end
def calculate_student_score(exercise,user)
score5 = 0.0 #实训题
exercise_questions = exercise.exercise_questions.includes(:exercise_standard_answers,:exercise_shixun_challenges)
exercise_questions.each do |q|
if q.question_type == 5
q.exercise_shixun_challenges.each do |exercise_cha|
game = Game.user_games(user.id,exercise_cha.challenge_id)&.first #当前用户的关卡
if game.present?
exercise_cha_score = 0.0
answer_status = 0
# if game.status == 2 && game.final_score >= 0
if game.final_score > 0 && game.end_time < exercise.end_time
exercise_cha_score = game.real_score(exercise_cha.question_score)
# exercise_cha_score = exercise_cha.question_score #每一关卡的得分
answer_status = 1
end
ex_shixun_answer_content = exercise_cha.exercise_shixun_answers.where(user_id:user.id,exercise_question_id:q.id)
code = nil
if exercise_cha.challenge&.path.present?
cha_path = challenge_path(exercise_cha.challenge&.path)
game_challenge = game.game_codes.search_challenge_path(cha_path)&.first
if game_challenge.present?
game_code = game_challenge
code = game_code.try(:new_code)
else
begin
code = git_fle_content(game.myshixun.repo_path,cha_path)
rescue
code = ""
end
end
end
if ex_shixun_answer_content.blank? #把关卡的答案存入试卷的实训里
### Todo 实训题的_shixun_details里的代码是不是直接从这里取出就可以了涉及到code的多个版本库的修改
sx_option = {
:exercise_question_id => q.id,
:exercise_shixun_challenge_id => exercise_cha.id,
:user_id => user.id,
:score => exercise_cha_score.round(1),
:answer_text => code,
:status => answer_status
}
ExerciseShixunAnswer.create!(sx_option)
else
ex_shixun_answer_content.first.update_attributes!(score:exercise_cha_score.round(1),answer_text:code,status:answer_status)
end
score5 += exercise_cha_score
else
score5 += 0.0
end
end
end
end
score5
end
def change
exercise = Exercise.find_by(id: 2808)
if exercise
exercise_users = exercise.exercise_users.where("start_at is not null and commit_status = 0")
exercise_users.each do |exercise_user|
calculate_score = calculate_student_score(exercise, exercise_user.user)
subjective_score = exercise_user.subjective_score
total_score_subjective_score = subjective_score < 0.0 ? 0.0 : subjective_score
total_score = calculate_score + total_score_subjective_score
if exercise_user.end_at.nil?
exercise_user.update_attributes!(score:total_score,objective_score:calculate_score,end_at:exercise.end_time,commit_status:1,status:1,commit_method:3)
end
puts exercise_user.id
end
end
end
end

@ -268,6 +268,12 @@ const NewCompetitions=Loadable({
loading: Loading,
})
//黑客松定制竞赛
const Osshackathon=Loadable({
loader: () => import('./modules/osshackathon/Osshackathon'),
loading: Loading,
})
const Messagerouting= Loadable({
loader: () => import('./modules/message/js/Messagerouting'),
loading: Loading,
@ -497,6 +503,18 @@ class App extends Component {
}
}></Route>
{/*黑客松定制竞赛*/}
<Route
path={"/osshackathon"}
render={
(props)=>{
return(
<Osshackathon {...this.props} {...props} {...this.state} />
)
}
}
/>
{/*认证*/}
<Route path="/account" component={AccountPage}/>

@ -1,4 +1,4 @@
import { from } from '_array-flatten@2.1.2@array-flatten';
//import { from } from '_array-flatten@2.1.2@array-flatten';
// export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil';

@ -240,17 +240,17 @@ class CompetitionCommon extends Component{
if(signupdata.enrolled===true){
this.props.history.replace(`/courses/${data.course_id}`);
}else{
if(data.member_of_course===true){
if (data.member_of_course === true) {
this.props.history.replace(`/courses/${data.course_id}`);
}else{
} else {
// 以学生身份调用加入课堂 进入课堂首页
let url="/courses/apply_to_join_course.json"
let url = "/courses/apply_to_join_course.json"
axios.post(url, {
invite_code: data.invite_code,
student:1
invite_code: data.invite_code,
student: 1
}
).then((response) => {
if(response.data.status===0){
if (response.data.status === 0) {
this.props.history.replace(`/courses/${data.course_id}`);
}
})

@ -1002,15 +1002,14 @@ class Fileslists extends Component{
}
>
{this.props.isAdmin()||this.props.isStudent() ? <Pagination
{this.props.isAdmin()||this.props.isStudent() ? files&&files.length>0?<Pagination
showQuickJumper
defaultCurrent={1}
pageSize={15}
total={total_count}
current={page}
onChange={this.PaginationTask}
/>:""}
/>:"":""}
</div>
{

@ -1,5 +1,5 @@
import React,{ Component } from "react";
import { Modal,Checkbox,Select,Input,Spin,Icon,Radio,DatePicker} from "antd";
import { Modal,Checkbox,Select,Input,Spin,Icon,Radio,DatePicker,Tooltip} from "antd";
import locale from 'antd/lib/date-picker/locale/zh_CN';
import axios from'axios';
import {handleDateString} from 'educoder';
@ -421,8 +421,9 @@ class Selectresource extends Component{
<Radio style={radioStyle} value={0}>
立即发布
</Radio>
<Tooltip placement="bottom" title={this.props.isStudent()===true?"不支持学生延迟发布":""} >
<Radio style={radioStyle} value={1} className={"fl"} disabled={this.props.isStudent()}>
<span className={"mr5"}>发布</span>
<span className={"mr5"}>发布</span>
<DatePicker
dropdownClassName="hideDisable"
showTime={{ format: 'HH:mm' }}
@ -439,6 +440,7 @@ class Selectresource extends Component{
disabled={this.state.Radiovalue===1?false:true}
/>
</Radio>
</Tooltip>
<span className={"fl mt5 color-grey-c"}>(按照设置的时间定时发布)</span>
</Radio.Group>
</div>

@ -529,25 +529,28 @@ class Selectsetting extends Component{
<Radio style={radioStyle} value={0}>
立即发布
</Radio>
<Radio style={radioStyle} value={1} className={"fl"} disabled={this.props.isStudent()}>
<span className={"mr5"}>延迟发布</span>
<DatePicker
showToday={false}
dropdownClassName="hideDisable"
showTime={{ format: 'HH:mm' }}
format="YYYY-MM-DD HH:mm"
locale={locale}
placeholder="请选择发布时间"
id={"startime"}
width={"210px"}
value={datatime===undefined||datatime===""?"":moment(datatime, dateFormat)}
onChange={this.onChangeTimepublish}
disabledTime={disabledDateTime}
disabledDate={disabledDate}
disabled={this.state.Radiovalue===1?false:true}
/>
</Radio>
<Tooltip placement="bottom" title={this.props.isStudent()===true?"不支持学生延迟发布":""}>
<Radio style={radioStyle} value={1} className={"fl"} disabled={this.props.isStudent()}>
<span className={"mr5"}>延期发布</span>
<DatePicker
showToday={false}
dropdownClassName="hideDisable"
showTime={{ format: 'HH:mm' }}
format="YYYY-MM-DD HH:mm"
locale={locale}
placeholder="请选择发布时间"
id={"startime"}
width={"210px"}
value={datatime===undefined||datatime===""?"":moment(datatime, dateFormat)}
onChange={this.onChangeTimepublish}
disabledTime={disabledDateTime}
disabledDate={disabledDate}
disabled={this.state.Radiovalue===1?false:true}
/>
</Radio>
</Tooltip>
<span className={"fl mt5 color-grey-c"}>(按照设置的时间定时发布)</span>
</Radio.Group>
</div>

@ -398,8 +398,9 @@ class Sendresource extends Component{
<Radio style={radioStyle} value={0}>
立即发布
</Radio>
<Tooltip placement="bottom" title={this.props.isStudent()===true?"不支持学生延迟发布":""}>
<Radio style={radioStyle} value={1} className={"fl"} disabled={this.props.isStudent()}>
<span className={"mr5"}>发布</span>
<span className={"mr5"}>发布</span>
<DatePicker
dropdownClassName="hideDisable"
@ -417,6 +418,7 @@ class Sendresource extends Component{
disabled={this.state.Radiovalue===1?false:true}
/>
</Radio>
</Tooltip>
<span className={"fl mt5 color-grey-c"}>(按照设置的时间定时发布)</span>
</Radio.Group>
</div>

@ -304,7 +304,7 @@ class SingleEditor extends Component{
<span className="fr">标准答案</span>
</React.Fragment>
:
<span className="fr color-orange">请点击正确选项</span>
""
}
</div>

@ -675,22 +675,24 @@ class LoginDialog extends Component {
<a onClick={()=>this.openweixinlogin()}>
<img src={require('./WeChat.png')} alt="微信登录"/>
</a>
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
<img src={require('./qq.png')} alt="qq登录"/>
</a>
{/*<a onClick={()=>this.openqqlogin()} className={"ml10"}>*/}
{/*<img src={require('./qq.png')} alt="qq登录"/>*/}
{/*</a>*/}
</div>
</p>:<p className="clearfix mt20">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
{/*<a onClick={()=>this.openweixinlogin()}>*/}
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
{/*</a>*/}
<a onClick={()=>this.openphoneqqlogin()} className={"ml10"}>
<img src={require('./qq.png')} alt="qq登录"/>
</a>
</div>
</p>}
</p>:""}
{/*<p className="clearfix mt20">*/}
{/*<span className={"startlogin"}>———————— 快速登录 ————————</span>*/}
{/*<div className={"mt10"}>*/}
{/*/!*<a onClick={()=>this.openweixinlogin()}>*!/*/}
{/*/!*<img src={require('./WeChat.png')} alt="微信登录"/>*!/*/}
{/*/!*</a>*!/*/}
{/*<a onClick={()=>this.openphoneqqlogin()} className={"ml10"}>*/}
{/*<img src={require('./qq.png')} alt="qq登录"/>*/}
{/*</a>*/}
{/*</div>*/}
{/*</p>*/}
</form>}
{weixinlogin===true?<iframe

@ -0,0 +1,40 @@
.registrationback{
height: 368px;
width: 1200px;
-ms-flex-direction: column;
flex-direction: column;
}
.textright{
text-align: right;
}
.Osshackathonfont{
width: 80px;
height: 28px;
font-size: 20px;
font-weight:600;
color: rgba(5,16,26,1);
line-height: 28px;
}
.Osshackathonfontlist{
width:1188px;
font-size:14px;
font-weight:400;
color:rgba(102,102,102,1);
line-height:24px;
}
.OsshackathonCard{
width:1200px;
height:150px;
background:rgba(248,248,248,1);
border:1px solid rgba(235,235,235,1);
}
.OsshackathonCardtitle{
height:24px;
font-size:24px;
font-weight:400;
color:rgba(5,16,26,1);
line-height:24px;
}

@ -0,0 +1,128 @@
import React, {Component} from 'react';
import axios from 'axios';
import {SnackbarHOC, WordsBtn,getImageUrl} from 'educoder';
import {Row, Col,Input,Divider,Card,Button} from 'antd';
import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
import { CNotificationHOC } from '../courses/common/CNotificationHOC';
import './Osshackathon.css';
const { Search } = Input;
class Osshackathon extends Component {
constructor(props) {
super(props)
this.state = {
}
}
componentDidMount() {
}
componentDidUpdate = (prevProps) => {
}
render() {
// let {} = this.state;
return (
<div className="newMain clearfix newMainybot">
<div className={"educontent mb20 persmstyle"} style={{width: "1200px", marginTop: "26px"}}>
<div className="registrationback"
style={{"background": `url(${getImageUrl(`images/educoder/competitions/tipregistit.jpg`)})`,"height":"360px"}}
></div>
<Row className={"mt20"}>
<Col span={6}>
<Search
placeholder="请输入项目名称进行搜索"
enterButton="搜索"
size="large"
onSearch={value => console.log(value)}
/>
</Col>
<Col span={3} className={"fr textright"}>
<div>
报名整数<span className={"color-red"}>280</span>
</div>
</Col>
</Row>
<Row className={"mt20"}>
<Col span={6} className={"Osshackathonfont"}>
大赛介绍
</Col>
<Col span={3} className={"fr textright"}>
<Button type="primary">编辑</Button>
</Col>
</Row>
<style>
{
`
.ant-divider-horizontal{
margin: 19px 0;
}
`
}
</style>
<Divider />
<p className={"Osshackathonfontlist mb30"}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
probare, quae sunt a te dicta? Refert tamen, quo modo.
</p>
{/*学生身份*/}
<Card className={"OsshackathonCard"}>
<Row>
<Col span={6} className={"OsshackathonCardtitle"}>
大赛介绍
</Col>
<Col span={6} className={"fr textright"}>
<Button type="primary fr ">立即报名</Button>
<Button type="primary fr mr20" disabled>
已报名
</Button>
</Col>
</Row>
<p>Card content</p>
<p>Card content</p>
</Card>
{/*教师身份*/}
<Card className={"OsshackathonCard"}>
<Row>
<Col span={6} className={"OsshackathonCardtitle"}>
大赛介绍
</Col>
<Col span={6} className={"fr textright"}>
<Button type="primary fr ">立即报名</Button>
<Button type="primary fr mr20" disabled>
已报名
</Button>
</Col>
</Row>
<p>Card content</p>
<p>Card content</p>
</Card>
</div>
</div>
)
}
}
export default CNotificationHOC() (TPMIndexHOC (Osshackathon)) ;

@ -1,5 +1,5 @@
state说明
tasks详情接口
顶层state--tasks详情接口
allowed_unlock 为true时才允许非管理员用户解锁隐藏测试集
discusses_count 总评论数
@ -124,6 +124,28 @@ state说明
user 当前关卡所属用户的信息
user_praise 当前用户是否点赞
/MainContentContainer 里的state
repositoryCode: '',
open: false, // 繁忙等级等提示用Dialog考虑重构封装到根组件
gameBuilding: false, // 评测中标志
codeStatus: SAVED, // 0 已修改 1 保存中 2 已保存 3 保存失败
codeLoading: true, // code加载中
readRepoTimeout: false, // 加载代码轮训超时
resetCodeDialogOpen: false, // 重新加载初始代码弹框的bool控制
resetPassedCodeDialogOpen: false, // 重新加载上次通过的代码的bool控制
isEditablePath: true // 当前文件是否可编辑
CodeRepositoryViewContainer 里的state
drawerOpen: false, // 代码目录Drawer的bool控制 repoFilesDrawer
loadingFirstRepoFiles: false, // 代码目录树加载中的bool控制
fileTreeData: "", // 目录树节点数据[]
fileTreeSelectedKeys: [], // 目录树被选择的节点的key
codeRepositoryViewExpanded: false, --
tabIndex: 0, // tab值
settingDrawerOpen: false // 设置面板Drawer的bool控制
-------------- -------------- -------------- -------------- -------------- -------------- -------------- -------------- --------------
TPIContextProvider

@ -54,6 +54,12 @@ class Modifytext extends Component {
}
//取消
hideUpdating = () => {
this.props.modifysy(3);
}
render() {
const {getFieldDecorator} = this.props.form;
@ -96,7 +102,7 @@ class Modifytext extends Component {
}
.settingFormsy input {
width: 275px;
width: 200px;
height: 32px;
}
.settingFormsy input.validateInput {
@ -147,9 +153,18 @@ class Modifytext extends Component {
</Form.Item>
<div className="flexdirections yslzxueshi ml38 ">
<p className="fontcolorsyslhui1 font-14 myysllineheight myyslminwidth"></p>
<div className=" flexdirections ml10">
{/*<div className="buttongo mycompitcursor" onClick={()=>this.yhBanksfalse()}><p className="fontwenzi mycompitcursor" >取消</p></div>*/}
<Button type="primary" onClick={() => this.Modifytext()}>确定</Button>
<div className=" flexdirections ml10" style={{
display: "flex",
flexDirection: "initial",
marginTop: "24px",
}}>
<Button style={{
background: "#CDCDCD !important",
border: "0.5px solid #CDCDCD"
}} type="primary grayBtn " onClick={() => this.hideUpdating()}>取消</Button>
<Button style={{
marginLeft: "10px",
}} type="primary" onClick={() => this.Modifytext()}>确定</Button>
</div>
</div>
</div>

@ -3,7 +3,7 @@ import {getImageUrl,markdownToHTML, configShareForCustom} from 'educoder';
import DetailTop from './DetailTop.js';
import DetailCards from './DetailCards.js'
import AddCollaborators from "./addCollaborators.js";
import {Icon,Tooltip} from 'antd';
import {Icon, Tooltip, Popover} from 'antd';
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd';
import '../../paths/ShixunPaths.css';
@ -498,6 +498,10 @@ class PathDetailIndex extends Component{
}).catch((error) => {
console.log(error);
})
} else if (i === 3) {
this.setState({
modify: false
})
}
}
@ -506,6 +510,12 @@ class PathDetailIndex extends Component{
team_title: name
})
}
maincontent = () => {
return (<div className={"sandianbox"}>
<div onClick={() => this.modifysy(1)}>重命名</div>
</div>)
}
render(){
this.updatamakedown("shixuns_propaedeutics");
@ -664,17 +674,28 @@ class PathDetailIndex extends Component{
members ===undefined ?"":members === null ?"":
<div className="teacherTeam edu-back-white clearfix" id="subject_members">
{
detailInfoList === undefined ? "" : detailInfoList.allow_add_member === true ?
detailInfoList === undefined ?
<p className="font-16 clearfix">{team_title}</p> : detailInfoList.allow_add_member === true ?
(
modify === false ?
<p className="font-16 clearfix" onDoubleClick={() => this.modifysy(1)}>{team_title}</p>
<div>
<p className="font-16 clearfix fl" onDoubleClick={() => this.modifysy(1)}>{team_title}</p>
<Popover placement="right" content={this.maincontent()} trigger="hover">
<i className={"iconfont icon-sandian fr color999"} style={{
width: "30px",
height: "30px",
textAlign: "center",
}}></i>
</Popover>
</div>
:
<Modifytext {...this.props} {...this.state} pathid={this.props.match.params.pathId}
modifysy={(i) => this.modifysy(i)}
setteam_title={(name) => this.setteam_title(name)}></Modifytext>
)
: ""
: <p className="font-16 clearfix">{team_title}</p>
}
{ members===undefined?

@ -1161,16 +1161,16 @@ export default class TPMevaluation extends Component {
placeholder="输入"
value={item.input}
id={"textareavalue"+key}
autoHeight="true"
autoSize={{ minRows: 3, maxRows: 5 }}
// autoHeight="true"
rows={3}
onInput={(e)=>this.evaluationoninputvalue(e,key,"sr")}
></TextArea>
<TextArea className="textareavalue" name="test_set[output][]"
placeholder="预期输出"
value={item.output}
id={key+"textareavalue"}
autoHeight="true"
autoSize={{ minRows: 3, maxRows: 5 }}
// autoHeight="true"
rows={5}
onInput={(e)=>this.evaluationoninputvalue(e,key,"yq")}
></TextArea>
<div className="clearfix lineh-30">

@ -1057,26 +1057,26 @@ class LoginRegisterComponent extends Component {
<a onClick={()=>this.openweixinlogin()}>
<img src={require('./img/WeChat.png')} alt="微信登录"/>
</a>
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>:<p className="clearfix mb10 textcenter">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
{/*<a onClick={()=>this.openweixinlogin()}>*/}
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
{/*<a onClick={()=>this.openqqlogin()} className={"ml10"}>*/}
{/*<img src={require('./img/qq.png')} alt="qq登录"/>*/}
{/*</a>*/}
<a onClick={()=>this.openphoneqqlogin()}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>}
</p>:""}
</div>
}
{/*<p className="clearfix mb10 textcenter">*/}
{/*<span className={"startlogin"}>———————— 快速登录 ————————</span>*/}
{/*<div className={"mt10"}>*/}
{/*/!*<a onClick={()=>this.openweixinlogin()}>*!/*/}
{/*/!*<img src={require('./WeChat.png')} alt="微信登录"/>*!/*/}
{/*/!*</a>*!/*/}
{/*<a onClick={()=>this.openphoneqqlogin()}>*/}
{/*<img src={require('./img/qq.png')} alt="qq登录"/>*/}
{/*</a>*/}
{/*</div>*/}
{/*</p>*/}
@ -1237,24 +1237,29 @@ class LoginRegisterComponent extends Component {
<a onClick={()=>this.openweixinlogin()}>
<img src={require('./img/WeChat.png')} alt="微信登录"/>
</a>
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>:<p className="clearfix mb10 textcenter">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
{/*<a onClick={()=>this.openweixinlogin()}>*/}
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
{/*<a onClick={()=>this.openqqlogin()} className={"ml10"}>*/}
{/*<img src={require('./img/qq.png')} alt="qq登录"/>*/}
{/*</a>*/}
<a onClick={()=>this.openphoneqqlogin()}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>}
</p>:""}
</div>
}
{/*<p className="clearfix mb10 textcenter">*/}
{/*<span className={"startlogin"}>———————— 快速登录 ————————</span>*/}
{/*<div className={"mt10"}>*/}
{/*/!*<a onClick={()=>this.openweixinlogin()}>*!/*/}
{/*/!*<img src={require('./WeChat.png')} alt="微信登录"/>*!/*/}
{/*/!*</a>*!/*/}
{/*<a onClick={()=>this.openphoneqqlogin()}>*/}
{/*<img src={require('./img/qq.png')} alt="qq登录"/>*/}
{/*</a>*/}
{/*</div>*/}
{/*</p>*/}
{/**/}
{weixinlogin===true?<iframe
className={"weixinheight390 mt20"}
frameBorder="0"

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe TrustieHacksController, type: :controller do
end

@ -0,0 +1,15 @@
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the TrustieHacksHelper. For example:
#
# describe TrustieHacksHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe TrustieHacksHelper, type: :helper do
pending "add some examples to (or delete) #{__FILE__}"
end

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe HackUser, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe TrustieHack, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe TrustieHackathon, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end
Loading…
Cancel
Save