Search moodle.org's
Developer Documentation


  • Bug fixes for general core bugs in 2.8.x ended 9 November 2015 (12 months).
  • Bug fixes for security issues in 2.8.x ended 9 May 2016 (18 months).
  • minimum PHP 5.4.4 (always use latest PHP 5.4.x or 5.5.x on Windows - http://windows.php.net/download/), PHP 7 is NOT supported
  • Differences Between: [Versions 28 and 29] [Versions 28 and 30] [Versions 28 and 31] [Versions 28 and 32] [Versions 28 and 33] [Versions 28 and 34] [Versions 28 and 35] [Versions 28 and 36] [Versions 28 and 37]

    This file contains the definition for the grading table which subclassses easy_table

    Copyright: 2012 NetSpot {@link http://www.netspot.com.au}
    License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
    File Size: 1388 lines (57 kb)
    Included or required:0 times
    Referenced: 0 times
    Includes or requires: 0 files

    Defines 1 class


    Class: assign_grading_table  - X-Ref

    Extends table_sql to provide a table of assignment submissions

    __construct(assign $assignment,$perpage,$filter,$rowoffset,$quickgrading,$downloadfilename = null)   X-Ref
    overridden constructor keeps a reference to the assignment class that is displaying this table

    param: assign $assignment The assignment class
    param: int $perpage how many per page
    param: string $filter The current filter
    param: int $rowoffset For showing a subsequent page of results
    param: bool $quickgrading Is this table wrapped in a quickgrading form?
    param: string $downloadfilename

    format_row($row)   X-Ref
    Before adding each row to the table make sure rownum is incremented.

    return: array one row for the table
    param: array $row row of data from db used to make one row of the table.

    col_recordid(stdClass $row)   X-Ref
    Add a column with an ID that uniquely identifies this user in this assignment.

    return: string
    param: stdClass $row

    get_row_class($row)   X-Ref
    Add the userid to the row class so it can be updated via ajax.

    return: string The row class
    param: stdClass $row The row of data

    get_rows_per_page()   X-Ref
    Return the number of rows to display on a single page.

    return: int The number of rows per page

    col_workflowstatus(stdClass $row)   X-Ref
    list current marking workflow state

    return: string
    param: stdClass $row

    col_workflowstate($row)   X-Ref
    For download only - list current marking workflow state

    return: string The current marking workflow state
    param: stdClass $row - The row of data

    col_allocatedmarker(stdClass $row)   X-Ref
    list current marker

    return: id the user->id of the marker.
    param: stdClass $row - The row of data

    col_scale($row)   X-Ref
    For download only - list all the valid options for this custom scale.

    return: string A list of valid options for the current scale
    param: stdClass $row - The row of data

    display_grade($grade, $editable, $userid, $modified)   X-Ref
    Display a grade with scales etc.

    return: string The formatted grade
    param: string $grade
    param: boolean $editable
    param: int $userid The user id of the user this grade belongs to
    param: int $modified Timestamp showing when the grade was last modified

    col_team(stdClass $row)   X-Ref
    Get the team info for this user.

    return: string The team name
    param: stdClass $row

    get_group_and_submission($userid, &$group, &$submission, $attemptnumber)   X-Ref
    Use a static cache to try and reduce DB calls.

    param: int $userid The user id for this submission
    param: int $group The groupid (returned)
    param: stdClass|false $submission The stdClass submission or false (returned)
    param: int $attemptnumber Return a specific attempt number (-1 for latest)

    col_outcomes(stdClass $row)   X-Ref
    Format a list of outcomes.

    return: string
    param: stdClass $row

    col_picture(stdClass $row)   X-Ref
    Format a user picture for display.

    return: string
    param: stdClass $row

    col_fullname($row)   X-Ref
    Format a user record for display (link to profile).

    return: string
    param: stdClass $row

    col_select(stdClass $row)   X-Ref
    Insert a checkbox for selecting the current row for batch operations.

    return: string
    param: stdClass $row

    get_gradebook_data_for_user($userid)   X-Ref
    Return a users grades from the listing of all grade data for this assignment.

    return: mixed stdClass or false
    param: int $userid

    col_gradecanbechanged(stdClass $row)   X-Ref
    Format a column of data for display.

    return: string
    param: stdClass $row

    col_grademax(stdClass $row)   X-Ref
    Format a column of data for display

    return: string
    param: stdClass $row

    col_grade(stdClass $row)   X-Ref
    Format a column of data for display.

    return: string
    param: stdClass $row

    col_finalgrade(stdClass $row)   X-Ref
    Format a column of data for display.

    return: string
    param: stdClass $row

    col_timemarked(stdClass $row)   X-Ref
    Format a column of data for display.

    return: string
    param: stdClass $row

    col_timesubmitted(stdClass $row)   X-Ref
    Format a column of data for display.

    return: string
    param: stdClass $row

    col_status(stdClass $row)   X-Ref
    Format a column of data for display

    return: string
    param: stdClass $row

    col_userid(stdClass $row)   X-Ref
    Format a column of data for display.

    return: string
    param: stdClass $row

    format_plugin_summary_with_link(assign_plugin $plugin,stdClass $item,$returnaction,$returnparams)   X-Ref
    Write the plugin summary with an optional link to view the full feedback/submission.

    return: string The summary with an optional link
    param: assign_plugin $plugin Submission plugin or feedback plugin
    param: stdClass $item Submission or grade
    param: string $returnaction The return action to pass to the
    param: string $returnparams The return params to pass to the view_submission

    other_cols($colname, $row)   X-Ref
    Format the submission and feedback columns.

    return: mixed string or NULL
    param: string $colname The column name
    param: stdClass $row The submission row

    get_column_data($columnname)   X-Ref
    Using the current filtering and sorting - load all rows and return a single column from them.

    return: array of data
    param: string $columnname The name of the raw column data

    get_assignment_name()   X-Ref
    Return things to the renderer.

    return: string the assignment name

    get_course_module_id()   X-Ref
    Return things to the renderer.

    return: int the course module id

    get_course_id()   X-Ref
    Return things to the renderer.

    return: int the course id

    get_course_context()   X-Ref
    Return things to the renderer.

    return: stdClass The course context

    submissions_enabled()   X-Ref
    Return things to the renderer.

    return: bool Does this assignment accept submissions

    can_view_all_grades()   X-Ref
    Return things to the renderer.

    return: bool Can this user view all grades (the gradebook)

    get_sort_columns()   X-Ref
    Always return a valid sort - even if the userid column is missing.

    return: array column name => SORT_... constant.

    show_hide_link($column, $index)   X-Ref
    Override the table show_hide_link to not show for select column.

    return: string HTML fragment.
    param: string $column the column name, index into various names.
    param: int $index numerical index of the column.

    Search This Site: