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

Public Member Functions

 display ($quiz, $cm, $course)

Data Fields

const DEFAULT_PAGE_SIZE = 5
const DEFAULT_ORDER = 'random'

Protected Member Functions

 get_qubaids_condition ()
 load_attempts_by_usage_ids ($qubaids)
 base_url ()
 list_questions_url ($includeauto=null)
 grade_question_url ($slot, $questionid, $grade, $page=true)
 format_count_for_table ($counts, $type, $gradestring)
 display_index ($includeauto)
 display_grading_interface ($slot, $questionid, $grade, $pagesize, $page, $shownames, $showidnumbers, $order)
 get_question_heading ($attempt, $shownames, $showidnumbers)
 validate_submitted_marks ()
 process_submitted_data ()
 get_question_state_summary ($slots)
 get_usage_ids_where_question_in_state ($summarystate, $slot, $questionid=null, $orderby= 'random', $page=0, $pagesize=null)

Protected Attributes

 $viewoptions = array()
 $questions
 $currentgroup
 $users
 $cm
 $quiz
 $context

Detailed Description

Quiz report to help teachers manually grade questions that need it.

This report basically provides two screens:

  • List question that might need manual grading (or optionally all questions).
  • Provide an efficient UI to grade all attempts at a particular question.

Definition at line 42 of file report.php.


Member Function Documentation

base_url ( ) [protected]

Get the URL of the front page of the report that lists all the questions.

Parameters:
$includeautoif not given, use the current setting, otherwise, force a paricular value of includeauto in the URL.
Returns:
string the URL.

Definition at line 190 of file report.php.

Here is the caller graph for this function:

display ( cm,
course,
quiz 
)

Override this function to displays the report.

Parameters:
$cmthe course-module for this quiz.
$coursethe coures we are in.
$quizthis quiz.

Reimplemented from quiz_default_report.

Definition at line 54 of file report.php.

Here is the call graph for this function:

display_grading_interface ( slot,
questionid,
grade,
pagesize,
page,
shownames,
showidnumbers,
order 
) [protected]

Definition at line 315 of file report.php.

Here is the call graph for this function:

Here is the caller graph for this function:

display_index ( includeauto) [protected]

Definition at line 246 of file report.php.

Here is the call graph for this function:

Here is the caller graph for this function:

format_count_for_table ( counts,
type,
gradestring 
) [protected]

Definition at line 235 of file report.php.

Here is the call graph for this function:

Here is the caller graph for this function:

get_qubaids_condition ( ) [protected]

Definition at line 146 of file report.php.

Here is the caller graph for this function:

get_question_heading ( attempt,
shownames,
showidnumbers 
) [protected]

Definition at line 420 of file report.php.

Here is the caller graph for this function:

get_question_state_summary ( slots) [protected]

Load information about the number of attempts at various questions in each summarystate.

The results are returned as an two dimensional array $qubaid => $slot => $dataobject

Parameters:
array$slotsA list of slots for the questions you want to konw about.
Returns:
array The array keys are slot,qestionid. The values are objects with fields $slot, $questionid, $inprogress, $name, $needsgrading, $autograded, $manuallygraded and $all.

Definition at line 502 of file report.php.

Here is the call graph for this function:

Here is the caller graph for this function:

get_usage_ids_where_question_in_state ( summarystate,
slot,
questionid = null,
orderby = 'random',
page = 0,
pagesize = null 
) [protected]

Get a list of usage ids where the question with slot $slot, and optionally also with question id $questionid, is in summary state $summarystate. Also return the total count of such states.

Only a subset of the ids can be returned by using $orderby, $limitfrom and $limitnum. A special value 'random' can be passed as $orderby, in which case $limitfrom is ignored.

Parameters:
int$slotThe slot for the questions you want to konw about.
int$questionid(optional) Only return attempts that were of this specific question.
string$summarystate'all', 'needsgrading', 'autograded' or 'manuallygraded'.
string$orderby'random', 'date', 'student' or 'idnumber'.
int$pageimplements paging of the results. Ignored if $orderby = random or $pagesize is null.
int$pagesizeimplements paging of the results. null = all.

Definition at line 525 of file report.php.

Here is the call graph for this function:

Here is the caller graph for this function:

grade_question_url ( slot,
questionid,
grade,
page = true 
) [protected]
Parameters:
int$slot
int$questionid
string$grade
mixed$page= true, link to current page. false = omit page. number = link to specific page.

Definition at line 220 of file report.php.

Here is the call graph for this function:

Here is the caller graph for this function:

list_questions_url ( includeauto = null) [protected]

Get the URL of the front page of the report that lists all the questions.

Parameters:
$includeautoif not given, use the current setting, otherwise, force a paricular value of includeauto in the URL.
Returns:
string the URL.

Definition at line 201 of file report.php.

Here is the call graph for this function:

Here is the caller graph for this function:

load_attempts_by_usage_ids ( qubaids) [protected]

Definition at line 164 of file report.php.

Here is the caller graph for this function:

process_submitted_data ( ) [protected]

Definition at line 470 of file report.php.

Here is the call graph for this function:

Here is the caller graph for this function:

validate_submitted_marks ( ) [protected]

Definition at line 440 of file report.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$cm [protected]

Definition at line 50 of file report.php.

$context [protected]

Definition at line 52 of file report.php.

$currentgroup [protected]

Definition at line 48 of file report.php.

$questions [protected]

Definition at line 47 of file report.php.

$quiz [protected]

Definition at line 51 of file report.php.

$users [protected]

Definition at line 49 of file report.php.

$viewoptions = array() [protected]

Definition at line 46 of file report.php.

const DEFAULT_ORDER = 'random'

Definition at line 44 of file report.php.

const DEFAULT_PAGE_SIZE = 5

Definition at line 43 of file report.php.


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