GitHub PullRequestReviewCommentEvent at 2014-09-22 20:31:36
Repository: moodle-block_intelligent_learning
Actor: avinashkellucian
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/pulls/comments/17875971","id":17875971,"diff_hunk":"@@ -479,4 +479,908 @@ private function update($user, $data = NULL) {\n             }\n         }\n     }\n+\t\n+\t\n+\t//////////////////////////////////////NEW ILP API starts here/////////////////////////////////////////////////////////////\n+\t\n+\n+  /**\n+\t* Test function to test connectivity from ILP\n+\t* \n+\t* @return array\n+\t*/\n+\tpublic function aboutMoodle() {\n+\t\t\n+\t\t$result['Version'] = $CFG->version;\n+\t\t//die( \"  \"+var_export($result));\n+\t\treturn $result;\n+\t}\n+\n+\n+\n+\t /**\n+     * Get courses where user is enrolled with these roles.\n+     *\n+     * @param integer $userid\n+     * @paramt integer $startdate - Is used to filter by startdate course (date in timestamp)\n+     * @return array\n+     */\n+    private static function get_courses_where_user_is_enrolled($userid, $startdate = null){\n+\n+        global $DB;\n+        $field_courseid = 'idnumber';\n+        $result = array();\n+\t\t$roles_enrolled = self::get_student_roleid();\n+\t\t\n+        \n+        $sql_param['userid'] = $userid;\n+        $sql_param['contextcourse'] = CONTEXT_COURSE;\n+       \tlist($usql, $sql_param_in) = $DB->get_in_or_equal($roles_enrolled, SQL_PARAMS_NAMED);\n+        $sql_param = array_merge($sql_param,$sql_param_in);\n+\t\t\n+        $sql = \"SELECT c.id , c.{$field_courseid}\n+        \t\t  FROM {course} c\n+        \t\t  JOIN {context} ctx ON c.id = ctx.instanceid\n+                  JOIN {role_assignments} ra ON ra.contextid = ctx.id\n+                  JOIN {user} u ON u.id = ra.userid\n+                 WHERE u.idnumber = :userid\n+                   AND ctx.contextlevel = :contextcourse\n+                   AND ra.roleid $usql\";\n+\t\t\n+        $istartdate = (int)$startdate;\n+        if($istartdate > 0) {\n+            $sql_param['startdate'] = $startdate;\n+            $sql .= ' AND c.startdate <= :startdate ';\n+        }\n+\n+        $result = $DB->get_records_sql($sql, $sql_param);\n+        return $result;\n+\n+    }\n+\n+\t/**\n+\t* Get activities from users in  selected\n+\t*\n+\t* @param array   $studentIds\n+\t* @param integer $startdate - timestamp\n+\t* @param integer $enddate - timestamp\n+\t*\n+\t* @return array\n+\t*/\n+\tpublic function get_user_activities($studentIds, $startDate = null, $endDate = null) {\n+\n+\t\tglobal $DB;\n+\t\t\n+\t\t//die(var_export($courses, false));\n+\t\t$results = array ();\n+\t\t$userids = array ();\n+\n+\t\tif (strlen($studentIds) > 0) {\n+\t\t\t//add quotes to incoming list\n+\t\t\t$userids = explode(\",\", $studentIds);\n+\t\t}\n+\t\n+\n+\t\tforeach ($userids as $userid) {\n+\t\t\t$sections = self :: get_courses_where_user_is_enrolled($userid , $startDate);\n+\t\t\t//die(var_export($sections, false));\n+\t\t\tforeach ($sections as $section){\n+\t\t\t$result = array ();\n+\t\t\t$courses = array();\n+\t\t\t$courses[] = $section->id;\n+\t\t\t//die(var_export($courses , true));\n+\t\t\t$sql_param = array ();\n+\t\t\t$sql_param['userid'] = $userid;\n+\n+\t\t\t$sql = \"SELECT u.id,\n+\t\t\t        \t\t\t   u.idnumber as sourcedid,\n+\t\t\t                       u.firstname,\n+\t\t\t                       u.lastname,\n+\t\t\t                       u.email\n+\t\t\t                  FROM {user} u\n+\t\t\t                  WHERE u.idnumber = :userid\";\n+\n+\t\t\t$user = $DB->get_record_sql($sql, $sql_param);\n+\n+\t\t\tif (empty ($user)) {\n+\t\t\t\treturn $result;\n+\t\t\t}\n+\n+\t\t\t$result['id'] = $user->id;\n+\t\t\t$result['sourcedid'] = $user->sourcedid;\n+\t\t\t$result['courseid'] = $section->idnumber;\n+\t\t\t$result['firstname'] = $user->firstname;\n+\t\t\t$result['lastname'] = $user->lastname;\n+\t\t\t$result['email'] = $user->email;\n+\n+\t\t\t$result['AssessmentsBegun'] = self :: get_count_assessments_begun($user->id, $courses, $startDate, $endDate);\n+\t\t\t$result['AssessmentsFinished'] = self :: get_count_assessments_finished($user->id, $courses, $startDate, $endDate);\n+\n+\t\t\t$result['AssignmentsRead'] = self :: get_assignments_read($user->id, $courses, $startDate, $endDate);\n+\t\t\t$result['AssignmentsSubmitted'] = self :: get_assignments_submissions($user->id, $courses, $startDate, $endDate);\n+\n+\t\t\t$result['ContentPagesViewed'] = self :: get_count_contentpages_viewed($user->id, $courses, $startDate, $endDate);\n+\n+\t\t\t$result['DiscussionPostsCreated'] = self :: get_count_forum_posts($user->id, $courses, $startDate, $endDate);\n+\t\t\t$result['DiscussionPostsRead'] = self :: get_count_forum_posts_read($user->id, $courses, $startDate, $endDate);\n+\n+\t\t\t$result['NumberCMSSessions'] = self :: get_count_sessions($user->id, $courses, $startDate, $endDate);\n+\n+\t\t\t$result['CalendarEntriesAdded'] = self :: get_count_calendar_added($user->id, $courses, $startDate, $endDate);\n+\t\t\t\n+\t\t\t\n+\t\t\t//die(var_export($result , true));\n+\t\t\t$results[] = array (\n+\t\t\t\t'activity' => $result\n+\t\t\t);\n+\t\t\t}\n+\t\t}\n+\n+\t\treturn $this->response->standard($results);\n+\n+\t}\n+\n+\t/**\n+\t * Get Total number of calendar entries added\n+\t * @param int   $userid\n+\t * @param int[] $courses\n+\t * @param int   $startdate\n+\t * @param int   $enddate\n+\t * @return int\n+\t */\n+\tprivate static function get_count_calendar_added($userid, array $courses, $startdate = null, $enddate = null) {\n+\t\tglobal $DB;\n+\t\t$sql_param = array ();\n+\t\tlist ($user_sql, $sql_param1) = $DB->get_in_or_equal($userid, SQL_PARAMS_NAMED);\n+\t\t$sql_param = array_merge($sql_param, $sql_param1);\n+\t\t$select = \"(userid $user_sql)\";\n+\t\t$select .= \" AND (module='calendar') AND (action='add')\";\n+\t\tif (empty ($courses)) {\n+\t\t\tlist ($course_sql, $sql_param2) = $DB->get_in_or_equal($courses, SQL_PARAMS_NAMED);\n+\t\t\t$sql_param = array_merge($sql_param, $sql_param2);\n+\t\t\t$select .= \" AND (course $course_sql)\";\n+\t\t}\n+\t\tif ($startdate !== null) {\n+\t\t\t$sql_param['startdate'] = $startdate;\n+\t\t\t$select .= \" AND (time >= :startdate)\";\n+\t\t}\n+\t\tif (($enddate !== null) && ($enddate >= $startdate)) {\n+\t\t\t$sql_param['enddate'] = $enddate +DAYSECS;\n+\t\t\t$select .= \" AND (time < :enddate)\";\n+\t\t}\n+\n+\t\t$result = $DB->count_records_select('log', $select, $sql_param);\n+\t\treturn $result;\n+\t}\n+\n+\t\n+\t/**\n+\t* Get count of assessments begun by user in course/s\n+\t*\n+\t* @param integer $userid\n+\t* @param array $courses\n+\t* @param integer $startdate - timestamp\n+\t* @param integer $enddate - timestamp\n+\t*\n+\t* @return integer\n+\t*/\n+\tprivate static function get_count_assessments_begun($userid, array $courses, $startdate = null, $enddate = null) {\n+\n+\t\tglobal $DB;\n+\n+\t\t$sql_param = array ();\n+\t\t$sql_param['userid'] = $userid;\n+\n+\t\tlist ($course_sql, $sql_param2) = $DB->get_in_or_equal($courses, SQL_PARAMS_NAMED);\n+\t\t$sql_param = array_merge($sql_param, $sql_param2);\n+\n+\t\t$sql = \"SELECT COUNT(DISTINCT(qa.quiz))\n+\t\t                        FROM {quiz} q\n+\t\t                        JOIN {quiz_attempts} qa ON q.id = qa.quiz\n+\t\t                \t   WHERE q.course $course_sql\n+\t\t                         AND qa.userid = :userid\";\n+\n+\t\tif ($startdate !== null) {\n+\t\t\t$sql_param['startdate'] = $startdate;\n+\t\t\t$sql .= \" AND qa.timestart >= :startdate\";\n+\t\t}\n+\t\tif (($enddate !== null) && ($enddate >= $startdate)) {\n+\t\t\t$sql_param['enddate'] = $enddate +DAYSECS;\n+\t\t\t$sql .= \" AND qa.timestart < :enddate\";\n+\t\t}\n+\n+\t\treturn $DB->count_records_sql($sql, $sql_param);\n+\n+\t}\n+\n+\t/**\n+\t* Get count of assessments finished by user in course/s\n+\t*\n+\t* @param integer $userid\n+\t* @param array $courses\n+\t* @param integer $startdate - timestamp\n+\t* @param integer $enddate - timestamp\n+\t*\n+\t* @return integer\n+\t*/\n+\tprivate static function get_count_assessments_finished($userid, array $courses, $startdate = null, $enddate = null) {\n+\n+\t\tglobal $DB;\n+\n+\t\t$sql_param = array ();\n+\t\t$sql_param['userid'] = $userid;\n+\t\tlist ($course_sql, $sql_param2) = $DB->get_in_or_equal($courses, SQL_PARAMS_NAMED);\n+\t\t$sql_param = array_merge($sql_param, $sql_param2);\n+\n+\t\t$sql = \"SELECT COUNT(*)\n+\t\t                        FROM {quiz} q\n+\t\t                        JOIN {quiz_grades} qg ON qg.quiz = q.id\n+\t\t                \t   WHERE q.course $course_sql\n+\t\t                         AND qg.userid = :userid\";\n+\n+\t\tif ($startdate !== null) {\n+\t\t\t$sql_param['startdate'] = $startdate;\n+\t\t\t$sql .= \" AND qg.timemodified >= :startdate\";\n+\t\t}\n+\t\tif (($enddate !== null) && ($enddate >= $startdate)) {\n+\t\t\t$sql_param['enddate'] = $enddate +DAYSECS;\n+\t\t\t$sql .= \" AND qg.timemodified < :enddate\";\n+\t\t}\n+\n+\t\treturn $DB->count_records_sql($sql, $sql_param);\n+\t}\n+\n+\t/**\n+\t * Get count of assignments submitted by user in course/s\n+\t *\n+\t * @param integer $userid\n+\t * @param array $courses\n+\t * @param integer $startdate - timestamp\n+\t * @param integer $enddate - timestamp\n+\t *\n+\t * @return integer\n+\t */\n+\tprivate static function get_assignments_submissions($userid, array $courses, $startdate = null, $enddate = null) {\n+\n+\t\tglobal $DB;\n+\n+\t\t$sql_param = array ();\n+\t\t$sql_param['userid'] = $userid;\n+\t\tlist ($course_sql, $sql_param2) = $DB->get_in_or_equal($courses, SQL_PARAMS_NAMED);\n+\t\t$sql_param = array_merge($sql_param, $sql_param2);\n+\n+\t\t$sql = \"SELECT COUNT(*)\n+\t\t                \t\t  FROM {assign} a\n+\t\t        \t\t          JOIN {assign_submission} asub ON a.id = asub.assignment\n+\t\t                         WHERE a.course $course_sql\n+\t\t                           AND asub.userid = :userid\";\n+\n+\t\tif ($startdate !== null) {\n+\t\t\t$sql_param['startdate'] = $startdate;\n+\t\t\t$sql .= \" AND asub.timecreated >= :startdate\";\n+\t\t}\n+\t\tif (($enddate !== null) && ($enddate >= $startdate)) {\n+\t\t\t$sql_param['enddate'] = $enddate +DAYSECS;\n+\t\t\t$sql .= \" AND asub.timecreated < :enddate\";\n+\t\t}\n+\n+\t\treturn $DB->count_records_sql($sql, $sql_param);\n+\t}\n+\n+\t/**\n+\t* Get count of assignments readed by user in course/s\n+\t*\n+\t* @param integer $userid\n+\t* @param array $courses\n+\t* @param integer $startdate - timestamp\n+\t* @param integer $enddate - timestamp\n+\t*\n+\t* @return integer\n+\t*/\n+\tprivate static function get_assignments_read($userid, array $courses, $startdate = null, $enddate = null) {\n+\n+\t\tglobal $DB;\n+\n+\t\t$sql_param = array ();\n+\t\t$sql_param['userid'] = $userid;\n+\t\tlist ($course_sql, $sql_param2) = $DB->get_in_or_equal($courses, SQL_PARAMS_NAMED);\n+\t\t$sql_param = array_merge($sql_param, $sql_param2);\n+\n+\t\t$sql = \"SELECT COUNT(DISTINCT(cmid))\n+\t\t                        FROM {log} l\n+\t\t                \t   WHERE l.course $course_sql\n+\t\t                \t     AND l.module = 'assign'\n+\t\t                \t     AND l.action = 'view'\n+\t\t                         AND l.userid = :userid\";\n+\n+\t\tif ($startdate !== null) {\n+\t\t\t$sql_param['startdate'] = $startdate;\n+\t\t\t$sql .= \" AND l.time >= :startdate\";\n+\t\t}\n+\t\tif (($enddate !== null) && ($enddate >= $startdate)) {\n+\t\t\t$sql_param['enddate'] = $enddate +DAYSECS;\n+\t\t\t$sql .= \" AND l.time < :enddate\";\n+\t\t}\n+\n+\t\treturn $DB->count_records_sql($sql, $sql_param);\n+\t}\n+\n+\t/**\n+\t* Get count of content pages viewed by user in course/s\n+\t*\n+\t* @param integer $userid\n+\t* @param array $courses\n+\t* @param integer $startdate - timestamp\n+\t* @param integer $enddate - timestamp\n+\t*\n+\t* @return integer\n+\t*/\n+\tprivate static function get_count_contentpages_viewed($userid, array $courses, $startdate = null, $enddate = null) {\n+\n+\t\tglobal $DB;\n+\n+\t\t$sql_param = array ();\n+\t\t$sql_param['userid'] = $userid;\n+\t\tlist ($course_sql, $sql_param2) = $DB->get_in_or_equal($courses, SQL_PARAMS_NAMED);\n+\t\t$sql_param = array_merge($sql_param, $sql_param2);\n+\n+\t\t$sql = \"SELECT COUNT(DISTINCT(cmid))\n+\t\t                                FROM {log} l\n+\t\t                                JOIN {modules} m ON m.name = l.module\n+\t\t                                JOIN {course_modules} cm ON cm.module = m.id AND cm.id = l.cmid\n+\t\t                        \t   WHERE cm.course $course_sql\n+\t\t                        \t     AND l.action LIKE '%view%'\n+\t\t                                 AND l.userid = :userid\";\n+\n+\t\tif ($startdate !== null) {\n+\t\t\t$sql_param['startdate'] = $startdate;\n+\t\t\t$sql .= \" AND l.time >= :startdate\";\n+\t\t}\n+\t\tif (($enddate !== null) && ($enddate >= $startdate)) {\n+\t\t\t$sql_param['enddate'] = $enddate +DAYSECS;\n+\t\t\t$sql .= \" AND l.time < :enddate\";\n+\t\t}\n+\n+\t\treturn $DB->count_records_sql($sql, $sql_param);\n+\t}\n+\n+\t/**\n+\t* Get count of posts in forum created by user in course/s\n+\t*\n+\t* @param integer $userid\n+\t* @param array $courses\n+\t* @param integer $startdate - timestamp\n+\t* @param integer $enddate - timestamp\n+\t*\n+\t* @return integer\n+\t*/\n+\tprivate static function get_count_forum_posts($userid, array $courses, $startdate = null, $enddate = null) {\n+\n+\t\tglobal $DB;\n+\n+\t\t$sql_param = array ();\n+\t\t$sql_param['userid'] = $userid;\n+\t\tlist ($course_sql, $sql_param2) = $DB->get_in_or_equal($courses, SQL_PARAMS_NAMED);\n+\t\t$sql_param = array_merge($sql_param, $sql_param2);\n+\n+\t\t$sql = \"SELECT COUNT(*)\n+\t\t            \t\t  FROM {forum_posts} fp\n+\t\t    \t\t          JOIN {forum_discussions} fd ON fd.id = fp.discussion\n+\t\t                     WHERE fd.course $course_sql\n+\t\t                       AND fp.userid = :userid\";\n+\n+\t\tif ($startdate !== null) {\n+\t\t\t$sql_param['startdate'] = $startdate;\n+\t\t\t$sql .= \" AND fp.created >= :startdate\";\n+\t\t}\n+\t\tif (($enddate !== null) && ($enddate >= $startdate)) {\n+\t\t\t$sql_param['enddate'] = $enddate +DAYSECS;\n+\t\t\t$sql .= \" AND fp.created < :enddate\";\n+\t\t}\n+\n+\t\treturn $DB->count_records_sql($sql, $sql_param);\n+\t}\n+\n+\t/**\n+\t* Get count of posts in forum readed by user in course/s\n+\t*\n+\t* @param integer $userid\n+\t* @param array $courses\n+\t* @param integer $startdate - timestamp\n+\t* @param integer $enddate - timestamp\n+\t*\n+\t* @return integer\n+\t*/\n+\tprivate static function get_count_forum_posts_read($userid, array $courses, $startdate = null, $enddate = null) {\n+\n+\t\tglobal $DB;\n+\n+\t\t$sql_param = array ();\n+\t\t$sql_param['userid'] = $userid;\n+\t\tlist ($course_sql, $sql_param2) = $DB->get_in_or_equal($courses, SQL_PARAMS_NAMED);\n+\t\t$sql_param = array_merge($sql_param, $sql_param2);\n+\n+\t\t$sql = \"SELECT COUNT(DISTINCT(info))\n+\t\t                            FROM {log} l\n+\t\t                    \t   WHERE l.course $course_sql\n+\t\t                    \t     AND l.module = 'forum'\n+\t\t                    \t     AND l.action = 'view discussion'\n+\t\t                             AND l.userid = :userid\";\n+\n+\t\tif ($startdate !== null) {\n+\t\t\t$sql_param['startdate'] = $startdate;\n+\t\t\t$sql .= \" AND l.time >= :startdate\";\n+\t\t}\n+\t\tif (($enddate !== null) && ($enddate >= $startdate)) {\n+\t\t\t$sql_param['enddate'] = $enddate +DAYSECS;\n+\t\t\t$sql .= \" AND l.time < :enddate\";\n+\t\t}\n+\n+\t\treturn $DB->count_records_sql($sql, $sql_param);\n+\t}\n+\n+\t/**\n+\t* Get count of sessions login by user in moodle\n+\t*\n+\t* @param integer $userid\n+\t* @param array $courses\n+\t* @param integer $startdate - timestamp\n+\t* @param integer $enddate - timestamp\n+\t*\n+\t* @return integer\n+\t*/\n+\tprivate static function get_count_sessions($userid, $courses, $startdate = null, $enddate = null) {\n+\n+\t\tglobal $DB;\n+\n+\t\t$sqlr = array (\n+\t\t\t'userid' => $userid,\n+\t\t\t'course' => $courses,\n+\t\t\t'module' => 'course',\n+\t\t\t'action' => 'view',\n+\t\t\t\n+\t\t);\n+\t\t$sql_params = array ();\n+\t\t$where = '';\n+\t\tforeach ($sqlr as $param => $value) {\n+\t\t\tif (empty ($value)) {\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\t\t\tlist ($where_sql, $sql_param) = $DB->get_in_or_equal($value, SQL_PARAMS_NAMED);\n+\t\t\t$sql_params = array_merge($sql_params, $sql_param);\n+\t\t\tif (!empty ($where)) {\n+\t\t\t\t$where .= ' AND';\n+\t\t\t}\n+\t\t\t$where .= \" {$param} {$where_sql}\";\n+\t\t}\n+\n+\t\tif ($startdate !== null) {\n+\t\t\t$sql_params['startdate'] = $startdate;\n+\t\t\t$where .= \" AND time >= :startdate\";\n+\t\t}\n+\t\tif (($enddate !== null) && ($enddate >= $startdate)) {\n+\t\t\t$sql_params['enddate'] = $enddate +DAYSECS;\n+\t\t\t$where .= \" AND time < :enddate\";\n+\t\t}\n+\t\treturn $DB->count_records_select('log', $where, $sql_params);\n+\t}\n+\t\n+\t\n+\tprivate static function get_student_roleid() {\n+\n+\t\tglobal $DB;\n+\n+\t\t$sql = \"select r.id from \n+\t\t                    {role} r\n+\t\t                where \n+\t\t                    r.shortname ='student'\";\n+\t\t$data = $DB->get_records_sql($sql);\n+\t\t\n+\t\t$response = array ();\n+\n+\t\tforeach ($data as $item) {\n+\t\t\t$response = $item->id;\n+\t\t}\n+\t\t\n+\t\treturn $response;\n+\n+\t}\n+\t\n+\t/**\n+\t* Get teh moodle id for a given set of course id numbers\n+\t*\n+\t* @param $sectionsourcedIds section id number\n+\t*\n+\t* @return integer\n+\t*/\n+\n+\tprivate static function get_courseid_from_idnumber($sectionsourcedIds) {\n+\n+\t\tglobal $DB;\n+\n+\t\tif (strlen($sectionsourcedIds) > 0) {\n+\t\t\t//add quotes to incoming list\n+\t\t\t$SectionIdList = explode(\",\", $sectionsourcedIds);\n+\t\t\t$firstInList = true;\n+\t\t\t$SectionOutput = \"\";\n+\t\t\tforeach ($SectionIdList as $id) {\n+\t\t\t\tif ($firstInList) {\n+\t\t\t\t\t$firstInList = false;\n+\t\t\t\t} else {\n+\t\t\t\t\t$SectionOutput .= \",\";\n+\t\t\t\t}\n+\n+\t\t\t\t$SectionOutput .= \"'\" . clean_param($id, PARAM_TEXT) . \"'\";\n+\t\t\t}\n+\t\t}\n+\n+\t\t$sql = \"select c.id from \n+\t\t                    {course} c\n+\t\t                where \n+\t\t                    c.idnumber in ($SectionOutput)\";\n+\t\t$data = $DB->get_records_sql($sql);\n+\t\t$response = array ();\n+\n+\t\tforeach ($data as $item) {\n+\t\t\t$response[] = $item->id;\n+\t\t}\n+\n+\t\treturn $response;\n+\n+\t}\n+\t\n+\t/**\n+\t* Get a user's grades\n+\t*\n+\t* @param string $userIds A comma separated list of (external) UserIds\n+\t* @param string $sectionIds A comma separated list of (external) SectionIds\n+\t* @param string $startDate Unix timestamp of the date to get logs AFTER\n+\t* @param string $endDate Unix timestamp of the date to get logs BEFORE\n+\t* @return array of objects\n+\t*/\n+\tpublic function get_user_grades($userIds = NULL, $sectionIds = NULL, $startDate = NULL, $endDate = NULL, $RecursiveLevel = 0) {\n+\t\tglobal $DB;\n+\n+\t\tif ($RecursiveLevel > 3) {\n+\t\t\tthrow new Exception(\"RecursiveLevel Too High: \" . $RecursiveLevel . \" Section Ids:\" . var_export($sectionIds, true));\n+\t\t}\n+\t\t\n+\t\t//TODO: Should we ignore grades if they have hidden = true;\n+\n+\t\t//Note: A unique ID must always be the first column in the result.  Otherwise $DV->get_records_sql \n+\t\t//      will group up the results by whatever the first column is.\n+\t\t$sql = \"select \n+\t\t                    {grade_grades}.id as GradeId, \n+\t\t                    {grade_grades}.finalgrade, \n+\t\t                    {grade_grades}.hidden,\n+\t\t                    {grade_items}.id as AssessmentId, \n+\t\t                    {user}.idnumber as UserId,\n+\t\t                    {course}.idnumber as SourceId,\n+\t\t                    {course}.id as CourseId,\n+\t\t                    {grade_items}.needsupdate as NeedsUpdate\n+\t\t                from \n+\t\t                    {grade_grades},\n+\t\t                    {user},\n+\t\t                    {course},\n+\t\t                    {grade_items}\n+\t\t                where \n+\t\t                    {user}.id   = {grade_grades}.userid and\n+\t\t                    {course}.id = {grade_items}.courseid and\n+\t\t                    {grade_items}.id = {grade_grades}.itemid and ({grade_items}.itemtype = 'mod' OR {grade_items}.itemtype = 'manual' or {grade_items}.itemtype='course')\";\n+\n+\t\t// Start to add additional conditions to the query\n+\t\t$addAnd = \" and \";\n+\t\t$params = array ();\n+\n+\t\t// Add Userids to the query\n+\t\tif (strlen($userIds) > 0) {\n+\t\t\t//add quotes to incoming list\n+\t\t\t$UserIDList = explode(\",\", $userIds);\n+\t\t\t$firstInList = true;\n+\t\t\t$UserOutput = \"\";\n+\t\t\tforeach ($UserIDList as $id) {\n+\t\t\t\tif ($firstInList) {\n+\t\t\t\t\t$firstInList = false;\n+\t\t\t\t} else {\n+\t\t\t\t\t$UserOutput .= \",\";\n+\t\t\t\t}\n+\n+\t\t\t\t$UserOutput .= \"'\" . clean_param($id, PARAM_TEXT) . \"'\";\n+\t\t\t}\n+\n+\t\t\t$sql .= $addAnd . \" {user}.idnumber in ( $UserOutput ) \";\n+\t\t}\n+\n+\t\t// Add sectionIds to the query\n+\t\tif (strlen($sectionIds) > 0) {\n+\t\t\t//add quotes to incoming list\n+\t\t\t$SectionIdList = explode(\",\", $sectionIds);\n+\t\t\t$firstInList = true;\n+\t\t\t$SectionOutput = \"\";\n+\t\t\tforeach ($SectionIdList as $id) {\n+\t\t\t\tif ($firstInList) {\n+\t\t\t\t\t$firstInList = false;\n+\t\t\t\t} else {\n+\t\t\t\t\t$SectionOutput .= \",\";\n+\t\t\t\t}\n+\n+\t\t\t\t$SectionOutput .= \"'\" . clean_param($id, PARAM_TEXT) . \"'\";\n+\t\t\t}\n+\n+\t\t\t$sql .= $addAnd . \" {course}.idnumber in ( $SectionOutput ) \";\n+\t\t}\n+\n+\t\t//Add the start date to the query\n+\t\tif ($startDate != null) {\n+\t\t\t$sql .= $addAnd . \" {grade_grades}.timemodified > ? \";\n+\t\t\t$params[] = $startDate;\n+\t\t}\n+\n+\t\t//Add the end date to the query\n+\t\tif ($endDate != null) {\n+\t\t\t$sql .= $addAnd . \" {grade_grades}.timemodified < ?  \";\n+\t\t\t$params[] = $endDate;\n+\t\t}\n+\n+\t\t//TODO: how to format this error\n+\t\tif (count($params) < 1) {\n+\t\t\tthrow new Exception(\"Error, atleast one parameter is required\");\n+\t\t}\n+\n+\t\t$data = $DB->get_records_sql($sql, $params);\n+\t\t$returnData = array ();\n+\t\t$updateData = array ();\n+\n+\t\tforeach ($data as $value) {\n+\t\t\t$value = (array) $value;\n+\n+\t\t\tif ($value[\"needsupdate\"] == 1) {\n+\t\t\t\t//Keep a list of sectionIds to re-run after they are updated\n+\t\t\t\t$updateData[] = $value[\"sourceid\"];\n+\t\t\t\t//Re-run the courseId\n+\t\t\t\tgrade_regrade_final_grades($value[\"courseid\"]);\n+\t\t\t} else {\n+\t\t\t\t$returnData[] = $value;\n+\t\t\t}\n+\t\t}\n+\t\tif (count($updateData) > 0) {\n+\t\t\t$sectionIds = implode(\",\", $updateData);\n+\t\t\t$newData = blocks_intelligent_learning_model_service_user :: get_user_grades($userIds, $sectionIds, $startDate, $endDate, $RecursiveLevel++);\n+\t\t\t$returnData = array_merge($newData, $returnData);","path":"model/service/user.php","position":671,"original_position":671,"commit_id":"72ea0ef3d030b08d3d04e4a88241ccd86e1f0baa","original_commit_id":"72ea0ef3d030b08d3d04e4a88241ccd86e1f0baa","user":{"login":"avinashkellucian","id":8117365,"avatar_url":"https://avatars.githubusercontent.com/u/8117365?v=2","gravatar_id":"","url":"https://api.github.com/users/avinashkellucian","html_url":"https://github.com/avinashkellucian","followers_url":"https://api.github.com/users/avinashkellucian/followers","following_url":"https://api.github.com/users/avinashkellucian/following{/other_user}","gists_url":"https://api.github.com/users/avinashkellucian/gists{/gist_id}","starred_url":"https://api.github.com/users/avinashkellucian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avinashkellucian/subscriptions","organizations_url":"https://api.github.com/users/avinashkellucian/orgs","repos_url":"https://api.github.com/users/avinashkellucian/repos","events_url":"https://api.github.com/users/avinashkellucian/events{/privacy}","received_events_url":"https://api.github.com/users/avinashkellucian/received_events","type":"User","site_admin":false},"body":"What the difference between the formatted response and raw data. Are you referring to just the format of the response?\r\nThat was done intentionally. We may have to circle back on this. \r\n\r\nFixed the incorrect static call.","created_at":"2014-09-22T20:31:36Z","updated_at":"2014-09-22T20:31:36Z","html_url":"https://github.com/moodlerooms/moodle-block_intelligent_learning/pull/1#discussion_r17875971","pull_request_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/pulls/comments/17875971"},"html":{"href":"https://github.com/moodlerooms/moodle-block_intelligent_learning/pull/1#discussion_r17875971"},"pull_request":{"href":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/pulls/1","id":20181247,"html_url":"https://github.com/moodlerooms/moodle-block_intelligent_learning/pull/1","diff_url":"https://github.com/moodlerooms/moodle-block_intelligent_learning/pull/1.diff","patch_url":"https://github.com/moodlerooms/moodle-block_intelligent_learning/pull/1.patch","issue_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/issues/1","number":1,"state":"open","locked":false,"title":"New user rest APIs","user":{"login":"mrmark","id":634657,"avatar_url":"https://avatars.githubusercontent.com/u/634657?v=2","gravatar_id":"","url":"https://api.github.com/users/mrmark","html_url":"https://github.com/mrmark","followers_url":"https://api.github.com/users/mrmark/followers","following_url":"https://api.github.com/users/mrmark/following{/other_user}","gists_url":"https://api.github.com/users/mrmark/gists{/gist_id}","starred_url":"https://api.github.com/users/mrmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrmark/subscriptions","organizations_url":"https://api.github.com/users/mrmark/orgs","repos_url":"https://api.github.com/users/mrmark/repos","events_url":"https://api.github.com/users/mrmark/events{/privacy}","received_events_url":"https://api.github.com/users/mrmark/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-08-22T16:13:03Z","updated_at":"2014-09-22T20:31:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24bf75e1399a58b178782ffa411852f51f076436","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/pulls/1/commits","review_comments_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/pulls/1/comments","review_comment_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/pulls/comments/{number}","comments_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/issues/1/comments","statuses_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/statuses/72ea0ef3d030b08d3d04e4a88241ccd86e1f0baa","head":{"label":"EllucianMoodleIntegration:master","ref":"master","sha":"72ea0ef3d030b08d3d04e4a88241ccd86e1f0baa","user":{"login":"EllucianMoodleIntegration","id":8117374,"avatar_url":"https://avatars.githubusercontent.com/u/8117374?v=2","gravatar_id":"","url":"https://api.github.com/users/EllucianMoodleIntegration","html_url":"https://github.com/EllucianMoodleIntegration","followers_url":"https://api.github.com/users/EllucianMoodleIntegration/followers","following_url":"https://api.github.com/users/EllucianMoodleIntegration/following{/other_user}","gists_url":"https://api.github.com/users/EllucianMoodleIntegration/gists{/gist_id}","starred_url":"https://api.github.com/users/EllucianMoodleIntegration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EllucianMoodleIntegration/subscriptions","organizations_url":"https://api.github.com/users/EllucianMoodleIntegration/orgs","repos_url":"https://api.github.com/users/EllucianMoodleIntegration/repos","events_url":"https://api.github.com/users/EllucianMoodleIntegration/events{/privacy}","received_events_url":"https://api.github.com/users/EllucianMoodleIntegration/received_events","type":"Organization","site_admin":false},"repo":{"id":21664918,"name":"moodle-block_intelligent_learning","full_name":"EllucianMoodleIntegration/moodle-block_intelligent_learning","owner":{"login":"EllucianMoodleIntegration","id":8117374,"avatar_url":"https://avatars.githubusercontent.com/u/8117374?v=2","gravatar_id":"","url":"https://api.github.com/users/EllucianMoodleIntegration","html_url":"https://github.com/EllucianMoodleIntegration","followers_url":"https://api.github.com/users/EllucianMoodleIntegration/followers","following_url":"https://api.github.com/users/EllucianMoodleIntegration/following{/other_user}","gists_url":"https://api.github.com/users/EllucianMoodleIntegration/gists{/gist_id}","starred_url":"https://api.github.com/users/EllucianMoodleIntegration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EllucianMoodleIntegration/subscriptions","organizations_url":"https://api.github.com/users/EllucianMoodleIntegration/orgs","repos_url":"https://api.github.com/users/EllucianMoodleIntegration/repos","events_url":"https://api.github.com/users/EllucianMoodleIntegration/events{/privacy}","received_events_url":"https://api.github.com/users/EllucianMoodleIntegration/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EllucianMoodleIntegration/moodle-block_intelligent_learning","description":"","fork":true,"url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning","forks_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/forks","keys_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/teams","hooks_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/hooks","issue_events_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/issues/events{/number}","events_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/events","assignees_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/assignees{/user}","branches_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/branches{/branch}","tags_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/tags","blobs_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/git/refs{/sha}","trees_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/statuses/{sha}","languages_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/languages","stargazers_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/stargazers","contributors_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/contributors","subscribers_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/subscribers","subscription_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/subscription","commits_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/commits{/sha}","git_commits_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/git/commits{/sha}","comments_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/comments{/number}","issue_comment_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/issues/comments/{number}","contents_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/contents/{+path}","compare_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/merges","archive_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/downloads","issues_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/issues{/number}","pulls_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/pulls{/number}","milestones_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/milestones{/number}","notifications_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/labels{/name}","releases_url":"https://api.github.com/repos/EllucianMoodleIntegration/moodle-block_intelligent_learning/releases{/id}","created_at":"2014-07-09T19:03:51Z","updated_at":"2014-07-23T04:54:54Z","pushed_at":"2014-07-23T16:21:35Z","git_url":"git://github.com/EllucianMoodleIntegration/moodle-block_intelligent_learning.git","ssh_url":"git@github.com:EllucianMoodleIntegration/moodle-block_intelligent_learning.git","clone_url":"https://github.com/EllucianMoodleIntegration/moodle-block_intelligent_learning.git","svn_url":"https://github.com/EllucianMoodleIntegration/moodle-block_intelligent_learning","homepage":null,"size":188,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"moodlerooms:master","ref":"master","sha":"973c913444cc0d46e67d1c059cff6d6797aa9288","user":{"login":"moodlerooms","id":1316663,"avatar_url":"https://avatars.githubusercontent.com/u/1316663?v=2","gravatar_id":"","url":"https://api.github.com/users/moodlerooms","html_url":"https://github.com/moodlerooms","followers_url":"https://api.github.com/users/moodlerooms/followers","following_url":"https://api.github.com/users/moodlerooms/following{/other_user}","gists_url":"https://api.github.com/users/moodlerooms/gists{/gist_id}","starred_url":"https://api.github.com/users/moodlerooms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moodlerooms/subscriptions","organizations_url":"https://api.github.com/users/moodlerooms/orgs","repos_url":"https://api.github.com/users/moodlerooms/repos","events_url":"https://api.github.com/users/moodlerooms/events{/privacy}","received_events_url":"https://api.github.com/users/moodlerooms/received_events","type":"Organization","site_admin":false},"repo":{"id":15592466,"name":"moodle-block_intelligent_learning","full_name":"moodlerooms/moodle-block_intelligent_learning","owner":{"login":"moodlerooms","id":1316663,"avatar_url":"https://avatars.githubusercontent.com/u/1316663?v=2","gravatar_id":"","url":"https://api.github.com/users/moodlerooms","html_url":"https://github.com/moodlerooms","followers_url":"https://api.github.com/users/moodlerooms/followers","following_url":"https://api.github.com/users/moodlerooms/following{/other_user}","gists_url":"https://api.github.com/users/moodlerooms/gists{/gist_id}","starred_url":"https://api.github.com/users/moodlerooms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moodlerooms/subscriptions","organizations_url":"https://api.github.com/users/moodlerooms/orgs","repos_url":"https://api.github.com/users/moodlerooms/repos","events_url":"https://api.github.com/users/moodlerooms/events{/privacy}","received_events_url":"https://api.github.com/users/moodlerooms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moodlerooms/moodle-block_intelligent_learning","description":"","fork":false,"url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning","forks_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/forks","keys_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/teams","hooks_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/hooks","issue_events_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/issues/events{/number}","events_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/events","assignees_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/assignees{/user}","branches_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/branches{/branch}","tags_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/tags","blobs_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/git/refs{/sha}","trees_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/statuses/{sha}","languages_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/languages","stargazers_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/stargazers","contributors_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/contributors","subscribers_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/subscribers","subscription_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/subscription","commits_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/commits{/sha}","git_commits_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/git/commits{/sha}","comments_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/comments{/number}","issue_comment_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/issues/comments/{number}","contents_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/contents/{+path}","compare_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/merges","archive_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/downloads","issues_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/issues{/number}","pulls_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/pulls{/number}","milestones_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/milestones{/number}","notifications_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/labels{/name}","releases_url":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/releases{/id}","created_at":"2014-01-02T20:01:44Z","updated_at":"2014-06-05T18:00:21Z","pushed_at":"2014-06-05T18:00:19Z","git_url":"git://github.com/moodlerooms/moodle-block_intelligent_learning.git","ssh_url":"git@github.com:moodlerooms/moodle-block_intelligent_learning.git","clone_url":"https://github.com/moodlerooms/moodle-block_intelligent_learning.git","svn_url":"https://github.com/moodlerooms/moodle-block_intelligent_learning","homepage":null,"size":244,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/pulls/1"},"html":{"href":"https://github.com/moodlerooms/moodle-block_intelligent_learning/pull/1"},"issue":{"href":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/issues/1"},"comments":{"href":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/moodlerooms/moodle-block_intelligent_learning/statuses/72ea0ef3d030b08d3d04e4a88241ccd86e1f0baa"}}}}