PageRenderTime 64ms CodeModel.GetById 37ms RepoModel.GetById 1ms app.codeStats 0ms

/mod/assign/batchsetallocatedmarkerform.php

https://bitbucket.org/synergylearning/campusconnect
PHP | 62 lines | 21 code | 10 blank | 31 comment | 1 complexity | 660a673dff66476b2a0690fc85cb7733 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, LGPL-3.0, GPL-3.0, LGPL-2.1, Apache-2.0, BSD-3-Clause, AGPL-3.0
  1. <?php
  2. // This file is part of Moodle - http://moodle.org/
  3. //
  4. // Moodle is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // Moodle is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
  16. /**
  17. * This file contains the forms to set the allocated marker for selected submissions.
  18. *
  19. * @package mod_assign
  20. * @copyright 2013 Catalyst IT {@link http://www.catalyst.net.nz}
  21. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  22. */
  23. defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
  24. require_once($CFG->libdir.'/formslib.php');
  25. require_once($CFG->dirroot . '/mod/assign/feedback/file/locallib.php');
  26. /**
  27. * Set allocated marker form.
  28. *
  29. * @package mod_assign
  30. * @copyright 2013 Catalyst IT {@link http://www.catalyst.net.nz}
  31. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  32. */
  33. class mod_assign_batch_set_allocatedmarker_form extends moodleform {
  34. /**
  35. * Define this form - called by the parent constructor
  36. */
  37. public function definition() {
  38. $mform = $this->_form;
  39. $params = $this->_customdata;
  40. $mform->addElement('header', 'general', get_string('batchsetallocatedmarker', 'assign', $params['userscount']));
  41. $mform->addElement('static', 'userslist', get_string('selectedusers', 'assign'), $params['usershtml']);
  42. $options = $params['markers'];
  43. $mform->addElement('select', 'allocatedmarker', get_string('allocatedmarker', 'assign'), $options);
  44. $mform->addElement('hidden', 'id');
  45. $mform->setType('id', PARAM_INT);
  46. $mform->addElement('hidden', 'action', 'setbatchmarkingallocation');
  47. $mform->setType('action', PARAM_ALPHA);
  48. $mform->addElement('hidden', 'selectedusers');
  49. $mform->setType('selectedusers', PARAM_SEQUENCE);
  50. $this->add_action_buttons(true, get_string('savechanges'));
  51. }
  52. }