Coder Social home page Coder Social logo

Comments (5)

nilbus avatar nilbus commented on July 18, 2024

In case it's helpful later:

NoMethodError in Response#edit

Showing app/views/response/response.html.erb where line #23 raised:

You have a nil object when you didn't expect it!
The error occurred while evaluating nil.comments
Extracted source (around line #23):

20:    @questions.each{
21:     | question | %>
22:     <%= question.txt %><BR/>
23:     <% if controller.action_name != 'new' and @review_scores[i].comments != nil %>    
24:       <% text = @review_scores[i].comments.gsub(/\"/,'&quot;').lstrip %>
25:       <textarea cols="70" rows="1" id="responses_<%=i%>_comments" name="responses[<%=i%>][comment]"  style="overflow:hidden;" onkeyup="checkRows(this)" ><%= text %></textarea>
26:     <% else %>

from expertiza.

nilbus avatar nilbus commented on July 18, 2024

In case we every want to use this temp fix again, this is the code I ran in the rails console to assign the old scores to the new questionnaire:

a=Assignment.find(311)
replacement_question_ids = {1285 => 1302, 1286 => 1303, 1287 => 1304, 1288 => 1305, 1290 => 1306}

min_replacement = replacement_question_ids.values.min
q=a.questionnaires.select{|q|q.read_attribute(:type) == 'ReviewQuestionnaire'}.first
a.participants.each do |p|
  q.get_assessments_for(p).each do |response|
    response.scores.each do |s|
      s.update_attribute :question_id, replacement_question_ids[s.question_id] if s.question_id < min_replacement
      s.update_attribute :score, 5 if s.question_id == 1306
    end
  end
end

from expertiza.

efg avatar efg commented on July 18, 2024

This is still extant. It might be reasonable to, when the rubric is changed, e-mail the reviews that have already been done back to the student who wrote them, advising them to fill in the same info using the updated rubric.

from expertiza.

johnbumgardner avatar johnbumgardner commented on July 18, 2024

This seems to be around still.

from expertiza.

ryanhardy00 avatar ryanhardy00 commented on July 18, 2024

This is still an issue in beta as of 1/27/2022.

from expertiza.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.