Skip to content

Conversation

@kristofnemere
Copy link
Contributor

@kristofnemere kristofnemere commented Dec 18, 2025

Summary

Fixed a crash that occurred when saving file or folder settings in the Teacher app. The app was throwing a UninitializedPropertyAccessException when users tried to modify file/folder properties and save the changes.

Changes

  • Moved the initialization of updateFileFolder property from the companion object's newInstance() function to the onCreate() lifecycle method
  • This ensures the property is initialized after the fragment's arguments have been properly parsed and the ParcelableArg delegate is accessible

Test Plan

  1. Open Teacher app
  2. Navigate to Files section in any course
  3. Open a file or folder's edit screen
  4. Change any setting (name, access permissions, lock/unlock dates, usage rights, etc.)
  5. Optionally rotate the device before saving
  6. Click the Save button
  7. Verify the changes are saved successfully without crashing
  8. Test with both files and folders
  9. Test with different combinations of settings

Issue References

refs: MBL-19612

Impact

affects: Teacher

Release Note

release note: Fixed crash when saving file or folder settings in Teacher app.


🤖 Generated with Claude Code

Fixed UninitializedPropertyAccessException that occurred when trying
to save file or folder settings in the Teacher app.

The issue was that updateFileFolder lateinit property was being
initialized in the companion object's newInstance() function, where
the ParcelableArg delegate wasn't accessible yet. Moved the
initialization to onCreate() where the fragment's arguments have
been properly parsed.

Test plan:
1. Navigate to Files in Teacher app
2. Open a file or folder's edit screen
3. Change any setting (name, access, etc.)
4. Optionally rotate the device
5. Click Save
6. Verify the changes are saved without crashing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions
Copy link

📊 Code Coverage Report

✅ Student

  • PR Coverage: 42.91%
  • Master Coverage: 42.91%
  • Delta: +0.00%

✅ Teacher

  • PR Coverage: 25.48%
  • Master Coverage: 25.48%
  • Delta: +0.00%

✅ Pandautils

  • PR Coverage: 22.49%
  • Master Coverage: 22.49%
  • Delta: +0.00%

📈 Overall Average

  • PR Coverage: 30.30%
  • Master Coverage: 30.30%
  • Delta: +0.00%

@github-actions
Copy link

🧪 Unit Test Results

✅ 📱 Teacher App

  • Tests: 369 total, 0 failed, 0 skipped
  • Duration: 34.175s
  • Success Rate: 100%

✅ 📦 Submodules

  • Tests: 2472 total, 0 failed, 0 skipped
  • Duration: 48.314s
  • Success Rate: 100%

📊 Summary

  • Total Tests: 2841
  • Failed: 0
  • Skipped: 0
  • Status: ✅ All tests passed!

Last updated: Thu, 18 Dec 2025 10:51:15 GMT

@github-actions
Copy link

Teacher Install Page

@kristofnemere kristofnemere merged commit a38cc35 into master Dec 18, 2025
27 checks passed
@kristofnemere kristofnemere deleted the MBL-19612 branch December 18, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants