Skip to content

Commit

Permalink
upgrading to 1.5
Browse files Browse the repository at this point in the history
steps 1, 2 and 3 done.
  • Loading branch information
stronk7 committed Jan 23, 2005
1 parent b2262aa commit 12f7885
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backup/CHANGES_14_15.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ status in backup/restore code.

Now I show the specific detailed status of every item in the process:

1. TODO: check user->idnumber
2. TODO: check user->lang (at restore set mi_nt where ma_nt).
3. TODO: check course->lang (at restore set mi_nt where ma_nt).
1. DONE: check user->idnumber
2. DONE: check user->lang (at restore set mi_nt where ma_nt).
3. DONE: check course->lang (at restore set mi_nt where ma_nt).
4. TODO: user_students->enrol (analyse and proceed).
5. TODO: user_teachers->enrol (analyse and proceed).
6. TODO: user->policyagreed (analyse and proceed).
Expand Down
11 changes: 11 additions & 0 deletions backup/restorelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,12 @@ function restore_create_new_course($restore,&$course_header) {
} else {
$course->sortorder = 100;
}

//Now, recode some languages (Moodle 1.5)
if ($course->lang == 'ma_nt') {
$course->lang = 'mi_nt';
}

//Now insert the record
$newid = insert_record("course",$course);
if ($newid) {
Expand Down Expand Up @@ -793,6 +799,11 @@ function restore_create_users($restore,$xml_file) {
$rec = backup_getid($restore->backup_unique_code,"user",$userid);
$user = $rec->info;

//Now, recode some languages (Moodle 1.5)
if ($user->lang == 'ma_nt') {
$user->lang = 'mi_nt';
}

//Check if it's admin and coursecreator
$is_admin = !empty($user->roles['admin']);
$is_coursecreator = !empty($user->roles['coursecreator']);
Expand Down

0 comments on commit 12f7885

Please sign in to comment.