diff --git a/mod/assignment/index.php b/mod/assignment/index.php index 467bcbaee0d19..71eb0237ed3b7 100644 --- a/mod/assignment/index.php +++ b/mod/assignment/index.php @@ -47,10 +47,8 @@ if ($usesections) { $table->head = array ($strsectionname, $strname, $strassignmenttype, $strduedate, $strsubmitted, $strgrade); - $table->align = array ("center", "left", "left", "left", "right"); } else { $table->head = array ($strname, $strassignmenttype, $strduedate, $strsubmitted, $strgrade); - $table->align = array ("left", "left", "left", "right"); } $currentsection = ""; diff --git a/mod/assignment/lang/en/assignment.php b/mod/assignment/lang/en/assignment.php index 443353ba56c86..f57c5009c636f 100644 --- a/mod/assignment/lang/en/assignment.php +++ b/mod/assignment/lang/en/assignment.php @@ -151,6 +151,7 @@ $string['notsubmittedyet'] = 'Not submitted yet'; $string['onceassignmentsent'] = 'Once the assignment is sent for marking, you will no longer be able to delete or attach file(s). Do you want to continue?'; $string['operation'] = 'Operation'; +$string['optionalsettings'] = 'Optional settings'; $string['overwritewarning'] = 'Warning: uploading again will REPLACE your current submission'; $string['pagesize'] = 'Submissions shown per page'; $string['pluginadministration'] = 'Assignment administration'; @@ -158,6 +159,7 @@ $string['preventlate'] = 'Prevent late submissions'; $string['quickgrade'] = 'Allow quick grading'; $string['quickgrade_help'] = 'If enabled, multiple assignments can be graded on one page. Add grades and comments then click the "Save all my feedback" button to save all changes for that page.'; +$string['requiregrading'] = 'Require grading'; $string['responsefiles'] = 'Response files'; $string['reviewed'] = 'Reviewed'; $string['saveallfeedback'] = 'Save all my feedback'; diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index f5f2aecc20730..fd63d8ed8363a 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -46,6 +46,10 @@ */ class assignment_base { + const FILTER_ALL = 0; + const FILTER_SUBMITTED = 1; + const FILTER_REQUIRE_GRADING = 2; + /** @var object */ var $cm; /** @var object */ @@ -143,7 +147,7 @@ function assignment_base($cmid='staticonly', $assignment=NULL, $cm=NULL, $course * * 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); require_capability('mod/assignment:view', $context); @@ -591,8 +595,7 @@ function submissions($mode) { //make user global so we can use the id global $USER, $OUTPUT, $DB, $PAGE; - $mailinfo = optional_param('mailinfo', null, PARAM_BOOL); - $saved = optional_param('saved', null, PARAM_BOOL); + $mailinfo = optional_param('mailinfo', null, PARAM_BOOL); if (optional_param('next', null, PARAM_BOOL)) { $mode='next'; @@ -602,14 +605,14 @@ function submissions($mode) { } if (is_null($mailinfo)) { - $mailinfo = get_user_preferences('assignment_mailinfo', 0); + if (optional_param('sesskey', null, PARAM_BOOL)) { + set_user_preference('assignment_mailinfo', $mailinfo); + } else { + $mailinfo = get_user_preferences('assignment_mailinfo', 0); + } } else { set_user_preference('assignment_mailinfo', $mailinfo); - } - - if ($saved) { - $OUTPUT->heading(get_string('changessaved')); - } + } switch ($mode) { case 'grade': // We are in a main window grading @@ -906,6 +909,7 @@ function display_submission($offset=-1,$userid =-1) { if ($offset==-1) { $offset = required_param('offset', PARAM_INT);//offset for where to start looking for student. } + $filter = optional_param('filter', 0, PARAM_INT); if (!$user = $DB->get_record('user', array('id'=>$userid))) { print_error('nousers'); @@ -944,6 +948,12 @@ function display_submission($offset=-1,$userid =-1) { } $nextid = 0; + $where = ''; + if($filter == 'submitted') { + $where .= 's.timemodified > 0 AND '; + } else if($filter == 'requiregrading') { + $where .= 's.timemarked < s.timemodified AND '; + } if ($users) { $userfields = user_picture::fields('u', array('lastaccess')); @@ -953,8 +963,8 @@ function display_submission($offset=-1,$userid =-1) { COALESCE(SIGN(SIGN(s.timemarked) + SIGN(s.timemarked - s.timemodified)), 0) AS status "; $sql = 'FROM {user} u '. 'LEFT JOIN {assignment_submissions} s ON u.id = s.userid - AND s.assignment = '.$this->assignment->id.' '. - 'WHERE u.id IN ('.implode(',', $users).') '; + AND s.assignment = '.$this->assignment->id.' '. + 'WHERE '.$where.'u.id IN ('.implode(',', $users).') '; if ($sort = flexible_table::get_sort_for_table('mod-assignment-submissions')) { $sort = 'ORDER BY '.$sort.' '; @@ -975,7 +985,7 @@ function display_submission($offset=-1,$userid =-1) { global $USER; $teacher = $USER; } - + $this->preprocess_submission($submission); $mformdata = new stdclass; @@ -999,7 +1009,8 @@ function display_submission($offset=-1,$userid =-1) { $mformdata->submissioncomment= $submission->submissioncomment; $mformdata->submissioncommentformat= FORMAT_HTML; $mformdata->submission_content= $this->print_user_files($user->id,true); - + $mformdata->filter = $filter; + $submitform = new mod_assignment_grading_form( null, $mformdata ); if ($submitform->is_cancelled()) { @@ -1054,20 +1065,28 @@ function display_submissions($message='') { /* first we check to see if the form has just been submitted * to request user_preference updates */ + + $filters = array(self::FILTER_ALL => get_string('all'), + self::FILTER_SUBMITTED => get_string('submitted', 'assignment'), + self::FILTER_REQUIRE_GRADING => get_string('requiregrading', 'assignment')); + + $updatepref = optional_param('updatepref', 0, PARAM_INT); + if (isset($_POST['updatepref'])){ $perpage = optional_param('perpage', 10, PARAM_INT); $perpage = ($perpage <= 0) ? 10 : $perpage ; + $filter = optional_param('filter', 0, PARAM_INT); 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); } /* next we get perpage and quickgrade (allow quick grade) params * from database */ $perpage = get_user_preferences('assignment_perpage', 10); - $quickgrade = get_user_preferences('assignment_quickgrade', 0); - + $filter = get_user_preferences('assignment_filter', 0); $grading_info = grade_get_grades($this->course->id, 'mod', 'assignment', $this->assignment->id); if (!empty($CFG->enableoutcomes) and !empty($grading_info->outcomes)) { @@ -1092,15 +1111,20 @@ function display_submissions($message='') { $PAGE->set_heading($this->course->fullname); echo $OUTPUT->header(); + echo '
'; + /// Print quickgrade form around the table if ($quickgrade) { - echo '
'; - echo '
'; - echo ''; - echo ''; - echo ''; - echo ''; - echo '
'; + $formattrs = array(); + $formattrs['action'] = new moodle_url('/mod/assignment/submissions.php'); + $formattrs['id'] = 'fastg'; + $formattrs['method'] = 'post'; + + echo html_writer::start_tag('form', $formattrs); + echo html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'id', 'value'=> $this->cm->id)); + echo html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'mode', 'value'=> 'fastgrade')); + echo html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'page', 'value'=> $page)); + echo html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'sesskey', 'value'=> sesskey())); } $course_context = get_context_instance(CONTEXT_COURSE, $course->id); @@ -1123,7 +1147,30 @@ function display_submissions($message='') { groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/assignment/submissions.php?id=' . $this->cm->id); /// Get all ppl that are allowed to submit assignments - if ($users = get_enrolled_users($context, 'mod/assignment:submit', $currentgroup, 'u.id')) { + list($esql, $params) = get_enrolled_sql($context, 'mod/assignment:submit', $currentgroup); + + if ($filter == self::FILTER_ALL) { + $sql = "SELECT u.id FROM {user} u ". + "LEFT JOIN ($esql) eu ON eu.id=u.id ". + "WHERE u.deleted = 0 AND eu.id=u.id "; + } else { + $wherefilter = ''; + if($filter == self::FILTER_SUBMITTED) { + $wherefilter = ' AND s.timemodified > 0'; + } else if($filter == self::FILTER_REQUIRE_GRADING) { + $wherefilter = ' AND s.timemarked < s.timemodified '; + } + + $sql = "SELECT u.id FROM {user} u ". + "LEFT JOIN ($esql) eu ON eu.id=u.id ". + "LEFT JOIN {assignment_submissions} s ON (u.id = s.userid) " . + "WHERE u.deleted = 0 AND eu.id=u.id ". + 'AND s.assignment = '. $this->assignment->id . + $wherefilter; + } + + $users = $DB->get_records_sql($sql, $params); + if (!empty($users)) { $users = array_keys($users); } @@ -1202,216 +1249,234 @@ function display_submissions($message='') { if ($where = $table->get_sql_where()) { $where .= ' AND '; } + + if($filter == self::FILTER_SUBMITTED) { + $where .= 's.timemodified > 0 AND '; + } else if($filter == self::FILTER_REQUIRE_GRADING) { + $where .= 's.timemarked < s.timemodified AND '; + } if ($sort = $table->get_sql_sort()) { $sort = ' ORDER BY '.$sort; } $ufields = user_picture::fields('u'); + $select = "SELECT $ufields, s.id AS submissionid, s.grade, s.submissioncomment, s.timemodified, s.timemarked, COALESCE(SIGN(SIGN(s.timemarked) + SIGN(s.timemarked - s.timemodified)), 0) AS status "; $sql = 'FROM {user} u '. 'LEFT JOIN {assignment_submissions} s ON u.id = s.userid - AND s.assignment = '.$this->assignment->id.' '. + AND s.assignment = '.$this->assignment->id.' '. 'WHERE '.$where.'u.id IN ('.implode(',',$users).') '; - $table->pagesize($perpage, count($users)); + $ausers = $DB->get_records_sql($select.$sql.$sort, null, $table->get_page_start(), $table->get_page_size()); + $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 = $page * $perpage; - $strupdate = get_string('update'); $strgrade = get_string('grade'); $grademenu = make_grades_menu($this->assignment->grade); - if (($ausers = $DB->get_records_sql($select.$sql.$sort, null, $table->get_page_start(), $table->get_page_size())) !== false) { - $grading_info = grade_get_grades($this->course->id, 'mod', 'assignment', $this->assignment->id, array_keys($ausers)); + if ($ausers !== false) { + $grading_info = grade_get_grades($this->course->id, 'mod', 'assignment', $this->assignment->id, array_keys($ausers)); + $endposition = $offset + $perpage; + $currentposition = 0; foreach ($ausers as $auser) { - $final_grade = $grading_info->items[0]->grades[$auser->id]; - $grademax = $grading_info->items[0]->grademax; - $final_grade->formatted_grade = round($final_grade->grade,2) .' / ' . round($grademax,2); - $locked_overridden = 'locked'; - if ($final_grade->overridden) { - $locked_overridden = 'overridden'; - } - - /// Calculate user status - $auser->status = ($auser->timemarked > 0) && ($auser->timemarked >= $auser->timemodified); - $picture = $OUTPUT->user_picture($auser); + if ($currentposition == $offset && $offset < $endposition) { + $final_grade = $grading_info->items[0]->grades[$auser->id]; + $grademax = $grading_info->items[0]->grademax; + $final_grade->formatted_grade = round($final_grade->grade,2) .' / ' . round($grademax,2); + $locked_overridden = 'locked'; + if ($final_grade->overridden) { + $locked_overridden = 'overridden'; + } - if (empty($auser->submissionid)) { - $auser->grade = -1; //no submission yet - } + /// Calculate user status + $auser->status = ($auser->timemarked > 0) && ($auser->timemarked >= $auser->timemodified); + $picture = $OUTPUT->user_picture($auser); - if (!empty($auser->submissionid)) { - ///Prints student answer and student modified date - ///attach file or print link to student answer, depending on the type of the assignment. - ///Refer to print_student_answer in inherited classes. - if ($auser->timemodified > 0) { - $studentmodified = '
'.$this->print_student_answer($auser->id) - . userdate($auser->timemodified).'
'; - } else { - $studentmodified = '
 
'; + if (empty($auser->submissionid)) { + $auser->grade = -1; //no submission yet } - ///Print grade, dropdown or text - if ($auser->timemarked > 0) { - $teachermodified = '
'.userdate($auser->timemarked).'
'; + if (!empty($auser->submissionid)) { + ///Prints student answer and student modified date + ///attach file or print link to student answer, depending on the type of the assignment. + ///Refer to print_student_answer in inherited classes. + if ($auser->timemodified > 0) { + $studentmodified = '
'.$this->print_student_answer($auser->id) + . userdate($auser->timemodified).'
'; + } else { + $studentmodified = '
 
'; + } + ///Print grade, dropdown or text + if ($auser->timemarked > 0) { + $teachermodified = '
'.userdate($auser->timemarked).'
'; + + if ($final_grade->locked or $final_grade->overridden) { + $grade = '
'.$final_grade->formatted_grade.'
'; + } else if ($quickgrade) { + $attributes = array(); + $attributes['tabindex'] = $tabindex++; + $menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes); + $grade = '
'. $menu .'
'; + } else { + $grade = '
'.$this->display_grade($auser->grade).'
'; + } + + } else { + $teachermodified = '
 
'; + if ($final_grade->locked or $final_grade->overridden) { + $grade = '
'.$final_grade->formatted_grade.'
'; + } else if ($quickgrade) { + $attributes = array(); + $attributes['tabindex'] = $tabindex++; + $menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes); + $grade = '
'.$menu.'
'; + } else { + $grade = '
'.$this->display_grade($auser->grade).'
'; + } + } + ///Print Comment if ($final_grade->locked or $final_grade->overridden) { - $grade = '
'.$final_grade->formatted_grade.'
'; + $comment = '
'.shorten_text(strip_tags($final_grade->str_feedback),15).'
'; + } else if ($quickgrade) { - $attributes = array(); - $attributes['tabindex'] = $tabindex++; - $menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes); - $grade = '
'. $menu .'
'; + $comment = '
' + . '
'; } else { - $grade = '
'.$this->display_grade($auser->grade).'
'; + $comment = '
'.shorten_text(strip_tags($auser->submissioncomment),15).'
'; } - } else { + $studentmodified = '
 
'; $teachermodified = '
 
'; + $status = '
 
'; + if ($final_grade->locked or $final_grade->overridden) { - $grade = '
'.$final_grade->formatted_grade.'
'; - } else if ($quickgrade) { + $grade = '
'.$final_grade->formatted_grade . '
'; + } else if ($quickgrade) { // allow editing $attributes = array(); $attributes['tabindex'] = $tabindex++; $menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes); $grade = '
'.$menu.'
'; } else { - $grade = '
'.$this->display_grade($auser->grade).'
'; + $grade = '
-
'; + } + + if ($final_grade->locked or $final_grade->overridden) { + $comment = '
'.$final_grade->str_feedback.'
'; + } else if ($quickgrade) { + $comment = '
' + . '
'; + } else { + $comment = '
 
'; } - } - ///Print Comment - if ($final_grade->locked or $final_grade->overridden) { - $comment = '
'.shorten_text(strip_tags($final_grade->str_feedback),15).'
'; - - } else if ($quickgrade) { - $comment = '
' - . '
'; - } else { - $comment = '
'.shorten_text(strip_tags($auser->submissioncomment),15).'
'; - } - } else { - $studentmodified = '
 
'; - $teachermodified = '
 
'; - $status = '
 
'; - - if ($final_grade->locked or $final_grade->overridden) { - $grade = '
'.$final_grade->formatted_grade . '
'; - } else if ($quickgrade) { // allow editing - $attributes = array(); - $attributes['tabindex'] = $tabindex++; - $menu = html_writer::select(make_grades_menu($this->assignment->grade), 'menu['.$auser->id.']', $auser->grade, array(-1=>get_string('nograde')), $attributes); - $grade = '
'.$menu.'
'; - } else { - $grade = '
-
'; } - if ($final_grade->locked or $final_grade->overridden) { - $comment = '
'.$final_grade->str_feedback.'
'; - } else if ($quickgrade) { - $comment = '
' - . '
'; + if (empty($auser->status)) { /// Confirm we have exclusively 0 or 1 + $auser->status = 0; } else { - $comment = '
 
'; + $auser->status = 1; } - } - if (empty($auser->status)) { /// Confirm we have exclusively 0 or 1 - $auser->status = 0; - } else { - $auser->status = 1; - } + $buttontext = ($auser->status == 1) ? $strupdate : $strgrade; - $buttontext = ($auser->status == 1) ? $strupdate : $strgrade; + ///No more buttons, we use popups ;-). + $popup_url = '/mod/assignment/submissions.php?id='.$this->cm->id + . '&userid='.$auser->id.'&mode=single'.'&filter='.$filter.'&offset='.$offset++; - ///No more buttons, we use popups ;-). - $popup_url = '/mod/assignment/submissions.php?id='.$this->cm->id - . '&userid='.$auser->id.'&mode=single'.'&offset='.$offset++; + $button = $OUTPUT->action_link($popup_url, $buttontext); - $button = $OUTPUT->action_link($popup_url, $buttontext); + $status = '
'.$button.'
'; - $status = '
'.$button.'
'; + $finalgrade = ''.$final_grade->str_grade.''; - $finalgrade = ''.$final_grade->str_grade.''; + $outcomes = ''; - $outcomes = ''; + if ($uses_outcomes) { - if ($uses_outcomes) { + foreach($grading_info->outcomes as $n=>$outcome) { + $outcomes .= '
'; + $options = make_grades_menu(-$outcome->scaleid); - foreach($grading_info->outcomes as $n=>$outcome) { - $outcomes .= '
'; - $options = make_grades_menu(-$outcome->scaleid); - - if ($outcome->grades[$auser->id]->locked or !$quickgrade) { - $options[0] = get_string('nooutcome', 'grades'); - $outcomes .= ': '.$options[$outcome->grades[$auser->id]->grade].''; - } else { - $attributes = array(); - $attributes['tabindex'] = $tabindex++; - $attributes['id'] = 'outcome_'.$n.'_'.$auser->id; - $outcomes .= ' '.html_writer::select($options, 'outcome_'.$n.'['.$auser->id.']', $outcome->grades[$auser->id]->grade, array(0=>get_string('nooutcome', 'grades')), $attributes); + if ($outcome->grades[$auser->id]->locked or !$quickgrade) { + $options[0] = get_string('nooutcome', 'grades'); + $outcomes .= ': '.$options[$outcome->grades[$auser->id]->grade].''; + } else { + $attributes = array(); + $attributes['tabindex'] = $tabindex++; + $attributes['id'] = 'outcome_'.$n.'_'.$auser->id; + $outcomes .= ' '.html_writer::select($options, 'outcome_'.$n.'['.$auser->id.']', $outcome->grades[$auser->id]->grade, array(0=>get_string('nooutcome', 'grades')), $attributes); + } + $outcomes .= '
'; } - $outcomes .= '
'; } - } - $userlink = '' . fullname($auser) . ''; - $row = array($picture, $userlink, $grade, $comment, $studentmodified, $teachermodified, $status, $finalgrade); - if ($uses_outcomes) { - $row[] = $outcomes; - } + $userlink = '' . fullname($auser, has_capability('moodle/site:viewfullnames', $this->context)) . ''; + $row = array($picture, $userlink, $grade, $comment, $studentmodified, $teachermodified, $status, $finalgrade); + if ($uses_outcomes) { + $row[] = $outcomes; + } - $table->add_data($row); + $table->add_data($row); + } + $currentposition++; } } $table->print_html(); /// Print the whole table - if ($quickgrade){ - $lastmailinfo = get_user_preferences('assignment_mailinfo', 1) ? 'checked="checked"' : ''; - echo '
'; - echo '
'; - echo ''; - echo ''; - echo ''; - echo $OUTPUT->help_icon('enableemailnotification', 'assignment'); - echo '
'; - echo '
'; - echo '
'; - echo '
'; + /// Print quickgrade form around the table + if ($quickgrade && $table->started_output){ + $mailinfopref = false; + if (get_user_preferences('assignment_mailinfo', 1)) { + $mailinfopref = true; + } + $emailnotification = html_writer::checkbox('mailinfo', 1, $mailinfopref, get_string('enableemailnotification','assignment')); + + $emailnotification .= $OUTPUT->help_icon('enableemailnotification', 'assignment'); + 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'))); + echo html_writer::tag('div', $savefeedback, array('class'=>'fastgbutton')); + + echo html_writer::end_tag('form'); + } else if ($quickgrade) { + echo html_writer::end_tag('form'); } + + echo '
'; /// End of fast grading form - /// Mini form for setting user preference - echo '
'; - echo '
'; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo '
'; - echo ''; - echo ''; - echo ''; - echo '
'; - echo ''; - echo ''; - $checked = $quickgrade ? 'checked="checked"' : ''; - echo ''; - echo '

'.$OUTPUT->help_icon('quickgrade', 'assignment').'

'; - echo '
'; - echo ''; - echo '
'; - echo '
'; - ///End of mini form + /// Mini form for setting user preference + + $formaction = new moodle_url('/mod/assignment/submissions.php', array('id'=>$this->cm->id)); + $mform = new MoodleQuickForm('optionspref', 'post', $formaction, '', array('class'=>'optionspref')); + + $mform->addElement('hidden', 'updatepref'); + $mform->setDefault('updatepref', 1); + $mform->addElement('header', 'qgprefs', get_string('optionalsettings', 'assignment')); + $mform->addElement('select', 'filter', get_string('show'), $filters); + + $mform->setDefault('filter', $filter); + + $mform->addElement('text', 'perpage', get_string('pagesize', 'assignment'), array('size'=>1)); + $mform->setDefault('perpage', $perpage); + + $mform->addElement('checkbox', 'quickgrade', get_string('quickgrade','assignment')); + $mform->setDefault('quickgrade', $quickgrade); + $mform->addHelpButton('quickgrade', 'quickgrade', 'assignment'); + + $mform->addElement('submit', 'savepreferences', get_string('savepreferences')); + + $mform->display(); + echo $OUTPUT->footer(); } @@ -2095,6 +2160,8 @@ function definition() { $mform->setType('menuindex', PARAM_INT); $mform->addElement('hidden', 'saveuserid', "-1"); $mform->setType('saveuserid', PARAM_INT); + $mform->addElement('hidden', 'filter', "0"); + $mform->setType('filter', PARAM_INT); $mform->addElement('static', 'picture', $OUTPUT->user_picture($this->_customdata->user), fullname($this->_customdata->user, true) . '
' . diff --git a/mod/assignment/styles.css b/mod/assignment/styles.css index 92a46bfa84a60..d70314b05f45d 100644 --- a/mod/assignment/styles.css +++ b/mod/assignment/styles.css @@ -30,4 +30,11 @@ #page-mod-assignment-view .feedback {margin:10px auto;} #page-mod-assignment-view .feedback .grade {text-align: right;} #page-mod-assignment-view #online .singlebutton {text-align: center;} -#page-mod-assignment-view #dates .c0 {text-align:right;font-weight:bold;} \ No newline at end of file +#page-mod-assignment-view #dates .c0 {text-align:right;font-weight:bold;} + +#page-mod-assignment-submissions .mform.optionspref .fitem .fitemtitle {width:50%;} +#page-mod-assignment-submissions .mform.optionspref .fitem .felement {width: 30%; margin-left: 51%;} +#page-mod-assignment-submissions.dir-rtl .mform .fitem .felement {margin-right: 51%; margin-left: 0;} + +#page-mod-assignment-submissions .optionspref {width: 50%;} +#page-mod-assignment-submissions .fastgbutton {text-align: center;}