mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 11:26:41 +02:00
Added validation to grading form, implemented methods in advanced grading to return form contents and process and return the final grade
This commit is contained in:
parent
6abcb0c21f
commit
18e6298c7b
4 changed files with 133 additions and 7 deletions
|
@ -374,6 +374,19 @@ class grading_manager {
|
|||
return new $classname($this->context, $this->component, $this->area, $this->areacache->id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the controller for the active method if it is available
|
||||
*/
|
||||
public function get_active_controller() {
|
||||
if ($gradingmethod = $this->get_active_method()) {
|
||||
$controller = $this->get_controller($gradingmethod);
|
||||
if ($controller->is_form_available()) {
|
||||
return $controller;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue