This commit is contained in:
Markos Gogoulos
2025-12-30 18:12:49 +02:00
parent 2e57164831
commit 9370706097
4 changed files with 39 additions and 5 deletions

View File

@@ -5,6 +5,7 @@ Fetches course membership from Moodle via NRPS and syncs to MediaCMS RBAC groups
"""
import hashlib
import traceback
from allauth.account.models import EmailAddress
from django.utils import timezone
@@ -65,7 +66,9 @@ class LTINRPSClient:
return members
except Exception:
except Exception as e:
print(f"Error fetching members: {e}")
traceback.print_exc()
return []
def sync_members_to_rbac_group(self, rbac_group):
@@ -100,7 +103,9 @@ class LTINRPSClient:
synced_count += 1
except Exception:
except Exception as e:
print(f"Error syncing user {member.get('user_id')}: {e}")
traceback.print_exc()
continue
removed_count = 0