Skip to content

Commit c11a298

Browse files
committed
CTP-3558 coding std insert spaces in comments
1 parent a3eb417 commit c11a298

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+365
-366
lines changed

actions/allocate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
// Add coursework id etc.
197197
echo \html_writer::input_hidden_params($PAGE->url);
198198

199-
if ($coursework->sampling_enabled()) { // Do not delete yet - refactoring...
199+
if ($coursework->sampling_enabled()) { // Do not delete yet - refactoring...
200200
echo \html_writer::start_tag('form', array('id' => 'sampling_form',
201201
'method' => 'post'));
202202
$samplesetwidget = $allocationsmanager->get_sampling_set_widget();

actions/processallocation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2121
*/
2222

23-
//this stops the page from aborting when an ajax call disconnects
23+
// This stops the page from aborting when an ajax call disconnects
2424
ignore_user_abort(true);
2525

26-
//we have to set the time limit to 0 as depending on
26+
// We have to set the time limit to 0 as depending on
2727
set_time_limit ( 0 );
2828

2929
use mod_coursework\models\coursework;

actions/upload_allocations.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@
6060

6161
if ($data = $allocationsuploadform->get_data()) {
6262

63-
//perform checks on data
63+
// Perform checks on data
6464

6565
$content = $allocationsuploadform->get_file_content('allocationsdata');
6666

6767
$csvimport = new \mod_coursework\allocation\upload($coursework);
6868

6969
$procsessingresults = $csvimport->validate_csv($content, $data->encoding, $data->delimiter_name);
7070

71-
//process
71+
// Process
7272
$csvimport->process_csv($content, $data->encoding, $data->delimiter_name, $procsessingresults);
7373
$page_renderer = $PAGE->get_renderer('mod_coursework', 'page');
7474
echo $page_renderer->process_csv_upload($procsessingresults, $content, $csvtype);

actions/upload_feedback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
if ($data = $feedbackform->get_data()) {
6262

63-
//perform checks on data
63+
// Perform checks on data
6464
$courseworktempdir = $CFG->dataroot."/temp/coursework/";
6565

6666
if (!is_dir($courseworktempdir)) {

actions/upload_grading_sheet.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
if ($data = $gradinguploadform->get_data()) {
6363

64-
//perform checks on data
64+
// Perform checks on data
6565

6666
$content = $gradinguploadform->get_file_content('gradingdata');
6767

@@ -73,9 +73,9 @@
7373

7474
$procsessingresults = $csvimport->validate_csv($content, $data->encoding, $data->delimiter_name, $csv_cells);
7575

76-
//process
76+
// Process
7777

78-
//if (!empty($procsessingresults)) {
78+
// If (!empty($procsessingresults)) {
7979
$csvimport->process_csv($content, $data->encoding, $data->delimiter_name, $csv_cells, $procsessingresults);
8080
$page_renderer = $PAGE->get_renderer('mod_coursework', 'page');
8181
echo $page_renderer->process_csv_upload($procsessingresults, $content, $csvtype);

backup/moodle2/backup_coursework_activity_task.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static public function encode_content_links($content) {
2929

3030
$base = preg_quote($CFG->wwwroot, "/");
3131

32-
//These have to be picked up by the restore code COURSEWORK... are arbitrary
32+
// These have to be picked up by the restore code COURSEWORK... are arbitrary
3333
$search = "/(".$base."\/mod\/coursework\/index.php\?id\=)([0-9]+)/";
3434
$content = preg_replace($search, '$@COURSEWORKINDEX*$2@$', $content);
3535

backup/moodle2/backup_coursework_stepslib.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -307,31 +307,31 @@ protected function define_structure() {
307307
"selectiontype"
308308
));
309309

310-
//A coursework instance has submissions.
310+
// A coursework instance has submissions.
311311
$coursework->add_child($submissions);
312-
//Each coursework may have reminders
312+
// Each coursework may have reminders
313313
$coursework->add_child($reminders);
314-
//And allocations pairs
314+
// And allocations pairs
315315
$coursework->add_child($pairs);
316-
//And moderation sets
316+
// And moderation sets
317317
$coursework->add_child($modsetrules);
318-
//And a set of extensionsenabled
318+
// And a set of extensionsenabled
319319
$coursework->add_child($extensions);
320-
//And a set of personaldeadlines
320+
// And a set of personaldeadlines
321321
$coursework->add_child($personal_deadlines);
322-
//And a set of moderation rule sets
322+
// And a set of moderation rule sets
323323
$coursework->add_child($modsetmembers);
324-
//And allocation configs
324+
// And allocation configs
325325
$coursework->add_child($allocation_configs);
326-
//And sample members
326+
// And sample members
327327
$coursework->add_child($sample_members);
328328

329-
//And submissions are made up from individual submission instances
329+
// And submissions are made up from individual submission instances
330330
$submissions->add_child($submission);
331-
//Submissions have multiple feedback items
331+
// Submissions have multiple feedback items
332332
$submission->add_child($feedbacks);
333333

334-
//Feedbacks is a set of individual items
334+
// Feedbacks is a set of individual items
335335
$feedbacks->add_child($feedback);
336336

337337
$feedback->add_child($moderation_agreements);
@@ -340,7 +340,7 @@ protected function define_structure() {
340340
$submission->add_child($plagiarism_flags);
341341
$plagiarism_flags->add_child($plagiarism_flag);
342342

343-
//as are reminders, pairs, extensions, modsets and modsetrules,
343+
// as are reminders, pairs, extensions, modsets and modsetrules,
344344
// and allocation configs
345345
$reminders->add_child($reminder);
346346
$pairs->add_child($pair);
@@ -387,7 +387,7 @@ protected function define_structure() {
387387
$allocation_config->set_source_table('coursework_allocation_config',
388388
array('courseworkid' => backup::VAR_PARENTID));
389389

390-
//Mark important foreign keys
390+
// Mark important foreign keys
391391
$feedback->annotate_ids('user', 'assessorid');
392392
$feedback->annotate_ids('user', 'lasteditedbyuser');
393393
$feedback->annotate_ids('user', 'markernumber');

backup/moodle2/restore_coursework_stepslib.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ protected function define_structure() {
5050
if ($userinfo) {
5151
// Define each element separated.
5252
// Note: when I started the code I didn't realise that the names were arbitrary
53-
// and that the coursework_ prefix is not needed.
54-
// It would be nice to go back and take these out here and in backup.
55-
// But not essential
53+
// and that the coursework_ prefix is not needed.
54+
// It would be nice to go back and take these out here and in backup.
55+
// But not essential
5656
$bits = array('submission' => 'coursework_submissions',
5757
'feedback' => 'coursework_submissions/coursework_submission/coursework_feedbacks',
5858
'reminder' => 'coursework_reminders',
@@ -120,7 +120,7 @@ protected function process_coursework_submission($data) {
120120
$newitemid = $DB->insert_record('coursework_submissions', $data);
121121
$this->set_mapping('coursework_submission', $oldid, $newitemid);
122122

123-
//Tell system how to map the old submission id to its new one.
123+
// Tell system how to map the old submission id to its new one.
124124
$this->set_mapping('coursework_submission', $oldid, $newitemid, false, null, $this->task->get_old_contextid());
125125
}
126126

@@ -389,7 +389,7 @@ protected function process_coursework($data) {
389389
'deadline'), $data);
390390

391391
$now = time();
392-
//Taken from install.xml
392+
// Taken from install.xml
393393
$this->set_defaults(array('formid' => 0,
394394
'course' => 0,
395395
'name' => '',
@@ -493,7 +493,7 @@ protected function after_execute() {
493493
$this->add_related_files('mod_coursework', 'submission', 'coursework_submission');
494494
$this->add_related_files('mod_coursework', 'feedback', 'coursework_feedback');
495495

496-
//Fixup names
496+
// Fixup names
497497
$fs = get_file_storage();
498498
$ctx = context::instance_by_id($this->task->get_contextid());
499499

classes/ability.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function (coursework $coursework) {
145145
$this->allow_edit_moderation_if_user_is_allocated_to_moderate();
146146
$this->allow_edit_moderation_if_user_can_administer_grades();
147147

148-
//show moderation
148+
// Show moderation
149149
$this->allow_show_moderation_if_user_can_view_grades_at_all_times();
150150

151151
// Feedback rules

classes/allocation/manager.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ class manager {
5151
/**
5252
* @var strategy\base
5353
*/
54-
private $assessorallocationstrategy;
54+
private $assessorallocationstrategy;
5555

5656
/**
5757
* @var strategy\base
5858
*/
59-
private $moderatorallocationstrategy;
59+
private $moderatorallocationstrategy;
6060

6161
/**
6262
* New instance created with references to the coursework stored.
@@ -295,7 +295,7 @@ public function auto_generate_sample_set() {
295295

296296
$final_agreed_allocatables = $this->get_allocatables_with_final_agreed();
297297

298-
//remove any allocatables that have a status of final agreed as these can not be sampled
298+
// Remove any allocatables that have a status of final agreed as these can not be sampled
299299
foreach ($final_agreed_allocatables as $faa) {
300300
if (isset($allocatables[$faa->allocatableid])) unset($allocatables[$faa->allocatableid]);
301301
}
@@ -323,9 +323,9 @@ public function auto_generate_sample_set() {
323323

324324
$auto_with_feedback = $this->get_automatic_with_feedback($stage);
325325

326-
//ok this array merge is being carried out using an foreach rather than array_merge as we want to preserve keys
327-
//I am also not using add the two arrays as using the overloaded + can produce dubious results when a key exists
328-
//in both arrays
326+
// Ok this array merge is being carried out using an foreach rather than array_merge as we want to preserve keys
327+
// I am also not using add the two arrays as using the overloaded + can produce dubious results when a key exists
328+
// In both arrays
329329

330330
foreach ($auto_with_feedback as $k => $v) {
331331
if (!isset($manual_sample_set[$k])) $manual_sample_set[$k] = $v;
@@ -342,7 +342,7 @@ public function auto_generate_sample_set() {
342342

343343
}
344344

345-
//save sample set
345+
// Save sample set
346346
if (!empty($auto_sample_set)) {
347347
foreach ($auto_sample_set as $allocatable) {
348348
$sample = new \stdClass();
@@ -352,7 +352,7 @@ public function auto_generate_sample_set() {
352352
$sample->stage_identifier = "assessor_{$stage_number}";
353353
$sample->selectiontype = "automatic";
354354

355-
//if this a manually selected allocatable check to see if the allocatable is already in the table
355+
// If this a manually selected allocatable check to see if the allocatable is already in the table
356356
$DB->insert_record("coursework_sample_set_mbrs", $sample);
357357

358358
}
@@ -377,7 +377,7 @@ public function get_include_in_sample_set($stage_number) {
377377
AND stage_identifier = :stage_identifier
378378
AND selectiontype = 'manual'";
379379

380-
//get all users in manually selected for stage in coursework
380+
// Get all users in manually selected for stage in coursework
381381
return $DB->get_records_sql($sql,
382382
array('courseworkid' => $this->coursework->id, 'stage_identifier' => $stage));
383383

0 commit comments

Comments
 (0)