Updated quiz scripts to work with the separate question scripts in moodle/question

This commit is contained in:
gustav_delius 2006-02-24 10:43:06 +00:00
parent e586cfb4b0
commit 80a5e194ff
15 changed files with 24 additions and 3194 deletions

View file

@ -89,8 +89,8 @@ class quiz_report extends quiz_default_report {
}
$sql .= ' WHERE qa.quiz = '.$quiz->id. // ULPGC ecastro
' AND ( qa.sumgrades >= '.$scorelimit.' ) ';
// ^^^^^^ es posible seleccionar aquí TODOS los quizzes, como quiere Jussi,
// pero habría que llevar la cuenta ed cada quiz para restaura las preguntas (quizquestions, states)
// ^^^^^^ es posible seleccionar aqu<EFBFBD> TODOS los quizzes, como quiere Jussi,
// pero habr<EFBFBD>a que llevar la cuenta ed cada quiz para restaura las preguntas (quizquestions, states)
/// Fetch the attempts
$attempts = get_records_sql($sql);
@ -309,7 +309,7 @@ class quiz_report extends quiz_default_report {
$q = $questions[$qnum];
$qid = $q['id'];
$question = get_record('quiz_questions', 'id', $qid);
$qnumber = " (".link_to_popup_window('/mod/quiz/question.php?id='.$qid,'editquestion', $qid, 450, 550, get_string('edit'), 'none', true ).") ";
$qnumber = " (".link_to_popup_window('/question/question.php?id='.$qid,'editquestion', $qid, 450, 550, get_string('edit'), 'none', true ).") ";
$qname = '<div class="qname">'.format_text($question->name." : ", $question->questiontextformat, NULL, $quiz->course).'</div>';
$qicon = quiz_print_question_icon($question, false, true);
$qreview = quiz_get_question_review($quiz, $question);

View file

@ -22,6 +22,7 @@ class quiz_default_report {
}
function print_header_and_tabs($cm, $course, $quiz, $reportmode="overview"){
global $CFG;
/// Define some strings
$strquizzes = get_string("modulenameplural", "quiz");
$strquiz = get_string("modulename", "quiz");