MDL-27920 gradebook: fixes following integration review

This commit is contained in:
Andrew Davis (andyjdavis) 2011-06-23 15:58:44 +08:00
parent 7ce5df8620
commit 8de7c8a7ff
2 changed files with 2 additions and 3 deletions

View File

@ -58,8 +58,7 @@ if ($data = $mform->get_data()) {
$export->process_form($data);
$export->print_continue();
$require_user_idnumber = true; //skip users without idnumber as they cannot be identified when importing
$export->display_preview($require_user_idnumber);
$export->display_preview(true); //true == skip users without idnumber as they cannot be identified when importing
echo $OUTPUT->container(get_string('useridnumberwarning','gradeexport_xml'), 'useridnumberwarning mdl-align');
echo $OUTPUT->footer();

View File

@ -275,7 +275,7 @@ class graded_users_iterator {
function _pop() {
global $DB;
if (empty($this->gradestack)) {
if (!$this->grades_rs) {
if (empty($this->grades_rs) || !$this->grades_rs->valid()) {
return null; // no grades present
}