mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-01-23 00:23:00 -05:00
exp
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user