exercise.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. import { http } from '@/utils/http';
  2. /**
  3. * 分页查询练习题列表
  4. */
  5. export function PageQueryExerciseList(data) {
  6. return http.post(`/TeachingServer/ExerciseManager/PageQueryExerciseList`, data);
  7. }
  8. /**
  9. * 新建练习题
  10. */
  11. export function CreateExercise(data) {
  12. return http.post(`/TeachingServer/ExerciseManager/CreateExercise`, data);
  13. }
  14. /**
  15. * 得到练习题信息
  16. * @param {object} data
  17. * @param {string} data.exercise_id 练习题id
  18. * @returns {object} data
  19. * @returns {string} data.exercise 练习题信息
  20. */
  21. export function GetExerciseInfo(data) {
  22. return http.post(`/TeachingServer/ExerciseManager/GetExerciseInfo`, data);
  23. }
  24. /**
  25. * 更新练习题
  26. */
  27. export function UpdateExercise(data) {
  28. return http.post(`/TeachingServer/ExerciseManager/UpdateExercise`, data);
  29. }
  30. /**
  31. * 删除练习题
  32. * @param {object} data
  33. * @param {string} data.exercise_id 练习题id
  34. */
  35. export function DeleteExercise(data) {
  36. return http.post(`/TeachingServer/ExerciseManager/DeleteExercise`, data);
  37. }
  38. /**
  39. * 得到标签列表
  40. * @param {object} data
  41. * @param {string} data.store_type 标签名称
  42. */
  43. export function GetLabelList(data) {
  44. return http.post(`/TeachingServer/ExerciseManager/GetLabelList`, data);
  45. }
  46. /**
  47. * 添加题目到练习
  48. */
  49. export function AddQuestionToExercise(data) {
  50. return http.post(`/TeachingServer/ExerciseManager/AddQuestionToExercise`, data);
  51. }
  52. /**
  53. * 保存题目
  54. */
  55. export function SaveQuestion(data) {
  56. return http.post(`/TeachingServer/ExerciseManager/SaveQuestion`, data);
  57. }
  58. /**
  59. * 得到练习的题目索引列表
  60. */
  61. export function GetExerciseQuestionIndexList(data) {
  62. return http.post(`/TeachingServer/ExerciseManager/GetExerciseQuestionIndexList`, data);
  63. }
  64. /**
  65. * 得到题目
  66. * @param {object} data
  67. * @param {string} data.question_id 题目id
  68. */
  69. export function GetQuestionInfo(data) {
  70. return http.post(`/TeachingServer/ExerciseManager/GetQuestionInfo`, data);
  71. }
  72. /**
  73. * 删除题目
  74. * @param {object} data
  75. * @param {string} data.question_id 题目id
  76. */
  77. export function DeleteQuestion(data) {
  78. return http.post(`/TeachingServer/ExerciseManager/DeleteQuestion`, data);
  79. }
  80. /**
  81. * 创建分享记录
  82. */
  83. export function CreateShareRecord(data) {
  84. return http.post(`/TeachingServer/ExerciseManager/CreateShareRecord`, data);
  85. }
  86. /**
  87. * 复制练习题到公共库
  88. */
  89. export function CopyExerciseToPublicStore(data) {
  90. return http.post(`/TeachingServer/ExerciseManager/CopyExerciseToPublicStore`, data);
  91. }
  92. /**
  93. * 复制练习题到个人库
  94. */
  95. export function CopyExerciseToPersonalStore(data) {
  96. return http.post(`/TeachingServer/ExerciseManager/CopyExerciseToPersonalStore`, data);
  97. }
  98. /**
  99. * 分页查询练习题分享记录列表
  100. */
  101. export function PageQueryExerciseShareRecordList(data) {
  102. return http.post(`/TeachingServer/ExerciseManager/PageQueryExerciseShareRecordList`, data);
  103. }
  104. /**
  105. * 分页查询练习题用户答题记录列表
  106. */
  107. export function PageQueryExerciseUserAnswerRecordList(data) {
  108. return http.post(`/TeachingServer/ExerciseManager/PageQueryExerciseUserAnswerRecordList`, data);
  109. }
  110. /**
  111. * 得到我的课程列表(教师)
  112. */
  113. export function GetMyCourseList_Teacher(data) {
  114. return http.post(
  115. `${process.env.VUE_APP_LearnWebSI}?MethodName=teaching-course_manager-GetMyCourseList_Teacher`,
  116. data,
  117. );
  118. }
  119. /**
  120. * 得到课程学员列表
  121. */
  122. export function GetCourseStudentList(data) {
  123. return http.post(`${process.env.VUE_APP_LearnWebSI}?MethodName=teaching-course_manager-GetCourseStudentList`, data);
  124. }