import {HttpClient} from "@angular/common/http";
import {Injectable} from "@angular/core";
import {Observable} from "rxjs/Observable";
import {AppGlobal} from "../../../service/http.service";
import {CommonService} from "../../../provide/common.service";

@Injectable()
export class LearnManageService{

    constructor(private http:HttpClient,private commonSer:CommonService){}

    //批阅列表
    getLearnTestList(data): Observable<any>{
        return this.http.post(AppGlobal.domain+'/wisdomgroup//modules/testManage/getLearnTestList',this.commonSer.toFormData(data))
    }

    //试卷列表
    getDetail(data): Observable<any>{
        return this.http.post(AppGlobal.domain+'/wisdomgroup//modules/testManage/getDetail',this.commonSer.toFormData(data))
    }

    //待批阅列表
    getMarkList(data): Observable<any>{
        return this.http.post(AppGlobal.domain+'/wisdomgroup/modules/testManage/getMarkList' , this.commonSer.toFormData(data) );
    }

    //提交批阅结果
    submitMarkResult(data): Observable<any>{
        return this.http.post(AppGlobal.domain+'/wisdomgroup/modules/testManage/submitMarkResult' , data);
    }

    //获取测试结果（按分数由高到低排序）
    getRankList(data): Observable<any>{
        return this.http.post(AppGlobal.domain+'/wisdomgroup/modules/testManage/getRankList' , this.commonSer.toFormData(data) );
    }
}