(courseInstanceUrl)
| 147 | } |
| 148 | |
| 149 | async function getQuestionUrl(courseInstanceUrl) { |
| 150 | const questionsUrl = courseInstanceUrl + '/instructor/questions'; |
| 151 | const body = await request({uri: questionsUrl, jar: cookies}); |
| 152 | const $ = cheerio.load(body); |
| 153 | const elemList = $(`td a:contains("${questionTitle}")`); |
| 154 | assert(elemList.length == 1); |
| 155 | return serverUrl + elemList[0].attribs.href; |
| 156 | } |
| 157 | |
| 158 | async function getQuestionSubmitInfo(questionUrl) { |
| 159 | const body = await request({uri: questionUrl, jar: cookies}); |
no test coverage detected