Skip to content

Commit 9638f3c

Browse files
committed
feat: add class model
1 parent 935ada8 commit 9638f3c

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

src/Entity/Klass.php

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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\Entity;
15+
16+
17+
class Klass extends OneRoster
18+
{
19+
20+
public static function find(String $id)
21+
{
22+
return parent::get("classes/$id");
23+
}
24+
25+
public static function enrollments(String $id)
26+
{
27+
return parent::get("classes/$id/enrollments");
28+
}
29+
30+
public static function events(String $id)
31+
{
32+
return parent::get("classes/$id/events/stats");
33+
}
34+
35+
public static function eventsForUser(String $id, String $userId)
36+
{
37+
return parent::get("classes/$id/events/user/$userId");
38+
}
39+
40+
public static function resultsForUser(String $id, String $userId)
41+
{
42+
return parent::get("classes/$id/results/user/$userId");
43+
}
44+
45+
public static function lineItems(String $id) {
46+
return parent::get("classes/$id/lineitems");
47+
}
48+
49+
}

0 commit comments

Comments
 (0)