moodle-report_usergrades/classes/usergrades_form.php

24 lines
710 B
PHP
Raw Normal View History

<?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')]);
// XLSX Export checkbox
$mform->addElement('checkbox', 'exportxls', get_string('exportxls', 'report_usergrades'));
// Add form action buttons
$this->add_action_buttons(false, get_string('showgrades', 'report_usergrades'));
}
}