1 | <?php |
||
16 | class Toolbox extends \smtech\StMarksReflexiveCanvasLTI\Toolbox |
||
17 | { |
||
18 | const TOOL_CANVAS_EXTERNAL_TOOL_ID = 'TOOL_CANVAS_EXTERNAL_TOOL_ID'; |
||
19 | |||
20 | /** |
||
21 | * Course statistics history |
||
22 | * @var History |
||
23 | */ |
||
24 | protected $history; |
||
25 | |||
26 | /** |
||
27 | * Course statistics snapshots |
||
28 | * @var Statistic[] |
||
29 | */ |
||
30 | protected $snapshots; |
||
31 | |||
32 | /** |
||
33 | * Configure LTI configuration XML generator to include course and account |
||
34 | * navigation placements. |
||
35 | * |
||
36 | * {@inheritDoc} |
||
37 | * |
||
38 | * @return \smtech\LTI\Configuration\Generator |
||
39 | */ |
||
40 | public function getGenerator() |
||
57 | |||
58 | /** |
||
59 | * Extend load configuration to reset `TOOL_CANVAS_EXTERNAL_TOOL_ID` |
||
60 | * |
||
61 | * @param string $configFilePath |
||
62 | * @param boolean $forceRecache |
||
63 | * @return void |
||
64 | */ |
||
65 | protected function loadConfiguration($configFilePath, $forceRecache = false) |
||
73 | |||
74 | /** |
||
75 | * Get the course statistics history for a particular course |
||
76 | * |
||
77 | * @link https://smtech.github.io/grading-analytics/definitions.html Online |
||
78 | * documentation of course statistic fields |
||
79 | * |
||
80 | * @param string|integer $courseId Numerica Canvas course ID |
||
81 | * @return array|false One row per course statistic collected daily, as |
||
82 | * described in the documentation, or `FALSE` if no |
||
83 | * statistics are available |
||
84 | */ |
||
85 | public function getHistory($courseId) |
||
92 | |||
93 | /** |
||
94 | * Get a snapshot across a particular domain relevant to a course or |
||
95 | * department |
||
96 | * |
||
97 | * @link https://smtech.github.io/grading-analytics/definitions.html Online |
||
98 | * documentation of course statistic fields |
||
99 | * |
||
100 | * @param string|integer $courseOrDepartmentId A numeric Canvas course or |
||
101 | * ccount ID (course is is assumed unless explicitly specified by |
||
102 | * `$isCourseId`) |
||
103 | * @param Domain $domain Domain across which to take snapshot |
||
104 | * @param boolean $isCourseId (Optional, defaults to `TRUE`) whether or |
||
105 | * not `$courseOrDepartmentId` is a course |
||
106 | * (`TRUE`) or department (`FALSE`) Id |
||
107 | * @param string|integer|boolean $teacherFilter (Optional, defaults to |
||
108 | * `FALSE`) An optional filter |
||
109 | * to limit the snapshot data |
||
110 | * to courses taught by a |
||
111 | * particular numerica Canvas |
||
112 | * user ID |
||
113 | * @return array|false One row per course statistic collected daily, as |
||
114 | * described in the documentation, or `FALSE` if no |
||
115 | * statistics are available |
||
116 | */ |
||
117 | public function getSnapshot($courseOrDepartmentId, Domain $domain, $isCourseId = true, $teacherFilter = false) |
||
125 | } |
||
126 |