Skip to content
Browse files

Fixed errors in refactoring

  • Loading branch information...
1 parent 04ba9d5 commit 6fe72833d08f58d2eb7361e5d11ec0e9e8ac217d cap2501 committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 course/format/topics/commands.php
View
8 course/format/topics/commands.php
@@ -12,7 +12,7 @@
$instanceid = optional_param('instanceId', 0, PARAM_INT);
$value = optional_param('value', 0, PARAM_INT);
-$weight = optional_param('weight', 0, PARAM_INT);
+$column = optional_param('weight', 0, PARAM_ALPHA);
$id = optional_param('id', 0, PARAM_INT);
$summary = optional_param('summary', '', PARAM_INT);
$sequence = optional_param('sequence', '', PARAM_INT);
@@ -48,8 +48,8 @@
case 'position':
$dataobject->id = $instanceid;
- $dataobject->position = $value;
- $dataobject->weight = $weight;
+ $dataobject->position = $column;
+ $dataobject->weight = $value;
if (!update_record('block_instance',$dataobject)) {
error('Failed to update block!');
}
@@ -60,7 +60,7 @@
case 'section':
- if ($dataobject->id = get_field('course_sections','id','course',$course->id,'section',$id)) {
+ if (!$dataobject->id = get_field('course_sections','id','course',$course->id,'section',$id)) {
error('Bad Section ID');
}

0 comments on commit 6fe7283

Please sign in to comment.
Something went wrong with that request. Please try again.