| Línea 167... |
Línea 167... |
| 167 |
$questionscontext = array_merge($usagecontext, [
|
167 |
$questionscontext = array_merge($usagecontext, [
|
| 168 |
get_string('questions', 'core_question'),
|
168 |
get_string('questions', 'core_question'),
|
| 169 |
]);
|
169 |
]);
|
| Línea 170... |
Línea 170... |
| 170 |
|
170 |
|
| 171 |
foreach ($quba->get_attempt_iterator() as $qa) {
|
171 |
foreach ($quba->get_attempt_iterator() as $qa) {
|
| 172 |
$question = $qa->get_question(false);
|
172 |
$question = $qa->get_question();
|
| 173 |
$slotno = $qa->get_slot();
|
173 |
$slotno = $qa->get_slot();
|
| Línea 174... |
Línea 174... |
| 174 |
$questionnocontext = array_merge($questionscontext, [$slotno]);
|
174 |
$questionnocontext = array_merge($questionscontext, [$slotno]);
|
| 175 |
|
175 |
|
| Línea 300... |
Línea 300... |
| 300 |
'question',
|
300 |
'question',
|
| 301 |
"response_bf_comment",
|
301 |
"response_bf_comment",
|
| 302 |
$step->get_id()
|
302 |
$step->get_id()
|
| 303 |
);
|
303 |
);
|
| Línea 304... |
Línea 304... |
| 304 |
|
304 |
|
| 305 |
$stepdata->comment = $qa->get_behaviour(false)->format_comment($comment, $commentformat);
|
305 |
$stepdata->comment = $qa->get_behaviour()->format_comment($comment, $commentformat);
|
| Línea 306... |
Línea 306... |
| 306 |
}
|
306 |
}
|
| 307 |
|
307 |
|
| 308 |
// Export any response files associated with this step.
|
308 |
// Export any response files associated with this step.
|
| Línea 412... |
Línea 412... |
| 412 |
* @param string $insql The SQL to use in a sub-select for the question_usages.id query.
|
412 |
* @param string $insql The SQL to use in a sub-select for the question_usages.id query.
|
| 413 |
* @param array $params The params required for the insql.
|
413 |
* @param array $params The params required for the insql.
|
| 414 |
* @param int|null $contextid An optional context id, in case the $sql query is not already filtered by that.
|
414 |
* @param int|null $contextid An optional context id, in case the $sql query is not already filtered by that.
|
| 415 |
*/
|
415 |
*/
|
| 416 |
public static function get_users_in_context_from_sql(userlist $userlist, string $prefix, string $insql, $params,
|
416 |
public static function get_users_in_context_from_sql(userlist $userlist, string $prefix, string $insql, $params,
|
| 417 |
int $contextid = null) {
|
417 |
?int $contextid = null) {
|
| Línea 418... |
Línea 418... |
| 418 |
|
418 |
|
| 419 |
$sql = "SELECT {$prefix}_qas.userid
|
419 |
$sql = "SELECT {$prefix}_qas.userid
|
| 420 |
FROM {question_attempt_steps} {$prefix}_qas
|
420 |
FROM {question_attempt_steps} {$prefix}_qas
|
| 421 |
JOIN {question_attempts} {$prefix}_qa ON {$prefix}_qas.questionattemptid = {$prefix}_qa.id
|
421 |
JOIN {question_attempts} {$prefix}_qa ON {$prefix}_qas.questionattemptid = {$prefix}_qa.id
|