learning-paths-plugin 0.3.4rc3__tar.gz → 0.3.4rc4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {learning_paths_plugin-0.3.4rc3/learning_paths_plugin.egg-info → learning_paths_plugin-0.3.4rc4}/PKG-INFO +1 -1
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/__init__.py +1 -1
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/receivers.py +12 -3
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4/learning_paths_plugin.egg-info}/PKG-INFO +1 -1
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/CHANGELOG.rst +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/LICENSE.txt +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/MANIFEST.in +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/README.rst +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/admin.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/__init__.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/urls.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/v1/__init__.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/v1/filters.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/v1/permissions.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/v1/serializers.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/v1/urls.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/v1/utils.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/v1/views.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/apps.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/compat.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/conftest.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/keys.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/migrations/0001_initial.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/migrations/0002_learningpath_uuid.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/migrations/0003_learningpath_subtitle.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/migrations/0004_auto_20240207_1633.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/migrations/0005_learningpathstep_weight_learningpathgradingcriteria.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/migrations/0006_enrollment_models.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/migrations/0007_replace_uuid_with_learningpathkey.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/migrations/0008_remove_learningpathstep_relative_due_date_in_days.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/migrations/0009_remove_learningpath_slug.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/migrations/0010_learningpath_invite_only.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/migrations/0011_replace_learningpath_image_url_with_image.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/migrations/0012_alter_learningpath_subtitle.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/migrations/0013_enrollment_audit.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/migrations/__init__.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/models.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/settings.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/templates/learning_paths/base.html +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/urls.py +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths_plugin.egg-info/SOURCES.txt +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths_plugin.egg-info/dependency_links.txt +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths_plugin.egg-info/entry_points.txt +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths_plugin.egg-info/not-zip-safe +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths_plugin.egg-info/requires.txt +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths_plugin.egg-info/top_level.txt +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/pyproject.toml +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/requirements/base.in +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/requirements/constraints.txt +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/setup.cfg +0 -0
- {learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/setup.py +0 -0
{learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/receivers.py
RENAMED
|
@@ -44,16 +44,25 @@ def process_pending_enrollments(sender, instance, created, **kwargs):
|
|
|
44
44
|
|
|
45
45
|
for entry in pending_enrollments:
|
|
46
46
|
try:
|
|
47
|
-
|
|
48
|
-
enrollment._audit = { # pylint: disable=protected-access
|
|
47
|
+
audit_data = {
|
|
49
48
|
"enrolled_by": instance,
|
|
50
49
|
"state_transition": LearningPathEnrollmentAudit.ALLOWEDTOENROLL_TO_ENROLLED,
|
|
51
50
|
}
|
|
51
|
+
if last_allowed_audit := entry.audit.order_by("-created").first():
|
|
52
|
+
for field in ["reason", "org", "role"]:
|
|
53
|
+
audit_data[field] = getattr(last_allowed_audit, field, "")
|
|
54
|
+
|
|
55
|
+
enrollment = LearningPathEnrollment(learning_path=entry.learning_path, user=instance)
|
|
56
|
+
enrollment._audit = audit_data # pylint: disable=protected-access
|
|
52
57
|
enrollment.save()
|
|
53
58
|
enrollments_created += 1
|
|
59
|
+
|
|
60
|
+
# Link existing audits from the "allowed to enroll" entry to the new enrollment.
|
|
61
|
+
entry.audit.update(enrollment=enrollment)
|
|
62
|
+
|
|
54
63
|
except IntegrityError: # pragma: no cover
|
|
55
64
|
logger.info(
|
|
56
|
-
"[LearningPaths] Enrollment already exists for user %s in learning path %s",
|
|
65
|
+
"[LearningPaths] Enrollment already exists for user %s in the learning path %s",
|
|
57
66
|
instance,
|
|
58
67
|
entry.learning_path.key,
|
|
59
68
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/__init__.py
RENAMED
|
File without changes
|
{learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/urls.py
RENAMED
|
File without changes
|
{learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/v1/__init__.py
RENAMED
|
File without changes
|
{learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/v1/filters.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/v1/urls.py
RENAMED
|
File without changes
|
{learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/v1/utils.py
RENAMED
|
File without changes
|
{learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/api/v1/views.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/conftest.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/learning_paths/settings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{learning_paths_plugin-0.3.4rc3 → learning_paths_plugin-0.3.4rc4}/requirements/constraints.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|