-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tutoren können Sichtbarkeit nicht ändern -- fix-360 (#366)
* Implemented switch to allow tutor editing episodes * Using only one querry
- Loading branch information
Showing
4 changed files
with
38 additions
and
6 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
class AddTutorEpisodePerm extends Migration | ||
{ | ||
|
||
function up() | ||
{ | ||
$db = DBManager::get(); | ||
|
||
$stmt = $db->prepare('INSERT IGNORE INTO config (field, value, section, type, `range`, mkdate, chdate, description) | ||
VALUES (:name, :value, :section, :type, :range, UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), :description)'); | ||
$stmt->execute([ | ||
'name' => 'OPENCAST_TUTOR_EPISODE_PERM', | ||
'section' => 'opencast', | ||
'description' => 'Sollen Tutoren Rechte für das Bearbeiten der Episoden haben?', | ||
'range' => 'global', | ||
'type' => 'boolean', | ||
'value' => false | ||
]); | ||
|
||
SimpleOrMap::expireTableScheme(); | ||
} | ||
|
||
function down() | ||
{ | ||
$db = DBManager::get(); | ||
|
||
$db->exec("DELETE FROM config WHERE field = 'OPENCAST_TUTOR_EPISODE_PERM'"); | ||
} | ||
|
||
} |
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