Commit da8dd6b7 authored by 杨培's avatar 杨培

用户中心添加考试记录的接口

parent c1ce60b5
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/8/15
* Time: 18:21
*/
namespace internalApi\ucenter;
use internalApi\base\Client;
class Exam extends Client
{
/**
* 添加考试分数记录
* 添加后,合格的记录会自动算入匠心值
*
* @param int $userId
* @param int $skillExamId 考试在用户中心的ID
* @param array $scoreInfo 考试记录数组,来自学院 exam_records 表
* @return bool 添加成功返回true,失败返回false
* 失败可能是因为:该考试在用户中心已被删除或不存在、该用户不可见此考试、已经考试过并合格了等原因
*/
public static function addRecord($userId, $skillExamId, $scoreInfo)
{
return self::call('exam.addRecord', compact('userId', 'skillExamId', 'scoreInfo'));
}
}
\ No newline at end of file
...@@ -28,7 +28,7 @@ class Exam extends Client ...@@ -28,7 +28,7 @@ class Exam extends Client
* 获取多个考试的基本信息 * 获取多个考试的基本信息
* *
* @param array $ids * @param array $ids
* @return array * @return array 返回考试的信息,其中键索引为考试ID
*/ */
public static function getExams($ids) public static function getExams($ids)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment