Skip to content

Commit

Permalink
feat: portfolio automation
Browse files Browse the repository at this point in the history
Based on: doubtfire-lms/doubtfire-web#307

Co-authored-by: Damian Colev <[email protected]>
Co-authored-by: Conor Blencowe <[email protected]>
  • Loading branch information
3 people committed Aug 30, 2022
1 parent 4eab693 commit b785d44
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ angular.module('doubtfire.units.states.edit.directives.unit-details-editor', [])
$scope.calOptions = {
startOpened: false
endOpened: false
portfolioAutoGenerationOpened: false
}

# Get docker images available for automated task assessment for the unit.
Expand All @@ -34,9 +35,15 @@ angular.module('doubtfire.units.states.edit.directives.unit-details-editor', [])
if pickerData == 'start'
$scope.calOptions.startOpened = ! $scope.calOptions.startOpened
$scope.calOptions.endOpened = false
else
$scope.calOptions.portfolioAutoGenerationOpened = false
else if pickerData == 'end'
$scope.calOptions.startOpened = false
$scope.calOptions.endOpened = ! $scope.calOptions.endOpened
$scope.calOptions.portfolioAutoGenerationOpened = false
else if pickerData == 'autogen'
$scope.calOptions.startOpened = false
$scope.calOptions.endOpened = false
$scope.calOptions.portfolioAutoGenerationOpened = ! $scope.calOptions.portfolioAutoGenerationOpened

$scope.dateOptions = {
formatYear: 'yy',
Expand All @@ -50,6 +57,8 @@ angular.module('doubtfire.units.states.edit.directives.unit-details-editor', [])
$scope.unit.start_date = "#{$scope.unit.start_date.getFullYear()}-#{$scope.unit.start_date.getMonth() + 1}-#{$scope.unit.start_date.getDate()}"
if $scope.unit.end_date && $scope.unit.end_date.getMonth
$scope.unit.end_date = "#{$scope.unit.end_date.getFullYear()}-#{$scope.unit.end_date.getMonth() + 1}-#{$scope.unit.end_date.getDate()}"
if $scope.unit.portfolio_auto_generation_date && $scope.unit.portfolio_auto_generation_date.getMonth
$scope.unit.portfolio_auto_generation_date = "#{$scope.unit.portfolio_auto_generation_date.getFullYear()}-#{$scope.unit.portfolio_auto_generation_date.getMonth() + 1}-#{$scope.unit.portfolio_auto_generation_date.getDate()}"

saveData = {
name: $scope.unit.name
Expand All @@ -61,6 +70,7 @@ angular.module('doubtfire.units.states.edit.directives.unit-details-editor', [])
enable_sync_timetable: $scope.unit.enable_sync_timetable
enable_sync_enrolments: $scope.unit.enable_sync_enrolments
draft_task_definition_id: $scope.unit.draft_task_definition_id
portfolio_auto_generation_date: $scope.unit.portfolio_auto_generation_date
allow_student_extension_requests: $scope.unit.allow_student_extension_requests
extension_weeks_on_resubmit_request: $scope.unit.extension_weeks_on_resubmit_request
allow_student_change_tutorial: $scope.unit.allow_student_change_tutorial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,34 @@ <h3 class="panel-title">Update Unit</h3>
</div>
<!--/end-date-->

<div class="form-group">
<label class="col-sm-2 control-label" for="portfolioautogenerationdate">Portfolio auto-generation date</label>
<div class="col-sm-9">
<div class="col-sm-4 input-group">
<input
datepicker-popup="{{format}}"
id="portfolioautogenerationdate"
type="text"
class="form-control"
ng-model="unit.portfolio_auto_generation_date"
is-open="calOptions.portfolioAutoGenerationOpened"
ng-required="false"
close-text="Close"
/>
<span class="input-group-btn">
<button
class="btn btn-default"
type="button"
ng-click="open($event,'autogen')"
>
<i class="fa fa-calendar"></i>
</button>
</span>
</div>
</div>
</div>
<!--/portfolio-auto-generation-date-->

<div class="form-group">
<label class="col-sm-2 control-label" for="enddate">Allow student extensions</label>
<div class="col-sm-9">
Expand Down

0 comments on commit b785d44

Please sign in to comment.