diff --git a/amd/src/report-viewer-components.js b/amd/src/report-viewer-components.js
index 679e384..c1da739 100644
--- a/amd/src/report-viewer-components.js
+++ b/amd/src/report-viewer-components.js
@@ -322,6 +322,7 @@ export default {
:line="line"
:plan="value"
:page="page"
+ :period="page.perioddesc[index-1]"
:guestmode='guestmode'
:teachermode='teachermode'
:layer="layeridx-1"
@@ -446,6 +447,10 @@ export default {
teachermode: {
type: Boolean,
default: false,
+ },
+ period: {
+ type: Object,
+ default(){ return null;},
}
},
mounted() {
@@ -469,6 +474,17 @@ export default {
}
return null;
},
+ current(){
+ if( this.period && this.period.startdate && this.period.enddate){
+ const now = new Date();
+ const pstart = new Date(this.period.startdate);
+ const pend = new Date(this.period.enddate);
+ return (now >= pstart && now < pend);
+ }
+ else {
+ return false;
+ }
+ }
},
data() {
return {
@@ -478,7 +494,7 @@ export default {
},
template: `
-
0){
@@ -596,6 +601,7 @@ export default {
this.editdata.aggregation_config = JSON.stringify(this.aggregation_parsed[this.editdata.aggregation]);
}
objCopy(args,this.editdata,STUDYPLAN_EDITOR_FIELDS);
+ objCopy(args,this.editdata,STUDYPLAN_EDITOR_PAGE_FIELDS);
call([{
methodname: method,
@@ -609,7 +615,7 @@ export default {
shortname: '',
description: '',
context_id: 1,
- slots : 4,
+ periods : 4,
startdate: (new Date()).getFullYear() + '-08-01',
enddate: ((new Date()).getFullYear()+1) + '-08-01',
aggregation: 'bistate',
@@ -685,7 +691,7 @@ export default {
{{ text.studyplan_slots}}
-
+
@@ -1859,6 +1865,17 @@ export default {
},
courseHoverDummy(){
return {course: this.hover.component};
+ },
+ current(){
+ if( this.period && this.period.startdate && this.period.enddate){
+ const now = new Date();
+ const pstart = new Date(this.period.startdate);
+ const pend = new Date(this.period.enddate);
+ return (now >= pstart && now < pend);
+ }
+ else {
+ return false;
+ }
}
},
data() {
@@ -2041,7 +2058,8 @@ export default {
}
},
template: `
- = pstart && now < pend);
+ }
+ else {
+ return false;
+ }
}
+
},
data() {
return {
};
},
template: `
-