diff --git a/app/models/course.rb b/app/models/course.rb index b3e62bb99..2f561bba7 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -92,7 +92,6 @@ class Course < ApplicationRecord where("name LIKE ?", "%#{keywords.split(" ").join('|')}%") unless keywords.blank? } scope :started, -> { where("start_date is null or start_date <= '#{Date.today}'") } - scope :no_jupyter, -> { where(is_jupyter: false) } # acts_as_taggable diff --git a/app/models/shixun.rb b/app/models/shixun.rb index 9522c54da..d8a41ba6a 100644 --- a/app/models/shixun.rb +++ b/app/models/shixun.rb @@ -83,6 +83,7 @@ class Shixun < ApplicationRecord scope :publiced, lambda{ where(public: 2) } scope :field_for_recommend, lambda{ select([:id, :name, :identifier, :myshixuns_count]) } scope :find_by_ids,lambda{|k| where(id:k)} + scope :no_jupyter, -> { where(is_jupyter: false) } after_create :send_tiding #同步到trustie diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index b24d4dc2c..25495010e 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -344,14 +344,20 @@ class Challengesjupyter extends Component { identifier:id }}).then((response) => { if(response.data.status===0){ - setTimeout(()=>{ this.setState({ jupyter_url :response.data.url, booljupyterurls:true, }) - },1000); + },500); this.props.showNotification('重置实训成功!'); + + setTimeout(()=>{ + this.setState({ + booljupyterurls:true, + }) + },1000); + } }); } @@ -557,7 +563,49 @@ class Challengesjupyter extends Component { { this.state.jupyter_url === null || this.state.jupyter_url === undefined ? - "" + enlarge===true? +
+ +
+
+

任务详情

+

(请将实训题目写在下方并保存)

+
+
+ { + enlarge===true? + this.onclki(false)}> + : + this.onclki(true)}> + } + + +
+

导入

+
+
+ + +
+ +
+
+ + :"" : ( admin===true||business===true||mysidentity===true? @@ -640,15 +688,20 @@ class Challengesjupyter extends Component { this.state.jupyter_url===null || this.state.jupyter_url===undefined? ( booljupyterurls===false? - - :"" +
+ +
+ :
+
) : - +
+ scrolling="no" id="frame" + name="framename" width="100%" height="700" frameBorder="0" + > +
+ } @@ -664,3 +717,4 @@ class Challengesjupyter extends Component { } export default Challengesjupyter; +