Skip to content

Commit

Permalink
Coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-csg committed Dec 16, 2024
1 parent 3d739dc commit d828324
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions classes/boardmanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ public function move_card(int $cardid, int $aftercard, int $columnid = 0): void
* @param int $columnid Id of the column
* @param int $cardid Id of the current card
* @param int $wiplimit WIP limit
* @param array $assignees Array of user ids that should be checked for WIP limit. If empty, checking will be done
* @param array $assignees Array of user ids that should be checked for WIP limit. If empty, checking will be done
* for the current assignees.
* @throws moodle_exception
*/
Expand Down Expand Up @@ -645,9 +645,9 @@ public function get_wip(int $columnid, int $userid, int $cardtoexclude = 0): int
global $DB;
$count = $DB->get_field_sql(
'SELECT COUNT(*)
FROM {kanban_card} c
INNER JOIN {kanban_assignee} a
ON a.kanban_card = c.id
FROM {kanban_card} c
INNER JOIN {kanban_assignee} a
ON a.kanban_card = c.id
WHERE a.userid = :userid AND c.kanban_column = :columnid AND c.id != :cardid',
['columnid' => $columnid, 'userid' => $userid, 'cardid' => $cardtoexclude]
);
Expand All @@ -673,7 +673,7 @@ public function assign_user(int $cardid, int $userid): void {
}

$DB->insert_record('kanban_assignee', ['kanban_card' => $cardid, 'userid' => $userid]);

$update = [
'id' => $cardid,
'timemodified' => time(),
Expand Down Expand Up @@ -944,11 +944,11 @@ public function update_card(int $cardid, array $data): void {
$column = $this->get_column($cardupdate['kanban_column']);
$options = json_decode($column->options);
$wiplimit = $options->wiplimit ?? 0;

if ($wiplimit > 0) {
self::check_wiplimit($cardupdate['kanban_column'], $cardid, $wiplimit, $toinsert);
}

foreach ($toinsert as $assignee) {
$assignees[] = ['kanban_card' => $cardid, 'userid' => $assignee];
$user = \core_user::get_user($assignee);
Expand Down
4 changes: 2 additions & 2 deletions classes/form/edit_column_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ public function definition() {
$wiparray[] = $mform->createElement('advcheckbox', 'wiplimitenable', get_string('wiplimitenable', 'kanban'));
$wiparray[] = $mform->createElement('text', 'wiplimit', get_string('wiplimit', 'kanban'), ['size' => '5']);
$mform->addGroup($wiparray, 'wipgroup', '', '', false);

$mform->setType('wiplimit', PARAM_INT);
$mform->setType('wiplimitenable', PARAM_BOOL);

$mform->disabledIf('wiplimit', 'wiplimitenable', 'notchecked');
}

Expand Down

0 comments on commit d828324

Please sign in to comment.