MDL-50673 workshop: Fix some coding style violations
authorDavid Mudrák <david@moodle.com>
Thu, 16 Jul 2015 17:37:01 +0000 (19:37 +0200)
committerDavid Mudrák <david@moodle.com>
Thu, 16 Jul 2015 17:44:06 +0000 (19:44 +0200)
mod/workshop/locallib.php
mod/workshop/view.php

index aa08dd1..4f98583 100644 (file)
@@ -1782,7 +1782,8 @@ class workshop {
             return array();
         }
 
-        if (!in_array($sortby, array('lastname','firstname','submissiontitle', 'submissionmodified','submissiongrade','gradinggrade'))) {
+        if (!in_array($sortby, array('lastname', 'firstname', 'submissiontitle', 'submissionmodified',
+                'submissiongrade', 'gradinggrade'))) {
             $sortby = 'lastname';
         }
 
@@ -1814,7 +1815,7 @@ class workshop {
             $sqlsort = implode(',', $sqlsort);
             $picturefields = user_picture::fields('u', array(), 'userid');
             $sql = "SELECT $picturefields, s.title AS submissiontitle, s.timemodified AS submissionmodified,
-                                        s.grade AS submissiongrade, ag.gradinggrade
+                           s.grade AS submissiongrade, ag.gradinggrade
                       FROM {user} u
                  LEFT JOIN {workshop_submissions} s ON (s.authorid = u.id AND s.workshopid = :workshopid1 AND s.example = 0)
                  LEFT JOIN {workshop_aggregations} ag ON (ag.userid = u.id AND ag.workshopid = :workshopid2)
index b5e4211..66adc17 100644 (file)
@@ -239,11 +239,11 @@ case workshop::PHASE_SUBMISSION:
 
             echo $output->container(groups_print_activity_menu($workshop->cm, $PAGE->url, true), 'groupwidget');
 
-            // prepare paging bar
+            // Prepare the paging bar.
             $baseurl = new moodle_url($PAGE->url, array('sortby' => $sortby, 'sorthow' => $sorthow));
             $pagingbar = new paging_bar($data->totalcount, $page, $perpage, $baseurl, 'page');
 
-            // submissions report display options
+            // Populate the display options for the submissions report.
             $reportopts                     = new stdclass();
             $reportopts->showauthornames     = has_capability('mod/workshop:viewauthornames', $workshop->context);
             $reportopts->showreviewernames   = has_capability('mod/workshop:viewreviewernames', $workshop->context);