autolab / Autolab

Course management service that enables auto-graded programming assignments.
http://www.autolabproject.com/
Apache License 2.0
752 stars 214 forks source link

Upgrade Datetime Pickers #181

Closed jez closed 9 years ago

jez commented 9 years ago

Required Features

This will likely be implemented using Bootstrap 3 Datepicker, which includes support for all of these date and time options.

icanb commented 9 years ago

@Z1MM32M4N how's this going?

Z1MM32M4N commented 9 years ago

I've been stuck on how to get this to work with Rail's custom form builders. I'd like to be able to just write f.datetime and have it include all the necessary HTML. For whatever reason, when I try to modify the existing FormBuilderWithDateInput class, it raises a method not found exception.

dlbucci commented 9 years ago

Good idea. I think changing FormBuilders requires a server restart, so you know.

jez commented 9 years ago

@dlbucci Rather, when I try to add the field builder: FormBuilderWithDateInput to the appropriate form (without changing the form builder) is when I get errors.

dlbucci commented 9 years ago

What's the method it's not finding? Are you modeling the form after the assessments#edit form (which might be the only place we use that builder)?

jez commented 9 years ago

pm'ed you with a lengthy explanation.

jez commented 9 years ago

So turns out that a server restart did the trick (as referenced in the above pull request!).

jez commented 9 years ago

The next issue is more of a design decision, so I'm wondering what people's thoughts are.

There's a project that serves the assets through the Rails asset pipeline, but it's out of date right now (1 version behind).

We could very easily download the required assets (Bootstrap 3 DatePicker + Moment.js) and manage installation and updating manually, or we could load the assets through our Gemfile. I'm in favor of the second, but there's no guarantee that this will happen any time soon.

Thoughts? Our options are:

  1. Manage all static assets manually
  2. Download manually now and patch up Gemfile later
  3. Don't do extra work now and install through Gemfile when it becomes available
icanb commented 9 years ago

I'd say just do it manually (at least for now). I think we shouldn't be dependent on another party for this sort of simple stuff.

jez commented 9 years ago

I made an initial stab at upgrading the datetime pickers. You can see my progress in #226. I strongly suggest breaking it down by the individual commits, as I removed a lot of cruft as a part of the process.

dlbucci commented 9 years ago

Hey @jez, your PR #255 sort of broke check boxes in forms, or at least the check boxes for modules in the assessment edit form. Each box is now the checkbox, followed by "Has module", a new line, then "module".

jez commented 9 years ago

Good catch, I'll take a look when I wake up. On Thu, Feb 5, 2015 at 11:40 PM Daniel Bucci notifications@github.com wrote:

Hey @jez https://github.com/jez, your PR #255 https://github.com/autolab/Autolab/pull/255 sort of broke check boxes in forms, or at least the check boxes for modules in the assessment edit form. Each box is now the checkbox, followed by "Has module", a new line, then "module".

— Reply to this email directly or view it on GitHub https://github.com/autolab/Autolab/issues/181#issuecomment-73182026.

icanb commented 9 years ago

@jez reminder (i know you've been busy over the weekend)

dlbucci commented 9 years ago

Can this be closed now?

jez commented 9 years ago

It hasn't hit the master branch yet On Wed, Feb 11, 2015 at 11:43 AM Daniel Bucci notifications@github.com wrote:

Can this be closed now?

— Reply to this email directly or view it on GitHub https://github.com/autolab/Autolab/issues/181#issuecomment-73971053.