|
Moodle PHP Documentation 4.5
Moodle 4.5.5+ (Build: 20250711) (ce34e8ff087)
|
Extends table_sql to provide a table of assignment submissions. More...
Public Member Functions | |
| __construct (assign $assignment, $perpage, $filter, $rowoffset, $quickgrading, $downloadfilename=null) | |
| overridden constructor keeps a reference to the assignment class that is displaying this table | |
| can_view_all_grades () | |
| Return things to the renderer. | |
| col_allocatedmarker (stdClass $row) | |
| list current marker | |
| col_allowsubmissionsfromdate (stdClass $row) | |
| Format a column of data for display. | |
| col_cutoffdate (stdClass $row) | |
| Format a column of data for display. | |
| col_duedate (stdClass $row) | |
| Format a column of data for display. | |
| col_finalgrade (stdClass $row) | |
| Format a column of data for display. | |
| col_fullname ($row) | |
| Format a user record for display (link to profile). | |
| col_grade (stdClass $row) | |
| Format a column of data for display. | |
| col_gradecanbechanged (stdClass $row) | |
| Format a column of data for display. | |
| col_grademax (stdClass $row) | |
| Format a column of data for display. | |
| col_outcomes (stdClass $row) | |
| Format a list of outcomes. | |
| col_recordid (stdClass $row) | |
| Add a column with an ID that uniquely identifies this user in this assignment. | |
| col_scale ($row) | |
| For download only - list all the valid options for this custom scale. | |
| col_select (stdClass $row) | |
| Insert a checkbox for selecting the current row for batch operations. | |
| col_status (stdClass $row) | |
| Format a column of data for display. | |
| col_team (stdClass $row) | |
| Get the team info for this user. | |
| col_timemarked (stdClass $row) | |
| Format a column of data for display. | |
| col_timesubmitted (stdClass $row) | |
| Format a column of data for display. | |
| col_workflowstate ($row) | |
| For download only - list current marking workflow state. | |
| col_workflowstatus (stdClass $row) | |
| list current marking workflow state | |
| display_grade ($grade, $editable, $userid, $modified) | |
| Display a grade with scales etc. | |
| finish_html () | |
| Finish the HTML output. | |
| format_row ($row) | |
| Before adding each row to the table make sure rownum is incremented. | |
| get_assignment_name () | |
| Return things to the renderer. | |
| get_column_data ($columnname) | |
| Using the current filtering and sorting - load all rows and return a single column from them. | |
| get_course_context () | |
| Return things to the renderer. | |
| get_course_id () | |
| Return things to the renderer. | |
| get_course_module_id () | |
| Return things to the renderer. | |
| get_paging_bar () | |
| Returns the html for the paging bar. | |
| get_paging_selector () | |
| Returns the html for the paging selector. | |
| get_row_class ($row) | |
| Add the userid to the row class so it can be updated via ajax. | |
| get_rows_per_page () | |
| Return the number of rows to display on a single page. | |
| get_sort_columns () | |
| Always return a valid sort - even if the userid column is missing. | |
| other_cols ($colname, $row) | |
| Format the submission and feedback columns. | |
| setup () | |
| Overides setup to ensure it will only run a single time. | |
| start_html () | |
| Start the HTML output. | |
| submissions_enabled () | |
| Return things to the renderer. | |
Public Attributes | |
| $actions = array() | |
| $caneditsubmission = $this->assignment->can_edit_submission($row->id, $USER->id) | |
| $edit = '' | |
| return | $edit |
| $flags = $row | |
| $hasattempts = $isunlimited || $row->attemptnumber < $this->assignment->get_instance()->maxattempts - 1 | |
| $hassubmission = !empty($row->status) | |
| if( $this->assignment->is_any_submission_plugin_enabled()) if(($this->assignment->get_instance() ->duedate||$this->assignment->get_instance() ->cutoffdate) && $this->hasgrantextension) if( $row->status==ASSIGN_SUBMISSION_STATUS_SUBMITTED &&$this->assignment->get_instance() ->submissiondrafts) if($row->status==ASSIGN_SUBMISSION_STATUS_DRAFT && $this->assignment->get_instance() ->submissiondrafts && $caneditsubmission && $submissionsopen && $row->id !=$USER->id | $ismanual ) = $this->assignment->get_instance()->attemptreopenmethod == ASSIGN_ATTEMPT_REOPEN_METHOD_MANUAL |
| $isunlimited = $this->assignment->get_instance()->maxattempts == ASSIGN_UNLIMITED_ATTEMPTS | |
| if($ismanual && $hassubmission && $notreopened && $hasattempts | $menu ) = new action_menu() |
| $noimage = null | |
| $notreopened = $hassubmission && $row->status != ASSIGN_SUBMISSION_STATUS_REOPENED | |
| $submission = $row | |
| if($this->assignment->get_instance() ->teamsubmission) | $submissionsopen |
| $url = new moodle_url('/mod/assign/view.php', $urlparams) | |
| $urlparams | |
| replacement | __FUNCTION__ |
| replacement | : null |
| Format a user picture for display. | |
| replacement | : null |
| Format a column of data for display. | |
| if($this->assignment->is_blind_marking()) | else |
| if(! $row->grade) | else |
| foreach($actions as $action) $menu | prioritise = true |
| replacement | reason: 'Picture column is merged with fullname column' )] public function col_picture(stdClass $row) { core\deprecation::emit_deprecation_if_present([$this |
| replacement | since: '4.5' |
Protected Member Functions | |
| get_group_and_submission ($userid, &$group, &$submission, $attemptnumber) | |
| Use a static cache to try and reduce DB calls. | |
| show_hide_link ($column, $index) | |
| Override the table show_hide_link to not show for select column. | |
Extends table_sql to provide a table of assignment submissions.
| assign_grading_table::__construct | ( | assign | $assignment, |
| $perpage, | |||
| $filter, | |||
| $rowoffset, | |||
| $quickgrading, | |||
| $downloadfilename = null ) |
overridden constructor keeps a reference to the assignment class that is displaying this table
| assign | $assignment | The assignment class |
| int | $perpage | how many per page |
| string | $filter | The current filter |
| int | $rowoffset | For showing a subsequent page of results |
| bool | $quickgrading | Is this table wrapped in a quickgrading form? |
| string | $downloadfilename |
| assign_grading_table::can_view_all_grades | ( | ) |
Return things to the renderer.
| bool | Can this user view all grades (the gradebook) |
| assign_grading_table::col_allocatedmarker | ( | stdClass | $row | ) |
list current marker
| stdClass | $row | - The row of data |
| id | the user->id of the marker. |
| assign_grading_table::col_allowsubmissionsfromdate | ( | stdClass | $row | ) |
Format a column of data for display.
| stdClass | $row |
| string |
| assign_grading_table::col_cutoffdate | ( | stdClass | $row | ) |
Format a column of data for display.
| stdClass | $row |
| string |
| assign_grading_table::col_duedate | ( | stdClass | $row | ) |
Format a column of data for display.
| stdClass | $row |
| string |
| assign_grading_table::col_finalgrade | ( | stdClass | $row | ) |
Format a column of data for display.
| stdClass | $row |
| string |
| assign_grading_table::col_fullname | ( | $row | ) |
Format a user record for display (link to profile).
| stdClass | $row |
| string |
| assign_grading_table::col_grade | ( | stdClass | $row | ) |
Format a column of data for display.
| stdClass | $row |
| string |
| assign_grading_table::col_gradecanbechanged | ( | stdClass | $row | ) |
Format a column of data for display.
| stdClass | $row |
| string |
| assign_grading_table::col_grademax | ( | stdClass | $row | ) |
Format a column of data for display.
| stdClass | $row |
| string |
| assign_grading_table::col_outcomes | ( | stdClass | $row | ) |
Format a list of outcomes.
| stdClass | $row |
| string |
| assign_grading_table::col_recordid | ( | stdClass | $row | ) |
Add a column with an ID that uniquely identifies this user in this assignment.
| stdClass | $row |
| string |
| assign_grading_table::col_scale | ( | $row | ) |
For download only - list all the valid options for this custom scale.
| stdClass | $row | - The row of data |
| string | A list of valid options for the current scale |
| assign_grading_table::col_select | ( | stdClass | $row | ) |
Insert a checkbox for selecting the current row for batch operations.
| stdClass | $row |
| string |
| assign_grading_table::col_status | ( | stdClass | $row | ) |
Format a column of data for display.
| stdClass | $row |
| string |
| assign_grading_table::col_team | ( | stdClass | $row | ) |
Get the team info for this user.
| stdClass | $row |
| string | The team name |
| assign_grading_table::col_timemarked | ( | stdClass | $row | ) |
Format a column of data for display.
| stdClass | $row |
| string |
| assign_grading_table::col_timesubmitted | ( | stdClass | $row | ) |
Format a column of data for display.
| stdClass | $row |
| string |
| assign_grading_table::col_workflowstate | ( | $row | ) |
For download only - list current marking workflow state.
| stdClass | $row | - The row of data |
| string | The current marking workflow state |
| assign_grading_table::col_workflowstatus | ( | stdClass | $row | ) |
list current marking workflow state
| stdClass | $row |
| string |
| assign_grading_table::display_grade | ( | $grade, | |
| $editable, | |||
| $userid, | |||
| $modified ) |
Display a grade with scales etc.
| string | $grade | |
| boolean | $editable | |
| int | $userid | The user id of the user this grade belongs to |
| int | $modified | Timestamp showing when the grade was last modified |
| string | The formatted grade |
| assign_grading_table::finish_html | ( | ) |
Finish the HTML output.
This function is essentially a copy of the parent function except the paging bar not being rendered.
| void |
| assign_grading_table::format_row | ( | $row | ) |
Before adding each row to the table make sure rownum is incremented.
| array | $row | row of data from db used to make one row of the table. |
| array | one row for the table |
| assign_grading_table::get_assignment_name | ( | ) |
Return things to the renderer.
| string | the assignment name |
| assign_grading_table::get_column_data | ( | $columnname | ) |
Using the current filtering and sorting - load all rows and return a single column from them.
| string | $columnname | The name of the raw column data |
| array | of data |
| assign_grading_table::get_course_context | ( | ) |
Return things to the renderer.
| stdClass | The course context |
| assign_grading_table::get_course_id | ( | ) |
Return things to the renderer.
| int | the course id |
| assign_grading_table::get_course_module_id | ( | ) |
Return things to the renderer.
| int | the course module id |
|
protected |
Use a static cache to try and reduce DB calls.
| int | $userid | The user id for this submission |
| int | $group | The groupid (returned) |
| stdClass | false | $submission | The stdClass submission or false (returned) |
| int | $attemptnumber | Return a specific attempt number (-1 for latest) |
| assign_grading_table::get_paging_bar | ( | ) |
Returns the html for the paging bar.
| string |
| assign_grading_table::get_paging_selector | ( | ) |
Returns the html for the paging selector.
| string |
| assign_grading_table::get_row_class | ( | $row | ) |
Add the userid to the row class so it can be updated via ajax.
| stdClass | $row | The row of data |
| string | The row class |
| assign_grading_table::get_rows_per_page | ( | ) |
Return the number of rows to display on a single page.
| int | The number of rows per page |
| assign_grading_table::get_sort_columns | ( | ) |
Always return a valid sort - even if the userid column is missing.
| array | column name => SORT_... constant. |
| assign_grading_table::other_cols | ( | $colname, | |
| $row ) |
Format the submission and feedback columns.
| string | $colname | The column name |
| stdClass | $row | The submission row |
| mixed | string or NULL |
|
protected |
Override the table show_hide_link to not show for select column.
| string | $column | the column name, index into various names. |
| int | $index | numerical index of the column. |
| string | HTML fragment. |
| assign_grading_table::start_html | ( | ) |
Start the HTML output.
This function is essentially a copy of the parent function except the paging bar not being rendered.
| void |
| assign_grading_table::submissions_enabled | ( | ) |
Return things to the renderer.
| bool | Does this assignment accept submissions |
| if ( $this->assignment->get_instance() ->teamsubmission) assign_grading_table::$submissionsopen |
| assign_grading_table::$urlparams |
| replacement assign_grading_table::__pad0__ |
Format a user picture for display.
| stdClass | $row |
| string |
| replacement assign_grading_table::__pad1__ |
Format a column of data for display.
| stdClass | $row |
| string |
| if ( $this->assignment->is_blind_marking()) assign_grading_table::else |
| if (! $row->grade) assign_grading_table::else |