Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simplify things a bit. I'm no really sure why I was using get_recods()

instead of get_record(). Perhaps it was in my PHP learning process...
  • Loading branch information...
commit 353a72e0a97c6f2202b51acb11d5c5a497781b3e 1 parent f2670b1
stronk7 authored
Showing with 2 additions and 8 deletions.
  1. +2 −8 backup/backuplib.php
View
10 backup/backuplib.php
@@ -534,18 +534,12 @@ function backup_course_start ($bf,$preferences) {
fwrite ($bf,start_tag("HEADER",2,true));
//Get info from course
- $course=false;
- if ($courses = get_records("course","id",$preferences->backup_course)) {
- $course = $courses[$preferences->backup_course];
- }
+ $course = get_record("course","id",$preferences->backup_course);
if ($course) {
//Prints course info
fwrite ($bf,full_tag("ID",3,false,$course->id));
//Obtain the category
- $category = false;
- if ($categories = get_records("course_categories","id","$course->category")) {
- $category = $categories[$course->category];
- }
+ $category = get_record("course_categories","id","$course->category");
if ($category) {
//Prints category info
fwrite ($bf,start_tag("CATEGORY",3,true));
Please sign in to comment.
Something went wrong with that request. Please try again.