personal_stats.php 746 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /* See license terms in /license.txt */
  3. require_once __DIR__.'/../inc/global.inc.php';
  4. $categoryId = isset($_GET['selectcat']) ? intval($_GET['selectcat']) : false;
  5. if (empty($categoryId)) {
  6. api_not_allowed(false);
  7. }
  8. $userId = api_get_user_id();
  9. $cats = Category::load($categoryId);
  10. if (isset($cats[0])) {
  11. $cat = $cats[0];
  12. }
  13. $allcat = $cats[0]->get_subcategories($userId, api_get_course_id(), api_get_session_id());
  14. $alleval = $cats[0]->get_evaluations($userId);
  15. $alllink = $cats[0]->get_links($userId);
  16. $gradebooktable = new GradebookTable(
  17. $cat,
  18. $allcat,
  19. $alleval,
  20. $alllink,
  21. [],
  22. false
  23. );
  24. $gradebooktable->userId = $userId;
  25. $table = $gradebooktable->return_table();
  26. echo $gradebooktable->getGraph();