Fixed 0 periods plan
This commit is contained in:
parent
17d159ac6a
commit
9fee6fb8b5
4 changed files with 13 additions and 8 deletions
2
amd/build/studyplan-editor-components.min.js
vendored
2
amd/build/studyplan-editor-components.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -688,7 +688,7 @@ export default {
|
||||||
},
|
},
|
||||||
numberFilter(value){
|
numberFilter(value){
|
||||||
return value;
|
return value;
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
template:
|
template:
|
||||||
|
@ -749,7 +749,12 @@ export default {
|
||||||
<b-row>
|
<b-row>
|
||||||
<b-col cols="4">{{ text.studyplan_slots}}</b-col>
|
<b-col cols="4">{{ text.studyplan_slots}}</b-col>
|
||||||
<b-col cols="8">
|
<b-col cols="8">
|
||||||
<b-form-input type=number v-model="editdata.periods"></b-form-input>
|
<b-form-input
|
||||||
|
min="1"
|
||||||
|
type="number"
|
||||||
|
no-wheel
|
||||||
|
v-model="editdata.periods"
|
||||||
|
></b-form-input>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
<b-row>
|
<b-row>
|
||||||
|
|
|
@ -234,10 +234,10 @@ class studyplanpage {
|
||||||
$info[$f] = $fields[$f];
|
$info[$f] = $fields[$f];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isset($addable['periods'])) {
|
if (!isset($info['periods'])) {
|
||||||
$addable['periods'] = 4;
|
$info['periods'] = 4;
|
||||||
} else if ($addable['periods'] < 1) {
|
} else if ($info['periods'] < 1) {
|
||||||
$addable['periods'] = 1;
|
$info['periods'] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = $DB->insert_record(self::TABLE, $info);
|
$id = $DB->insert_record(self::TABLE, $info);
|
||||||
|
|
Loading…
Reference in a new issue