Permalink
Browse files

MDL-26430 fixed appearance of one html form within another

  • Loading branch information...
1 parent 57e034c commit d65a2b2262e6ed45fe54acb51b25c2f69d70ebe0 @marinaglancy marinaglancy committed Jun 10, 2011
Showing with 14 additions and 14 deletions.
  1. +14 −14 mod/assignment/lib.php
@@ -1141,20 +1141,6 @@ function display_submissions($message='') {
//hook to allow plagiarism plugins to update status/print links.
plagiarism_update_status($this->course, $this->cm);
- /// Print quickgrade form around the table
- if ($quickgrade) {
- $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);
if (has_capability('gradereport/grader:view', $course_context) && has_capability('moodle/grade:viewall', $course_context)) {
echo '<div class="allcoursegrades"><a href="' . $CFG->wwwroot . '/grade/report/grader/index.php?id=' . $course->id . '">'
@@ -1174,6 +1160,20 @@ function display_submissions($message='') {
$currentgroup = groups_get_activity_group($cm, true);
groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/assignment/submissions.php?id=' . $this->cm->id);
+ /// Print quickgrade form around the table
+ if ($quickgrade) {
+ $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()));
+ }
+
/// Get all ppl that are allowed to submit assignments
list($esql, $params) = get_enrolled_sql($context, 'mod/assignment:view', $currentgroup);

0 comments on commit d65a2b2

Please sign in to comment.