Skip to content

Commit

Permalink
修复某些情况判断题的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
CodFrm committed Nov 10, 2020
1 parent 70adf7a commit ba7a8a8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/mooc/chaoxing/question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,15 @@ abstract class cxQuestion implements Question {
class cxSelectQuestion extends cxQuestion implements Question {

protected getContent(el: HTMLElement): string {
el = el.querySelector("a");
return el.innerHTML;
let ret = el.querySelector("a");
if (ret == null) {
let tmpel = <HTMLInputElement>el.querySelector("label > input,input");
if (tmpel.value == "true") {
return "对√";
}
return "错×";
}
return ret.innerHTML;
}

protected getOption(el: HTMLElement): string {
Expand Down

0 comments on commit ba7a8a8

Please sign in to comment.