Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/quiz/report/reportlib.php File Reference

Go to the source code of this file.

Namespaces

namespace  mod
 

Local Library of functions for module scorm.


Enumerations

enum  QUIZ_REPORT_DEFAULT_PAGE_SIZE
enum  QUIZ_REPORT_DEFAULT_GRADING_PAGE_SIZE
enum  QUIZ_REPORT_ATTEMPTS_ALL
enum  QUIZ_REPORT_ATTEMPTS_STUDENTS_WITH_NO
enum  QUIZ_REPORT_ATTEMPTS_STUDENTS_WITH
enum  QUIZ_REPORT_ATTEMPTS_ALL_STUDENTS

Functions

 quiz_report_index_by_keys ($datum, $keys, $keysunique=true)
 quiz_report_unindex ($datum)
 quiz_report_get_significant_questions ($quiz)
 quiz_report_qm_filter_select ($quiz, $quizattemptsalias= 'quiza')
 quiz_report_grade_bands ($bandwidth, $bands, $quizid, $userids=array())
 quiz_report_highlighting_grading_method ($quiz, $qmsubselect, $qmfilter)
 quiz_report_feedback_for_grade ($grade, $quizid, $context)
 quiz_report_scale_summarks_as_percentage ($rawmark, $quiz, $round=true)
 quiz_report_list ($context)
 quiz_report_download_filename ($report, $courseshortname, $quizname)
 quiz_report_default_report ($context)
 quiz_no_questions_message ($quiz, $cm, $context)

Enumeration Type Documentation

Definition at line 35 of file reportlib.php.

Definition at line 38 of file reportlib.php.

Definition at line 37 of file reportlib.php.

Definition at line 36 of file reportlib.php.

Definition at line 33 of file reportlib.php.

Definition at line 32 of file reportlib.php.


Function Documentation

quiz_no_questions_message ( quiz,
cm,
context 
)

Generate a message saying that this quiz has no questions, with a button to go to the edit page, if the user has the right capability.

Parameters:
object$quizthe quiz settings.
object$cmthe course_module object.
object$contextthe quiz context.
Returns:
string HTML to output.

Definition at line 385 of file reportlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Get the default report for the current user.

Parameters:
object$contextthe quiz context.

Definition at line 373 of file reportlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

quiz_report_download_filename ( report,
courseshortname,
quizname 
)

Create a filename for use when downloading data from a quiz report. It is expected that this will be passed to flexible_table::is_downloading, which cleans the filename of bad characters and adds the file extension.

Parameters:
string$reportthe type of report.
string$courseshortnamethe course shortname.
string$quiznamethe quiz name.
Returns:
string the filename.

Definition at line 365 of file reportlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

quiz_report_feedback_for_grade ( grade,
quizid,
context 
)

Get the feedback text for a grade on this quiz. The feedback is processed ready for display.

Parameters:
float$gradea grade on this quiz.
int$quizidthe id of the quiz object.
Returns:
string the comment that corresponds to this grade (empty string if there is not one.

Definition at line 259 of file reportlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Get the slots of real questions (not descriptions) in this quiz, in order.

Parameters:
object$quizthe quiz.
Returns:
array of slot => $question object with fields ->slot, ->id, ->maxmark, ->number, ->length.

Definition at line 95 of file reportlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

quiz_report_grade_bands ( bandwidth,
bands,
quizid,
userids = array() 
)

Get the nuber of students whose score was in a particular band for this quiz.

Parameters:
number$bandwidththe width of each band.
int$bandsthe number of bands
int$quizidthe quiz id.
array$useridslist of user ids.
Returns:
array band number => number of users with scores in that band.

Definition at line 191 of file reportlib.php.

quiz_report_highlighting_grading_method ( quiz,
qmsubselect,
qmfilter 
)

Definition at line 234 of file reportlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

quiz_report_index_by_keys ( datum,
keys,
keysunique = true 
)

Takes an array of objects and constructs a multidimensional array keyed by the keys it finds on the object.

Parameters:
array$datuman array of objects with properties on the object including the keys passed as the next param.
array$keysArray of strings with the names of the properties on the objects in datum that you want to index the multidimensional array by.
bool$keysuniqueIf there is not only one object for each combination of keys you are using you should set $keysunique to true. Otherwise all the object will be added to a zero based array. So the array returned will have count($keys) + 1 indexs.
Returns:
array multidimensional array properly indexed.

Definition at line 53 of file reportlib.php.

Here is the caller graph for this function:

quiz_report_list ( context)

Returns an array of reports to which the current user has access to.

Returns:
array reports are ordered as they should be for display in tabs.

Definition at line 320 of file reportlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

quiz_report_qm_filter_select ( quiz,
quizattemptsalias = 'quiza' 
)

Given the quiz grading method return sub select sql to find the id of the one attempt that will be graded for each user. Or return empty string if all attempts contribute to final grade.

Definition at line 144 of file reportlib.php.

Here is the caller graph for this function:

quiz_report_scale_summarks_as_percentage ( rawmark,
quiz,
round = true 
)

Format a number as a percentage out of $quiz->sumgrades

Parameters:
number$rawgradethe mark to format.
object$quizthe quiz settings
bool$roundwhether to round the results ot $quiz->decimalpoints.

Definition at line 301 of file reportlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

quiz_report_unindex ( datum)

Definition at line 74 of file reportlib.php.

 All Data Structures Namespaces Files Functions Variables Enumerations