Skip to content

Commit

Permalink
revert converting course number
Browse files Browse the repository at this point in the history
  • Loading branch information
Kang Chen committed Dec 1, 2011
1 parent 746b4a0 commit 1d7ba9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/registration.rb
Expand Up @@ -23,7 +23,7 @@ def self.process_import( courses_data )
} }


courses_data.each do |imported_course| 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 #the following three lines are variables used for the RegistrationMailer notifications
instructors_email_list = Array.new() instructors_email_list = Array.new()


Expand Down
4 changes: 2 additions & 2 deletions lib/cmusv/hub_student_importer/hub_student_importer.rb
Expand Up @@ -25,7 +25,7 @@ def import_rtf(src_file_path)
unless text.match(Course::META_COURSE_HEADER_MATCHER) unless text.match(Course::META_COURSE_HEADER_MATCHER)
if text.match(Course::META_DATA_LINE1_MATCHER) if text.match(Course::META_DATA_LINE1_MATCHER)
course.run_date = DateTime.parse($1).to_time course.run_date = DateTime.parse($1).to_time
course.number = $2.to_i course.number = $2
course.section = $3 course.section = $3
course.name = $4 course.name = $4
elsif text.match(Course::META_DATA_LINE2_MATCHER) elsif text.match(Course::META_DATA_LINE2_MATCHER)
Expand Down Expand Up @@ -89,7 +89,7 @@ def import_html(src_file_path)
unless string_line.match("</pre>") unless string_line.match("</pre>")
if string_line.match(html_line1_matcher) if string_line.match(html_line1_matcher)
course.run_date = DateTime.parse($1).to_time course.run_date = DateTime.parse($1).to_time
course.number = $2.to_i course.number = $2
course.section = $3 course.section = $3
course.name = $4 course.name = $4
elsif string_line.match(html_line2_matcher) elsif string_line.match(html_line2_matcher)
Expand Down

0 comments on commit 1d7ba9f

Please sign in to comment.