Skip to content

Commit

Permalink
MDL-77635 core_grades: Use sticky footer on import grades page
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyatregubov committed Jun 8, 2023
1 parent 4838f8e commit 44bd656
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion grade/import/direct/classes/import_form.php
Expand Up @@ -74,6 +74,6 @@ public function definition() {
$mform->addElement('advcheckbox', 'forceimport', get_string('forceimport', 'grades'));
$mform->addHelpButton('forceimport', 'forceimport', 'grades');
$mform->setDefault('forceimport', false);
$this->add_action_buttons(false, get_string('uploadgrades', 'grades'));
$this->add_sticky_action_buttons(false, get_string('uploadgrades', 'grades'));
}
}
2 changes: 1 addition & 1 deletion grade/import/direct/classes/mapping_form.php
Expand Up @@ -112,6 +112,6 @@ public function definition() {
$mform->addElement('hidden', 'forceimport', $this->_customdata['forceimport']);
$mform->setType('forceimport', PARAM_BOOL);
$mform->setConstant('forceimport', $this->_customdata['forceimport']);
$this->add_action_buttons(false, get_string('uploadgrades', 'grades'));
$this->add_sticky_action_buttons(false, get_string('uploadgrades', 'grades'));
}
}
19 changes: 14 additions & 5 deletions grade/import/direct/index.php
Expand Up @@ -14,10 +14,19 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

require_once(__DIR__ . "/../../../config.php");
require_once($CFG->libdir.'/gradelib.php');
require_once($CFG->dirroot.'/grade/lib.php');
require_once($CFG->dirroot.'/grade/import/lib.php');
/**
* Page to import grades directly from a spreadsheet (Excel or Libre Office):
*
* @package gradeimport
* @copyright 2007 Moodle Pty Ltd (http://moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

require_once("../../../config.php");
require_once($CFG->libdir . '/gradelib.php');
require_once($CFG->dirroot . '/grade/lib.php');
require_once($CFG->dirroot . '/grade/import/grade_import_form.php');
require_once($CFG->dirroot . '/grade/import/lib.php');
require_once($CFG->libdir . '/csvlib.class.php');

$id = required_param('id', PARAM_INT); // Course id.
Expand Down Expand Up @@ -124,4 +133,4 @@
// If data hasn't been submitted then display the data mapping form.
$mform2->display();
echo $OUTPUT->footer();
}
}
4 changes: 2 additions & 2 deletions grade/import/grade_import_form.php
Expand Up @@ -80,7 +80,7 @@ function definition (){
$mform->setType('forceimport', PARAM_BOOL);
$mform->addElement('hidden', 'groupid', groups_get_course_group($COURSE));
$mform->setType('groupid', PARAM_INT);
$this->add_action_buttons(false, get_string('uploadgrades', 'grades'));
$this->add_sticky_action_buttons(false, get_string('uploadgrades', 'grades'));
}
}

Expand Down Expand Up @@ -165,7 +165,7 @@ function definition () {
$mform->addElement('hidden', 'forceimport', $this->_customdata['forceimport']);
$mform->setType('forceimport', PARAM_BOOL);
$mform->setConstant('forceimport', $this->_customdata['forceimport']);
$this->add_action_buttons(false, get_string('uploadgrades', 'grades'));
$this->add_sticky_action_buttons(false, get_string('uploadgrades', 'grades'));

}
}
6 changes: 4 additions & 2 deletions grade/import/xml/index.php
Expand Up @@ -16,8 +16,10 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

require_once('../../../config.php');
require_once('lib.php');
require_once('grade_import_form.php');
require_once($CFG->libdir . '/gradelib.php');
require_once($CFG->dirroot . '/grade/lib.php');
require_once($CFG->dirroot . '/grade/import/grade_import_form.php');
require_once($CFG->dirroot . '/grade/import/lib.php');

$id = required_param('id', PARAM_INT); // course id

Expand Down
4 changes: 4 additions & 0 deletions grade/report/user/styles.css
Expand Up @@ -185,3 +185,7 @@
display: none;
}
}

#fitem_id_submitbutton {
padding-right: 2em;
}

0 comments on commit 44bd656

Please sign in to comment.