PageRenderTime 38ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/mod/assign/quickgradingform.php

https://bitbucket.org/synergylearning/campusconnect
PHP | 66 lines | 21 code | 10 blank | 35 comment | 1 complexity | cae8ee4959d6b19a909bc78b13e31197 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 create and edit an instance of this module
  18. *
  19. * @package mod_assign
  20. * @copyright 2012 NetSpot {@link http://www.netspot.com.au}
  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/locallib.php');
  26. /**
  27. * Assignment quick grading form
  28. *
  29. * @package mod_assign
  30. * @copyright 2012 NetSpot {@link http://www.netspot.com.au}
  31. * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  32. */
  33. class mod_assign_quick_grading_form extends moodleform {
  34. /**
  35. * Define this form - called from the parent constructor
  36. */
  37. public function definition() {
  38. $mform = $this->_form;
  39. $instance = $this->_customdata;
  40. // Visible elements.
  41. $mform->addElement('html', $instance['gradingtable']);
  42. // Hidden params.
  43. $mform->addElement('hidden', 'id', $instance['cm']);
  44. $mform->setType('id', PARAM_INT);
  45. $mform->addElement('hidden', 'action', 'quickgrade');
  46. $mform->setType('action', PARAM_ALPHA);
  47. $mform->addElement('hidden', 'lastpage', $instance['page']);
  48. $mform->setType('lastpage', PARAM_INT);
  49. // Skip notifications option.
  50. $mform->addElement('selectyesno', 'sendstudentnotifications', get_string('sendstudentnotifications', 'assign'));
  51. $mform->setDefault('sendstudentnotifications', 1);
  52. // Buttons.
  53. $savemessage = get_string('saveallquickgradingchanges', 'assign');
  54. $mform->addElement('submit', 'savequickgrades', $savemessage);
  55. }
  56. }