diff --git a/main/admin/gradebook_list.php b/main/admin/gradebook_list.php index 7b59b59a39..a24bfcc7fa 100644 --- a/main/admin/gradebook_list.php +++ b/main/admin/gradebook_list.php @@ -25,14 +25,13 @@ $keyword = isset($_REQUEST['keyword']) ? $_REQUEST['keyword'] : ''; if (empty($keyword)) { $gradeBookList = $repo->findAll(); } else { - $criteria = new \Doctrine\Common\Collections\Criteria(); - $criteria - ->where( - Criteria::expr()->orX( - Criteria::expr()->contains('courseCode', $keyword), - Criteria::expr()->contains('name', $keyword) - ) - ); + $criteria = new Criteria(); + $criteria->where( + Criteria::expr()->orX( + Criteria::expr()->contains('courseCode', $keyword), + Criteria::expr()->contains('name', $keyword) + ) + ); $gradeBookList = $repo->matching($criteria); } @@ -138,14 +137,9 @@ switch ($action) { ); $form->addText('name', get_lang('Name')); $form->addText('weight', get_lang('Weight')); - $form->addText( - 'minimum', - get_lang('MinimumGradebookToValidate'), - false - ); - $form->addLabel(get_lang('CourseCode'), $category->getCourseCode()); + $form->addLabel(get_lang('Course'), $category->getCourseCode()); - $sql = "SELECT depends, minimum_to_validate + $sql = "SELECT depends, minimum_to_validate FROM $table WHERE id = ".$categoryId; $result = Database::query($sql); $categoryData = Database::fetch_array($result, 'ASSOC'); @@ -169,6 +163,12 @@ switch ($action) { ] ); + $form->addText( + 'minimum', + get_lang('MinimumGradebookToValidate'), + false + ); + $form->addButtonSave(get_lang('Edit')); $defaults = [ 'name' => $category->getName(),