Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/admin/tool/qeupgradehelper/locallib.php File Reference

Go to the source code of this file.

Data Structures

class  tool_qeupgradehelper_action
class  tool_qeupgradehelper_quiz_list
class  tool_qeupgradehelper_upgradable_quiz_list
class  tool_qeupgradehelper_resettable_quiz_list
class  tool_qeupgradehelper_pre_upgrade_quiz_list
class  tool_qeupgradehelper_pre_upgrade_quiz_list_restricted

Namespaces

namespace  tool

Functions

 tool_qeupgradehelper_is_upgraded ()
 tool_qeupgradehelper_require_upgraded ()
 tool_qeupgradehelper_require_not_upgraded ()
 tool_qeupgradehelper_url ($script, $params=array())
 tool_qeupgradehelper_get_num_very_old_attempts ()
 tool_qeupgradehelper_get_quiz ($quizid)
 tool_qeupgradehelper_get_resettable_quiz ($quizid)
 tool_qeupgradehelper_get_session_id ($attemptid, $questionid)
 tool_qeupgradehelper_find_test_case ($behaviour, $statehistory, $qtype, $extratests)
 tool_qeupgradehelper_generate_unit_test ($questionsessionid, $namesuffix)
 tool_qeupgradehelper_format_var ($name, $var)
 tool_qeupgradehelper_display_convert_attempt_input ($quiz, $attempt, $question, $qsession, $qstates)
 tool_qeupgradehelper_load_question ($questionid, $quizid)
 tool_qeupgradehelper_get_quiz_for_upgrade ()

Function Documentation

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

Definition at line 627 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

tool_qeupgradehelper_find_test_case ( behaviour,
statehistory,
qtype,
extratests 
)

Identify the question session id of a question attempt matching certain requirements.

Parameters:
integer$behaviour0 = deferred feedback, 1 = interactive.
string$statehistoryof states, last first. E.g. 620.
string$qtypequestion type.
Returns:
integer question_session.id.

Definition at line 461 of file locallib.php.

tool_qeupgradehelper_format_var ( name,
var 
)

Definition at line 601 of file locallib.php.

Here is the caller graph for this function:

tool_qeupgradehelper_generate_unit_test ( questionsessionid,
namesuffix 
)

Grab all the data that upgrade will need for upgrading one attempt at one question from the old DB.

Definition at line 519 of file locallib.php.

Here is the call graph for this function:

List the number of quiz attempts that were never upgraded from 1.4 -> 1.5.

Returns:
int the number of such attempts.

Definition at line 352 of file locallib.php.

Get the information about a quiz to be upgraded.

Parameters:
integer$quizidthe quiz id.
Returns:
object the information about that quiz, as for tool_qeupgradehelper_get_upgradable_quizzes().

Definition at line 371 of file locallib.php.

Here is the caller graph for this function:

Definition at line 663 of file locallib.php.

Here is the caller graph for this function:

Get the information about a quiz to be upgraded.

Parameters:
integer$quizidthe quiz id.
Returns:
object the information about that quiz, as for tool_qeupgradehelper_get_resettable_quizzes(), but with extra fields totalattempts and resettableattempts.

Definition at line 401 of file locallib.php.

tool_qeupgradehelper_get_session_id ( attemptid,
questionid 
)

Get a question session id form a quiz attempt id and a question id.

Parameters:
int$attemptida quiz attempt id.
int$questionida question id.
Returns:
int the question session id.

Definition at line 443 of file locallib.php.

Detect whether this site has been upgraded to the new question engine yet.

Returns:
bool whether the site has been upgraded.

Definition at line 34 of file locallib.php.

Here is the caller graph for this function:

tool_qeupgradehelper_load_question ( questionid,
quizid 
)

Definition at line 636 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

If the site has been upgraded, display an error.

Definition at line 54 of file locallib.php.

Here is the call graph for this function:

If the site has not yet been upgraded, display an error.

Definition at line 44 of file locallib.php.

Here is the call graph for this function:

tool_qeupgradehelper_url ( script,
params = array() 
)

Get the URL of a script within this plugin.

Parameters:
string$scriptthe script name, without .php. E.g. 'index'.
array$paramsURL parameters (optional).

Definition at line 66 of file locallib.php.

Here is the caller graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations