File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /**
4+ *
5+ * Class entity
6+ *
7+ * @copyright Apereo
8+ * @category OpenLRW
9+ * @package Entity
10+ * @author Xavier Chopin <bonjour@xavierchop.in>
11+ * @license http://www.osedu.org/licenses/ECL-2.0 ECL-2.0 License
12+ */
13+
14+ namespace OpenLRW \Model ;
15+
16+
17+ class Klass extends OneRoster
18+ {
19+ protected static $ collection = 'classes ' ;
20+
21+ // ToDo
22+ protected $ fillable = [
23+ 'sourcedId ' ,
24+ 'status ' ,
25+ 'metadata ' ,
26+ 'lineItem '
27+ ];
28+
29+ public static function enrollments (String $ id )
30+ {
31+ return parent ::get ("classes/ $ id/enrollments " );
32+ }
33+
34+ public static function events (String $ id )
35+ {
36+ return parent ::get ("classes/ $ id/events/stats " );
37+ }
38+
39+ public static function eventsForUser (String $ id , String $ userId )
40+ {
41+ return parent ::get ("classes/ $ id/events/user/ $ userId " );
42+ }
43+
44+ public static function resultsForUser (String $ id , String $ userId )
45+ {
46+ return parent ::get ("classes/ $ id/results/user/ $ userId " );
47+ }
48+
49+ public static function lineItems (String $ id ) {
50+ return parent ::get ("classes/ $ id/lineitems " );
51+ }
52+
53+ }
You can’t perform that action at this time.
0 commit comments