Skip to content

Commit

Permalink
CTP-3690 spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
watson8 committed Sep 3, 2024
1 parent dca59d9 commit 1e50a3c
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion classes/auto_grader/percentage_distance.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function create_auto_grade_if_rules_match() {
return;
}

if ($this->grades_are_close_enough() ) {
if ($this->grades_are_close_enough()) {
if (!$this->get_allocatable()->has_agreed_feedback($this->get_coursework())) {
$this->create_final_feedback();
} else {
Expand Down
2 changes: 1 addition & 1 deletion classes/controllers/personal_deadlines_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected function new_personal_deadline() {

$data = $this->form->get_data();

if (empty($data->multipleuserdeadlines) ) {
if (empty($data->multipleuserdeadlines)) {
if (!$this->get_personal_deadline()) { // personal deadline doesnt exist
// add new
$data->createdbyid = $USER->id;
Expand Down
2 changes: 1 addition & 1 deletion classes/export/csv/cells/agreedfeedback_cell.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function validate_cell($value, $submissionid, $stageidentifier='', $uploa
$submission = \mod_coursework\models\submission::find($subdbrecord);

// Is the submission in question ready to grade?
if (!$submission->all_inital_graded() && !empty($value)) {
if (!$submission->all_inital_graded() && !empty($value)) {
return get_string('submissionnotreadyforagreedgrade', 'coursework');
}

Expand Down
2 changes: 1 addition & 1 deletion classes/export/csv/cells/otherassessors_cell.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function get_cell($submission, $student, $stageidentifier) {
continue;
}
$ability = new ability(user::find($USER), $this->coursework);
if ((($ability->can('show', $feedback) || has_capability('mod/coursework:addallocatedagreedgrade', $submission->get_coursework()->get_context())) &&
if ((($ability->can('show', $feedback) || has_capability('mod/coursework:addallocatedagreedgrade', $submission->get_coursework()->get_context())) &&
(!$submission->any_editable_feedback_exists() && count($submission->get_assessor_feedbacks()) <= $submission->max_number_of_feedbacks())) || is_siteadmin($USER->id)) {

if ($this->coursework->is_using_rubric()) {
Expand Down
4 changes: 2 additions & 2 deletions classes/export/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function rubric_count_correct($csvheader, $linefromimportedcsv) {
$offset = 0;

foreach ($typepositions as $position) {
//if ($position = array_search($type, $csvheader)) {
// if ($position = array_search($type, $csvheader)) {
$class = "mod_coursework\\export\\csv\\cells\\{$type}_cell";
$cell = new $class($this->coursework);

Expand Down Expand Up @@ -611,7 +611,7 @@ public function add_grade($submissionid, $grade, $feedback, $stageidentifier, $u

$feedbackid = $DB->insert_record('coursework_feedbacks', $addgrade, true);

if ($usesrubric) {
if ($usesrubric) {
$controller = $this->coursework->get_advanced_grading_active_controller();
// Find out how many criteria there are
$gradinginstance = $controller->get_or_create_instance(0, $USER->id, $feedbackid);
Expand Down
2 changes: 1 addition & 1 deletion classes/sample_set_rule/range_sample_type.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function range_elements($assessornumber, $sequence, $dbrecord=false) {

$scale = [];

if ($this->coursework->grade > 0) {
if ($this->coursework->grade > 0) {
for ($i = 0; $i <= $this->coursework->grade; $i++) {
$scale[] = $i;
}
Expand Down
2 changes: 1 addition & 1 deletion mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function validation($data, $files) {
$errors['agreedgrademarkingdeadline'] = get_string('must_be_after_initial_grade_dealdine', 'mod_coursework');
}

if (isset($data['relativeagreedmarkingdeadline']) && $data['relativeagreedmarkingdeadline'] != 0 && $data['relativeagreedmarkingdeadline'] < $data['relativeinitialmarkingdeadline'] ) {
if (isset($data['relativeagreedmarkingdeadline']) && $data['relativeagreedmarkingdeadline'] != 0 && $data['relativeagreedmarkingdeadline'] < $data['relativeinitialmarkingdeadline'] ) {
$errors['relativeagreedmarkingdeadline'] = get_string('must_be_after_or_equal_to_relative_initial_grade_dealdine', 'mod_coursework');

}
Expand Down
6 changes: 3 additions & 3 deletions renderers/object_renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ public function render_mod_coursework_sampling_set_widget(mod_coursework_samplin

$scale = "";

if ($samplingwidget->get_coursework()->grade > 0) {
if ($samplingwidget->get_coursework()->grade > 0) {

$comma = "";

Expand Down Expand Up @@ -1629,7 +1629,7 @@ public function get_allocatables_count_per_assessor($coursework) {
$submission = $allocatable->get_submission($coursework);

if ($coursework->assessor_has_any_allocation_for_student($allocatable) || has_capability('mod/coursework:addagreedgrade', $coursework->get_context())
&& !empty($submission) && (($submission->all_inital_graded() && !$coursework->sampling_enabled())
&& !empty($submission) && (($submission->all_inital_graded() && !$coursework->sampling_enabled())
|| ($coursework->sampling_enabled() && $submission->all_inital_graded() && $submission->max_number_of_feedbacks() > 1 ))) {
$participant ++;
}
Expand Down Expand Up @@ -1805,7 +1805,7 @@ public function get_submissions_for_assessor($coursework, $submissions) {
foreach ($submissions as $sub) {
$submission = submission::find($sub);
if ($coursework->assessor_has_any_allocation_for_student($submission->reload()->get_allocatable()) || (has_capability('mod/coursework:addagreedgrade', $coursework->get_context()))
&& !empty($submission) && (($submission->all_inital_graded() && !$submission->get_coursework()->sampling_enabled())
&& !empty($submission) && (($submission->all_inital_graded() && !$submission->get_coursework()->sampling_enabled())
|| ($submission->get_coursework()->sampling_enabled() && $submission->all_inital_graded() && $submission->max_number_of_feedbacks() > 1))) {

$gradeblesub[$submission->id] = $submission;
Expand Down

0 comments on commit 1e50a3c

Please sign in to comment.