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

Error on training library when multiple blocks have trainings attached for user #469

Closed
ragesoss opened this issue Nov 11, 2015 · 4 comments

Comments

@ragesoss
Copy link
Member

@thenickcox

The library pages, such as /training/students, can throw errors related to due dates. This is possibly just an error caused be there being more than one block returned TraingingProgressManager.block_with_earliest_due_date

It looks like it needs a block.first at the end of the method.

[2015-11-11 13:19:37.699 FATAL] ActionView::Template::Error (undefined method `due_date' for #<Array:0x007f32f6127cf0>):
    26:                     %i.action-card-icon.icon.icon-rt_arrow
    27:                 %p.action-card-text
    28:                   %small.block-element.capitalize{ class: pm.assignment_status_css_class }
    29:                     = pm.assignment_status
    30:                   %span= lib_module.description
  lib/training_progress_manager.rb:69:in `earliest_due_date'
  lib/training_progress_manager.rb:44:in `assignment_status'
  app/views/training/show.html.haml:29:in `block (3 levels) in _app_views_training_show_html_haml___426086786518823005_69928602976640'
  app/views/training/show.html.haml:20:in `block (2 levels) in _app_views_training_show_html_haml___426086786518823005_69928602976640'
  app/views/training/show.html.haml:16:in `each'
  app/views/training/show.html.haml:16:in `block in _app_views_training_show_html_haml___426086786518823005_69928602976640'
  app/views/training/show.html.haml:10:in `each'
  app/views/training/show.html.haml:10:in `_app_views_training_show_html_haml___426086786518823005_69928602976640'
@ragesoss
Copy link
Member Author

In some cases, adding assignments to a timeline and then trying to save results in an error, and then upon hard refresh, the entire timeline is gone.

@thenickcox
Copy link
Contributor

Wow! That's a fantastically catastrophic error! Yeah, that first should be there. I made that change at one point, but it's possible it got lost in the cherry-picking and rebasing. I've noticed a few UI regressions that seem to have resulted from that. Either way, I'll fix it!

@ragesoss
Copy link
Member Author

@thenickcox although I haven't tried extensively, I wasn't able to replicate this on the latest version.

@thenickcox
Copy link
Contributor

@ragesoss Yeah, it looked like the different implementation of the due date calculation was going to fix this as a side effect. Feel free to reopen if you run into this again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants