Kumi
e3fd691910
Extracts and refactors user selection logic by moving user selector and form functionality into separate class files. This enhances code modularity and reusability across different parts of the application. Adds a detailed user grades report page that displays quiz attempts and grades for selected users, improving user grade reporting. Updates admin settings to include detailed report page link for navigation ease.
21 lines
No EOL
578 B
PHP
21 lines
No EOL
578 B
PHP
<?php
|
|
|
|
/**
|
|
* Form class for user selection
|
|
*/
|
|
class usergrades_form extends moodleform
|
|
{
|
|
public function definition()
|
|
{
|
|
$mform = $this->_form;
|
|
|
|
// User selector
|
|
$user_selector = new user_selector('userid', array('multiselect' => false));
|
|
$users = $user_selector->find_users('');
|
|
|
|
$mform->addElement('select', 'userid', get_string('selectuser', 'report_usergrades'), $users[get_string('users')]);
|
|
|
|
// Add form action buttons
|
|
$this->add_action_buttons(false, get_string('showgrades', 'report_usergrades'));
|
|
}
|
|
} |