Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: 1.7
-
Fix Version/s: None
-
Component/s: Administration
-
Labels:None
-
Environment:All
-
Database:Any
-
Affected Branches:MOODLE_17_STABLE
Description
I know manipulating the database directly is fairly unusual. We're acting upon triggers raised by our MIS Oracle database for enrolments, new courses etc to automatically add users and courses to Moodle. The system is working fine for now, but is there any chance of protecting us from ourselves as far as is reasonable.
Within the interface, you don't offer a student (or tutor?) who is already a participant to be added, so there is inherent protection that way. As a test, I manually duplicated the last entry in mdl_user_students in terms of UserID and CourseID and it allowed it. The system wasn't in use so no harm done - I deleted the record.
Is it possible within the MySQL structures to indicate in some way that the two fields combined must be unique? Same for mdl_user_teacher and I suspect mdl_user_admin etc. Maybe there are other fields in the tables that might be better if the underlying field attributes protected against manual/automation errors.
From Paul Duff (paulduff at wiltscoll.ac.uk) Tuesday, 11 May 2004, 06:46 AM:
I suggested this feature to improve integrity whilst 'data stuffing' (accessing database directly/externally) to populate users, courses etc. This practice is undesirable and need to be replaced by a process closer to Moodle - hence - this request is withdrawn.