# Offline data editing and syncing

## Description:

If the user edits data while offline, the data will be sent to the server as soon as the app is open and a connection is available.

## Step-by-Step Procedure:

1. Login as admin.
2. Click on "Courses."
3. Click on the "+ Course" button.
4. Click on the "Add a new course" button.
5. Enter a course name.
6. Click on the "Description" field.
7. New text block appears.
8. Enter the description.
9. Click on the "Done" button.
10. Click "Save" button to save the course.
11. Click on the "Courses"
12. Click on the course name.
13. Click on the "Members" tab.
14. Click on the "Add a teacher" button
15. Click on "Add a new person" button
16. Enter the teacher's first name, last name and Gender.
17. Click on the "Save" button and save the person details.
18. Click on the "Save" button to save the enrollment details.
19. Click on the teacher name.
20. Click on the "View profile" button.
21. Click on the "Create account" button.
22. Enter the username.
23. Enter the password.
24. Click on the "Save button"
25. Click on the "Courses"
26. Click on the course name.
27. Click on the "Members" tab.
28. Click on the "Add a student" button
29. Click on "Add a new person" button
30. Enter the student's first name, last name and Gender.
31. Click on the "Save" button and save the person details.
32. Click on the "Save" button to save the enrollment details.
33. Click on the student name.
34. Click on the "View profile" button.
35. Click on the "Create account" button.
36. Enter the username.
37. Enter the password.
38. Click on the "Save button"
39. Clear the app storage.
40. Login to the app using the teacher username and password.
41. Verify the teacher able to see the course.
42. Click on "Members".
43. Verify teacher able to see all members in the course.
44. Close the app
45. Switch off the wifi/data on the device.
46. Open the app
47. Open the course page
48. Click on the "edit" button. 
49. Click on "Add a block"
50. Click on "Text"
51. Add a title and text
52. Click on "Save" button to save text block.
53. Click on "Save to save changes made in course while offline. 
54. Close the app. 
55. Reconnect the device to the internet. 
56. Open the app again. 
57. Open the Course
58. Verify that the added text block is visible in the app after syncing with the server. 
59. Check that no error messages related to connectivity are displayed.