-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #749 from SlateFoundation/develop
Release: v3.8.6
- Loading branch information
Showing
14 changed files
with
246 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
php-migrations/Slate/CBL/Tasks/20221128000000_purge-task-shared.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
namespace Slate\CBL\Tasks; | ||
|
||
use DB; | ||
|
||
$tableName = Task::$tableName; | ||
$historyTableName = 'history_'.$tableName; | ||
|
||
$columnName = 'Shared'; | ||
|
||
|
||
// skip conditions | ||
if (!static::tableExists($tableName) || !static::getColumn($tableName, $columnName)) { | ||
return static::STATUS_SKIPPED; | ||
} | ||
|
||
// update table | ||
printf("Removing column `%s`.`%s`", $tableName, $columnName); | ||
DB::nonQuery( | ||
'ALTER TABLE `%1$s` DROP COLUMN `%2$s`', | ||
[ | ||
$tableName, | ||
$columnName | ||
] | ||
); | ||
|
||
// update history table | ||
printf("Removing column `%s`.`%s`", $historyTableName, $columnName); | ||
DB::nonQuery( | ||
'ALTER TABLE `%1$s` DROP COLUMN `%2$s`', | ||
[ | ||
$historyTableName, | ||
$columnName | ||
] | ||
); | ||
|
||
return static::STATUS_EXECUTED; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
static-webapps/slate-portfolio-manager/src/components/sidebar/NewLevelPanel.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<template> | ||
<div | ||
:class="`level-panel -new mb-2 cbl-level-${Level}`" | ||
> | ||
<b-container class="bg-cbl-level-25"> | ||
<b-row class="py-2 align-items-center"> | ||
<b-col> | ||
<h3 class="h6 m-0 text-muted"> | ||
Year {{ Level }} | ||
</h3> | ||
</b-col> | ||
<b-col cols="4"> | ||
<button | ||
class="btn btn-primary btn-sm float-right" | ||
@click="createLevel" | ||
> | ||
Enroll | ||
</button> | ||
</b-col> | ||
</b-row> | ||
</b-container> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import client from '@/store/client'; | ||
import emitter from '@/store/emitter'; | ||
export default { | ||
props: { | ||
Level: { | ||
type: Number, | ||
default: () => null, | ||
}, | ||
StudentID: { | ||
type: Number, | ||
default: () => null, | ||
}, | ||
CompetencyID: { | ||
type: Number, | ||
default: () => null, | ||
}, | ||
}, | ||
methods: { | ||
createLevel() { | ||
const { StudentID, CompetencyID, Level } = this; | ||
const data = [ | ||
{ | ||
StudentID, | ||
CompetencyID, | ||
Level, | ||
EnteredVia: 'enrollment', | ||
ID: -1, | ||
Class: 'Slate\\CBL\\StudentCompetency', | ||
BaselineRating: null, | ||
}, | ||
]; | ||
const url = '/cbl/student-competencies/save'; | ||
const refetch = () => emitter.emit('update-store', { StudentID, CompetencyID }); | ||
client.post(url, { data }).then(refetch); | ||
}, | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.