Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

course rollover command #1469

Merged
merged 59 commits into from
Jun 22, 2016
Merged

course rollover command #1469

merged 59 commits into from
Jun 22, 2016

Conversation

stopfstedt
Copy link
Member

@stopfstedt stopfstedt commented Jun 17, 2016

fixes #1286

Todo:

  • Fill out testRolloverWithEverything test (@jrjohnson)
  • Replace topics with terms (@stopstedt)
  • Change the way objectives are rolled over (@jrjohnson)
  • Remove calls to setLocked etc... which duplicate default functionality (@stopfstedt)
  • Possible remove gmp_sign as it may require additional dependancies
  • Handle empty / missing clerkship type (might work already but saw problem in testing)
  • Add course and session learning materials to rollover everything test
  • Add session terms to rollover everything test
  • Add offerings to rollover everything test

thecoolestguy and others added 30 commits June 17, 2016 14:34
…vs. disciplines -- and successfully used for redmine #6142
…, as well as same year but weeks earlier or later
@stopfstedt
Copy link
Member Author

something else - 'topics' are an outmoded concept. replace with 'terms' everywhere.

Testing the basics now, now relationships really and no sessions.
Same thing, little bit more idiomatic.
Course and session objectives need to be cloned otherwise changes in the
future can modify courses that are already locked.
Ensure that we're creating new objectives not linked ones.  Also checks
to see that the parents are sort of the same by comparing the count.
Limiting calls to once revealed test errors and a double call to course
setMeshDescriptors
gmp_sign is part of a non-bundled set of dependencies which are
difficult to install on OSX.
This is not a required relationship so we need to ensure it is present
before attempting to roll it over.

//taken with gratitude from http://php.net/manual/en/function.gmp-sign.php#106246
$weeksOffsetModifier = ( $weeksOffset > 0 ) ? 1 : ( ( $weeksOffset < 0 ) ? -1 : 0 );
$offsetInWeeks = (($weeksOffsetModifier < 0) ? '-' : '+') . ' ' . abs($weeksOffset) . ' weeks';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to end up with a 0 value for $weekOffsetModifier? if so, then the code should check for that and skip the start/end-date modification below.

@dartajax dartajax merged commit 2000db7 into master Jun 22, 2016
@jrjohnson jrjohnson deleted the cr2 branch June 22, 2016 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create course rollover console command
5 participants