Skip to content

Commit

Permalink
adds user contexts to user userevents.
Browse files Browse the repository at this point in the history
this is gnarly, but i can't think of a less invasive way to weave these
data points in that doesn't involve substantial refactoring of the whole
process.
  • Loading branch information
stopfstedt committed Mar 27, 2024
1 parent 5b28ee6 commit e056dc9
Show file tree
Hide file tree
Showing 4 changed files with 190 additions and 57 deletions.
5 changes: 5 additions & 0 deletions src/Classes/CalendarEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ class CalendarEvent
#[IA\Expose]
#[IA\Type('array')]
public array $courseTerms = [];

#[IA\Expose]
#[IA\Type('array<string>')]
public array $userContexts = [];

/**
* Clean out all the data for draft or scheduled events
*
Expand Down
22 changes: 22 additions & 0 deletions src/Classes/CalendarEventUserContext.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

declare(strict_types=1);

namespace App\Classes;

/**
* Constant interface, defines all the user contexts for calendar events.
* @package App\Classes
*/
interface CalendarEventUserContext
{
public const LEARNER = 'learner';

public const INSTRUCTOR = 'instructor';

public const COURSE_DIRECTOR = 'course director';

public const COURSE_ADMINISTRATOR = 'course administrator';

public const SESSION_ADMINISTRATOR = 'session administrator';
}

0 comments on commit e056dc9

Please sign in to comment.