1: <?php
2:
3: global $bright_embedder_templates;
4:
5: $bright_embedder_templates['bright_results_matrix'] = <<<EOF
6: <div class="bright-results-matrix">
7: <table class="bright-results-matrix">
8: <thead>
9: <th>Learner</th>
10: <th>Course</th>
11: <th>Complete</th>
12: <th>Success</th>
13: <th>Score</th>
14: <th>Completed At</th>
15: </thead>
16: {{#each this.custom}}
17: <tr>
18: <td>{{this.[0]}}</td>
19: <td>{{this.[1]}}</td>
20: <td>{{this.[2]}}</td>
21: <td>{{this.[3]}}</td>
22: <td>{{this.[4]}}</td>
23: <td>{{this.[5]}}</td>
24: </tr>
25: {{/each}}
26: </table>
27: </div>
28: EOF;
29:
30: add_filter('bright_extend_on_courselist','bright_results_matrix',1,2);
31:
32: function bright_results_matrix($coursedata,$attr) {
33: return ($attr['template'] == "bright_results_matrix") ? bright_run_stored_query('bright_completion_matrix','') : $coursedata;
34: }
35:
36: