mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-14238 - removing whitespaces.
This commit is contained in:
parent
93ea1294e3
commit
de75c481dc
1 changed files with 27 additions and 27 deletions
|
@ -147,7 +147,7 @@ class assignment_base {
|
||||||
*
|
*
|
||||||
* This in turn calls the methods producing individual parts of the page
|
* This in turn calls the methods producing individual parts of the page
|
||||||
*/
|
*/
|
||||||
function view() {
|
function view() {
|
||||||
|
|
||||||
$context = get_context_instance(CONTEXT_MODULE,$this->cm->id);
|
$context = get_context_instance(CONTEXT_MODULE,$this->cm->id);
|
||||||
require_capability('mod/assignment:view', $context);
|
require_capability('mod/assignment:view', $context);
|
||||||
|
@ -595,7 +595,7 @@ class assignment_base {
|
||||||
//make user global so we can use the id
|
//make user global so we can use the id
|
||||||
global $USER, $OUTPUT, $DB, $PAGE;
|
global $USER, $OUTPUT, $DB, $PAGE;
|
||||||
|
|
||||||
$mailinfo = optional_param('mailinfo', null, PARAM_BOOL);
|
$mailinfo = optional_param('mailinfo', null, PARAM_BOOL);
|
||||||
|
|
||||||
if (optional_param('next', null, PARAM_BOOL)) {
|
if (optional_param('next', null, PARAM_BOOL)) {
|
||||||
$mode='next';
|
$mode='next';
|
||||||
|
@ -612,7 +612,7 @@ class assignment_base {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
set_user_preference('assignment_mailinfo', $mailinfo);
|
set_user_preference('assignment_mailinfo', $mailinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($mode) {
|
switch ($mode) {
|
||||||
case 'grade': // We are in a main window grading
|
case 'grade': // We are in a main window grading
|
||||||
|
@ -985,7 +985,7 @@ class assignment_base {
|
||||||
global $USER;
|
global $USER;
|
||||||
$teacher = $USER;
|
$teacher = $USER;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->preprocess_submission($submission);
|
$this->preprocess_submission($submission);
|
||||||
|
|
||||||
$mformdata = new stdclass;
|
$mformdata = new stdclass;
|
||||||
|
@ -1010,7 +1010,7 @@ class assignment_base {
|
||||||
$mformdata->submissioncommentformat= FORMAT_HTML;
|
$mformdata->submissioncommentformat= FORMAT_HTML;
|
||||||
$mformdata->submission_content= $this->print_user_files($user->id,true);
|
$mformdata->submission_content= $this->print_user_files($user->id,true);
|
||||||
$mformdata->filter = $filter;
|
$mformdata->filter = $filter;
|
||||||
|
|
||||||
$submitform = new mod_assignment_grading_form( null, $mformdata );
|
$submitform = new mod_assignment_grading_form( null, $mformdata );
|
||||||
|
|
||||||
if ($submitform->is_cancelled()) {
|
if ($submitform->is_cancelled()) {
|
||||||
|
@ -1065,19 +1065,19 @@ class assignment_base {
|
||||||
/* first we check to see if the form has just been submitted
|
/* first we check to see if the form has just been submitted
|
||||||
* to request user_preference updates
|
* to request user_preference updates
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$filters = array(self::FILTER_ALL => get_string('all'),
|
$filters = array(self::FILTER_ALL => get_string('all'),
|
||||||
self::FILTER_SUBMITTED => get_string('submitted', 'assignment'),
|
self::FILTER_SUBMITTED => get_string('submitted', 'assignment'),
|
||||||
self::FILTER_REQUIRE_GRADING => get_string('requiregrading', 'assignment'));
|
self::FILTER_REQUIRE_GRADING => get_string('requiregrading', 'assignment'));
|
||||||
|
|
||||||
$updatepref = optional_param('updatepref', 0, PARAM_INT);
|
$updatepref = optional_param('updatepref', 0, PARAM_INT);
|
||||||
|
|
||||||
if (isset($_POST['updatepref'])){
|
if (isset($_POST['updatepref'])){
|
||||||
$perpage = optional_param('perpage', 10, PARAM_INT);
|
$perpage = optional_param('perpage', 10, PARAM_INT);
|
||||||
$perpage = ($perpage <= 0) ? 10 : $perpage ;
|
$perpage = ($perpage <= 0) ? 10 : $perpage ;
|
||||||
$filter = optional_param('filter', 0, PARAM_INT);
|
$filter = optional_param('filter', 0, PARAM_INT);
|
||||||
set_user_preference('assignment_perpage', $perpage);
|
set_user_preference('assignment_perpage', $perpage);
|
||||||
set_user_preference('assignment_quickgrade', optional_param('quickgrade', 0, PARAM_BOOL));
|
set_user_preference('assignment_quickgrade', optional_param('quickgrade', 0, PARAM_BOOL));
|
||||||
set_user_preference('assignment_filter', $filter);
|
set_user_preference('assignment_filter', $filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1112,7 +1112,7 @@ class assignment_base {
|
||||||
echo $OUTPUT->header();
|
echo $OUTPUT->header();
|
||||||
|
|
||||||
echo '<div class="usersubmissions">';
|
echo '<div class="usersubmissions">';
|
||||||
|
|
||||||
/// Print quickgrade form around the table
|
/// Print quickgrade form around the table
|
||||||
if ($quickgrade) {
|
if ($quickgrade) {
|
||||||
$formattrs = array();
|
$formattrs = array();
|
||||||
|
@ -1148,7 +1148,7 @@ class assignment_base {
|
||||||
|
|
||||||
/// Get all ppl that are allowed to submit assignments
|
/// Get all ppl that are allowed to submit assignments
|
||||||
list($esql, $params) = get_enrolled_sql($context, 'mod/assignment:submit', $currentgroup);
|
list($esql, $params) = get_enrolled_sql($context, 'mod/assignment:submit', $currentgroup);
|
||||||
|
|
||||||
if ($filter == self::FILTER_ALL) {
|
if ($filter == self::FILTER_ALL) {
|
||||||
$sql = "SELECT u.id FROM {user} u ".
|
$sql = "SELECT u.id FROM {user} u ".
|
||||||
"LEFT JOIN ($esql) eu ON eu.id=u.id ".
|
"LEFT JOIN ($esql) eu ON eu.id=u.id ".
|
||||||
|
@ -1249,11 +1249,11 @@ class assignment_base {
|
||||||
if ($where = $table->get_sql_where()) {
|
if ($where = $table->get_sql_where()) {
|
||||||
$where .= ' AND ';
|
$where .= ' AND ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($filter == self::FILTER_SUBMITTED) {
|
if($filter == self::FILTER_SUBMITTED) {
|
||||||
$where .= 's.timemodified > 0 AND ';
|
$where .= 's.timemodified > 0 AND ';
|
||||||
} else if($filter == self::FILTER_REQUIRE_GRADING) {
|
} else if($filter == self::FILTER_REQUIRE_GRADING) {
|
||||||
$where .= 's.timemarked < s.timemodified AND ';
|
$where .= 's.timemarked < s.timemodified AND ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($sort = $table->get_sql_sort()) {
|
if ($sort = $table->get_sql_sort()) {
|
||||||
|
@ -1274,7 +1274,7 @@ class assignment_base {
|
||||||
$ausers = $DB->get_records_sql($select.$sql.$sort, null, $table->get_page_start(), $table->get_page_size());
|
$ausers = $DB->get_records_sql($select.$sql.$sort, null, $table->get_page_start(), $table->get_page_size());
|
||||||
|
|
||||||
$table->pagesize($perpage, count($users));
|
$table->pagesize($perpage, count($users));
|
||||||
|
|
||||||
///offset used to calculate index of student in that particular query, needed for the pop up to know who's next
|
///offset used to calculate index of student in that particular query, needed for the pop up to know who's next
|
||||||
$offset = $page * $perpage;
|
$offset = $page * $perpage;
|
||||||
$strupdate = get_string('update');
|
$strupdate = get_string('update');
|
||||||
|
@ -1282,7 +1282,7 @@ class assignment_base {
|
||||||
$grademenu = make_grades_menu($this->assignment->grade);
|
$grademenu = make_grades_menu($this->assignment->grade);
|
||||||
|
|
||||||
if ($ausers !== false) {
|
if ($ausers !== false) {
|
||||||
$grading_info = grade_get_grades($this->course->id, 'mod', 'assignment', $this->assignment->id, array_keys($ausers));
|
$grading_info = grade_get_grades($this->course->id, 'mod', 'assignment', $this->assignment->id, array_keys($ausers));
|
||||||
$endposition = $offset + $perpage;
|
$endposition = $offset + $perpage;
|
||||||
$currentposition = 0;
|
$currentposition = 0;
|
||||||
foreach ($ausers as $auser) {
|
foreach ($ausers as $auser) {
|
||||||
|
@ -1424,7 +1424,7 @@ class assignment_base {
|
||||||
$row[] = $outcomes;
|
$row[] = $outcomes;
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->add_data($row);
|
$table->add_data($row);
|
||||||
}
|
}
|
||||||
$currentposition++;
|
$currentposition++;
|
||||||
}
|
}
|
||||||
|
@ -1439,44 +1439,44 @@ class assignment_base {
|
||||||
$mailinfopref = true;
|
$mailinfopref = true;
|
||||||
}
|
}
|
||||||
$emailnotification = html_writer::checkbox('mailinfo', 1, $mailinfopref, get_string('enableemailnotification','assignment'));
|
$emailnotification = html_writer::checkbox('mailinfo', 1, $mailinfopref, get_string('enableemailnotification','assignment'));
|
||||||
|
|
||||||
$emailnotification .= $OUTPUT->help_icon('enableemailnotification', 'assignment');
|
$emailnotification .= $OUTPUT->help_icon('enableemailnotification', 'assignment');
|
||||||
echo html_writer::tag('div', $emailnotification, array('class'=>'emailnotification'));
|
echo html_writer::tag('div', $emailnotification, array('class'=>'emailnotification'));
|
||||||
|
|
||||||
$savefeedback = html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'fastg', 'value'=>get_string('saveallfeedback', 'assignment')));
|
$savefeedback = html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'fastg', 'value'=>get_string('saveallfeedback', 'assignment')));
|
||||||
echo html_writer::tag('div', $savefeedback, array('class'=>'fastgbutton'));
|
echo html_writer::tag('div', $savefeedback, array('class'=>'fastgbutton'));
|
||||||
|
|
||||||
echo html_writer::end_tag('form');
|
echo html_writer::end_tag('form');
|
||||||
} else if ($quickgrade) {
|
} else if ($quickgrade) {
|
||||||
echo html_writer::end_tag('form');
|
echo html_writer::end_tag('form');
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
/// End of fast grading form
|
/// End of fast grading form
|
||||||
|
|
||||||
/// Mini form for setting user preference
|
/// Mini form for setting user preference
|
||||||
|
|
||||||
$formaction = new moodle_url('/mod/assignment/submissions.php', array('id'=>$this->cm->id));
|
$formaction = new moodle_url('/mod/assignment/submissions.php', array('id'=>$this->cm->id));
|
||||||
$mform = new MoodleQuickForm('optionspref', 'post', $formaction, '', array('class'=>'optionspref'));
|
$mform = new MoodleQuickForm('optionspref', 'post', $formaction, '', array('class'=>'optionspref'));
|
||||||
|
|
||||||
$mform->addElement('hidden', 'updatepref');
|
$mform->addElement('hidden', 'updatepref');
|
||||||
$mform->setDefault('updatepref', 1);
|
$mform->setDefault('updatepref', 1);
|
||||||
$mform->addElement('header', 'qgprefs', get_string('optionalsettings', 'assignment'));
|
$mform->addElement('header', 'qgprefs', get_string('optionalsettings', 'assignment'));
|
||||||
$mform->addElement('select', 'filter', get_string('show'), $filters);
|
$mform->addElement('select', 'filter', get_string('show'), $filters);
|
||||||
|
|
||||||
$mform->setDefault('filter', $filter);
|
$mform->setDefault('filter', $filter);
|
||||||
|
|
||||||
$mform->addElement('text', 'perpage', get_string('pagesize', 'assignment'), array('size'=>1));
|
$mform->addElement('text', 'perpage', get_string('pagesize', 'assignment'), array('size'=>1));
|
||||||
$mform->setDefault('perpage', $perpage);
|
$mform->setDefault('perpage', $perpage);
|
||||||
|
|
||||||
$mform->addElement('checkbox', 'quickgrade', get_string('quickgrade','assignment'));
|
$mform->addElement('checkbox', 'quickgrade', get_string('quickgrade','assignment'));
|
||||||
$mform->setDefault('quickgrade', $quickgrade);
|
$mform->setDefault('quickgrade', $quickgrade);
|
||||||
$mform->addHelpButton('quickgrade', 'quickgrade', 'assignment');
|
$mform->addHelpButton('quickgrade', 'quickgrade', 'assignment');
|
||||||
|
|
||||||
$mform->addElement('submit', 'savepreferences', get_string('savepreferences'));
|
$mform->addElement('submit', 'savepreferences', get_string('savepreferences'));
|
||||||
|
|
||||||
$mform->display();
|
$mform->display();
|
||||||
|
|
||||||
echo $OUTPUT->footer();
|
echo $OUTPUT->footer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue