ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilLPStatusIndividualAssessment.php
Go to the documentation of this file.
1 <?php
2 
3 
4 require_once 'Services/Tracking/classes/class.ilLPStatus.php';
5 require_once 'Modules/IndividualAssessment/classes/LearningProgress/class.ilIndividualAssessmentLPInterface.php';
6 require_once 'Modules/IndividualAssessment/classes/Members/class.ilIndividualAssessmentMembers.php';
7 
9 {
10  public static function _getNotAttempted($a_obj_id)
11  {
13  $a_obj_id,
15  );
16  }
17 
18  public static function _getCountNotAttempted($a_obj_id)
19  {
20  return count(self::_getNotAttempted($a_obj_id));
21  }
22 
23  public static function _getCountInProgress($a_obj_id)
24  {
25  return count(self::_getInProgress($a_obj_id));
26  }
27 
28  public static function _getInProgress($a_obj_id)
29  {
31  $a_obj_id,
33  );
34  }
35 
36  public static function _getCountCompleted($a_obj_id)
37  {
38  return count(self::_getCompleted($a_obj_id));
39  }
40 
41  public static function _getCompleted($a_obj_id)
42  {
44  $a_obj_id,
46  );
47  }
48 
49  public static function _getCountFailed()
50  {
51  return count(self::_getFailed($a_obj_id));
52  }
53 
54  public static function _getFailed($a_obj_id)
55  {
57  $a_obj_id,
59  );
60  }
61 
62 
63  public function determineStatus($a_obj_id, $a_user_id, $a_obj = null)
64  {
65  switch ((string) ilIndividualAssessmentLPInterface::determineStatusOfMember($a_obj_id, $a_user_id)) {
67  return self::LP_STATUS_NOT_ATTEMPTED_NUM;
69  return self::LP_STATUS_IN_PROGRESS_NUM;
71  return self::LP_STATUS_FAILED_NUM;
73  return self::LP_STATUS_COMPLETED_NUM;
74  default:
75  return self::LP_STATUS_NOT_ATTEMPTED_NUM;
76  }
77  }
78 }
determineStatus($a_obj_id, $a_user_id, $a_obj=null)
Abstract class ilLPStatus for all learning progress modes E.g ilLPStatusManual, ilLPStatusObjectives ...