Moodle  2.2.1
http://www.collinsharper.com
question_engine_attempt_upgrader Class Reference
Inheritance diagram for question_engine_attempt_upgrader:

Public Member Functions

 convert_all_quiz_attempts ()
 get_attempts_extra_where ()
 update_all_attempts_at_quiz ($quiz)
 save_usage ($preferredbehaviour, $attempt, $qas, $quizlayout)
 load_question ($questionid, $quizid=null)
 load_dataset ($questionid, $selecteditem)
 get_next_question_session ($attempt, moodle_recordset $questionsessionsrs)
 get_question_states ($attempt, $question, moodle_recordset $questionsstatesrs)
 supply_missing_question_attempt ($quiz, $attempt, $question)
 convert_question_attempt ($quiz, $attempt, $question, $qsession, $qstates)
 prepare_to_restore ()

Protected Member Functions

 print_progress ($done, $outof, $quizid)
 prevent_timeout ()
 get_quiz_ids ()
 convert_quiz_attempt ($quiz, $attempt, moodle_recordset $questionsessionsrs, moodle_recordset $questionsstatesrs)
 set_quba_preferred_behaviour ($qubaid, $preferredbehaviour)
 set_quiz_attempt_layout ($qubaid, $layout)
 delete_quiz_attempt ($qubaid)
 insert_record ($table, $record, $saveid=true)
 get_converter_class_name ($question, $quiz, $qsessionid)
 decode_random_attempt ($qstates, $maxmark)

Protected Attributes

 $questionloader
 $logger
 $dotcounter = 0
 $progressbar = null
 $doingbackup = false

Detailed Description

This class manages upgrading all the question attempts from the old database structure to the new question engine.

Definition at line 43 of file upgradelib.php.


Member Function Documentation

Definition at line 116 of file upgradelib.php.

Here is the call graph for this function:

convert_question_attempt ( quiz,
attempt,
question,
qsession,
qstates 
)

Definition at line 391 of file upgradelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

convert_quiz_attempt ( quiz,
attempt,
moodle_recordset questionsessionsrs,
moodle_recordset questionsstatesrs 
) [protected]

Definition at line 187 of file upgradelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

decode_random_attempt ( qstates,
maxmark 
) [protected]

Definition at line 408 of file upgradelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

delete_quiz_attempt ( qubaid) [protected]

Definition at line 292 of file upgradelib.php.

Definition at line 141 of file upgradelib.php.

Here is the caller graph for this function:

get_converter_class_name ( question,
quiz,
qsessionid 
) [protected]

Definition at line 350 of file upgradelib.php.

Here is the caller graph for this function:

get_next_question_session ( attempt,
moodle_recordset questionsessionsrs 
)

Definition at line 315 of file upgradelib.php.

Here is the caller graph for this function:

get_question_states ( attempt,
question,
moodle_recordset questionsstatesrs 
)

Definition at line 331 of file upgradelib.php.

Here is the caller graph for this function:

get_quiz_ids ( ) [protected]

Reimplemented in tool_qeupgradehelper_attempt_upgrader.

Definition at line 87 of file upgradelib.php.

Here is the caller graph for this function:

insert_record ( table,
record,
saveid = true 
) [protected]

Definition at line 298 of file upgradelib.php.

Here is the caller graph for this function:

load_dataset ( questionid,
selecteditem 
)

Definition at line 311 of file upgradelib.php.

load_question ( questionid,
quizid = null 
)

Definition at line 307 of file upgradelib.php.

Here is the caller graph for this function:

Definition at line 439 of file upgradelib.php.

prevent_timeout ( ) [protected]

Reimplemented in test_question_engine_attempt_upgrader.

Definition at line 75 of file upgradelib.php.

Here is the caller graph for this function:

print_progress ( done,
outof,
quizid 
) [protected]

Called before starting to upgrade all the attempts at a particular quiz.

Parameters:
int$donethe number of quizzes processed so far.
int$outofthe total number of quizzes to process.
int$quizidthe id of the quiz that is about to be processed.

Reimplemented in tool_qeupgradehelper_attempt_upgrader.

Definition at line 61 of file upgradelib.php.

Here is the caller graph for this function:

save_usage ( preferredbehaviour,
attempt,
qas,
quizlayout 
)

Definition at line 225 of file upgradelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

set_quba_preferred_behaviour ( qubaid,
preferredbehaviour 
) [protected]

Definition at line 280 of file upgradelib.php.

Here is the caller graph for this function:

set_quiz_attempt_layout ( qubaid,
layout 
) [protected]

Definition at line 286 of file upgradelib.php.

Here is the caller graph for this function:

supply_missing_question_attempt ( quiz,
attempt,
question 
)

Definition at line 376 of file upgradelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 145 of file upgradelib.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$doingbackup = false [protected]

Definition at line 53 of file upgradelib.php.

$dotcounter = 0 [protected]

Definition at line 49 of file upgradelib.php.

$logger [protected]

Definition at line 47 of file upgradelib.php.

$progressbar = null [protected]

Definition at line 51 of file upgradelib.php.

$questionloader [protected]

Definition at line 45 of file upgradelib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations