Permalink
Browse files

revert converting course number

  • Loading branch information...
Kang Chen
Kang Chen committed Dec 1, 2011
1 parent 746b4a0 commit 1d7ba9f8226a48d1a6940ef87f5a20b2de092080
Showing with 3 additions and 3 deletions.
  1. +1 −1 app/models/registration.rb
  2. +2 −2 lib/cmusv/hub_student_importer/hub_student_importer.rb
@@ -23,7 +23,7 @@ def self.process_import( courses_data )
}
courses_data.each do |imported_course|
- course = Course.find_by_number(imported_course.number.to_s)
+ course = Course.find_by_number(imported_course.number)
#the following three lines are variables used for the RegistrationMailer notifications
instructors_email_list = Array.new()
@@ -25,7 +25,7 @@ def import_rtf(src_file_path)
unless text.match(Course::META_COURSE_HEADER_MATCHER)
if text.match(Course::META_DATA_LINE1_MATCHER)
course.run_date = DateTime.parse($1).to_time
- course.number = $2.to_i
+ course.number = $2
course.section = $3
course.name = $4
elsif text.match(Course::META_DATA_LINE2_MATCHER)
@@ -89,7 +89,7 @@ def import_html(src_file_path)
unless string_line.match("</pre>")
if string_line.match(html_line1_matcher)
course.run_date = DateTime.parse($1).to_time
- course.number = $2.to_i
+ course.number = $2
course.section = $3
course.name = $4
elsif string_line.match(html_line2_matcher)

0 comments on commit 1d7ba9f

Please sign in to comment.