Problem/Motivation

Course module has been in private VCS for several years - with multiple branches in production - before developing on d.o. Most of that has been refactored, but there are still some legacy functions and variables in need of cleaning up.

Proposed resolution

  • Agree on consistent naming conventions
  • Review and change all

Comments

djdevin’s picture

So far I thought of some things that might need changing

  1. snid - serial ID for course objects
  2. requirement_type - currently the module name, we should rename it to just "module"
  3. requirement_component - currently the course object module's key
  4. instance - the unique ID of the course object's node/content/external app that is created
  5. "LMS type" - this is legacy wording, it's really an outline handler (what should provide the course outline). other systems (e.g. Moodle) have similar functionality
  6. We should also establish what options on course objects are called (options? config? settings?)
scottrigby’s picture

2-3. yeah, i was thinking all uses of 'requirements' should be replaced (except the functionality that sets a course object as literally required before proceeding to another step).
5. there's a ticket just for that (because, i think there's more that needs to be done): #1517256: Course outline handler
6. personally i like 'settings' (only because 'config' feels more like global configurations).

scottrigby’s picture

Quickly noting I added a related @todo on course_determine_context(): 2e2bf1ea1f002239f42adde2fa7f66efd052473d

djdevin’s picture

Committed: http://drupalcode.org/project/course.git/commit/2999854827072bf0fdb5fdab...

snid = coid
sfid = cofid
requirement_type = module
requirement_component = object_type

djdevin’s picture

Status: Active » Needs review
scottrigby’s picture

Status: Needs review » Fixed

Just committed the rest: 01c3049

Strip out all unnecessary uses of 'requirement' (variables, form elements, comments, dom). Also remove old requirement-related function, and refactor usages (including actions) with Course object API methods instead.

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 2999854 on 6.x-1.x, 7.x-1.x, 7.x-1.x-fieldable-entities, course-object-entity-view by djdevin:
    Issue #1517320: naming conventions for schema
    
  • Commit 01c3049 on 6.x-1.x, 7.x-1.x, 7.x-1.x-fieldable-entities, course-object-entity-view by scottrigby:
    Issue #1517320: Strip out all unnecessary uses of 'requirement' (...
  • Commit 533c1fc on 6.x-1.x, 7.x-1.x, 7.x-1.x-fieldable-entities, course-object-entity-view by djdevin:
    Issue #1517320: change $enrol to $enroll (US English spelling)