|
|
|
@ -2905,3 +2905,73 @@ def user_url_in_org(user_id)
|
|
|
|
|
return "https://www.trustie.net/users/" + user_id.to_s
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def project_issues_url_in_org(project_id)
|
|
|
|
|
if Rails.env.development?
|
|
|
|
|
return "http://localhost:3000/projects/" + project_id.to_s + "/issues"
|
|
|
|
|
elsif Rails.env.test?
|
|
|
|
|
return "https://www.test.forge.trustie.net/projects/" + project_id.to_s + "/issues"
|
|
|
|
|
else
|
|
|
|
|
return "https://www.trustie.net/projects/" + project_id.to_s + "/issues"
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def issue_url_in_org(id)
|
|
|
|
|
if Rails.env.development?
|
|
|
|
|
return "http://localhost:3000/issues/" + id.to_s
|
|
|
|
|
elsif Rails.env.test?
|
|
|
|
|
return "https://www.test.forge.trustie.net/issues/" + id.to_s
|
|
|
|
|
else
|
|
|
|
|
return "https://www.trustie.net/issues/" + id.to_s
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def project_boards_url_in_org(id)
|
|
|
|
|
if Rails.env.development?
|
|
|
|
|
return "http://localhost:3000/projects/" + id.to_s + "/boards"
|
|
|
|
|
elsif Rails.env.test?
|
|
|
|
|
return "https://www.test.forge.trustie.net/projects/" + id.to_s + "/boards"
|
|
|
|
|
else
|
|
|
|
|
return "https://www.trustie.net/projects/" + id.to_s + "/boards"
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def board_message_url_in_org(board_id, message_id)
|
|
|
|
|
if Rails.env.development?
|
|
|
|
|
return "http://localhost:3000/boards/" + board_id.to_s + "/topics/" + message_id.to_s
|
|
|
|
|
elsif Rails.env.test?
|
|
|
|
|
return "https://www.test.forge.trustie.net/boards/" + board_id.to_s + "/topics/" + message_id.to_s
|
|
|
|
|
else
|
|
|
|
|
return "https://www.trustie.net/boards/" + board_id.to_s + "/topics/" + message_id.to_s
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def project_url_in_org(id)
|
|
|
|
|
if Rails.env.development?
|
|
|
|
|
return "http://localhost:3000/projects/" + id.to_s
|
|
|
|
|
elsif Rails.env.test?
|
|
|
|
|
return "https://test.forge.trustie.net/projects/" + id.to_s
|
|
|
|
|
else
|
|
|
|
|
return "https://www.trustie.net/projects/" + id.to_s
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def homework_common_index_url_in_org(course_id)
|
|
|
|
|
if Rails.env.development?
|
|
|
|
|
return "http://localhost:3000/homework_common?course=" + course_id.to_s
|
|
|
|
|
elsif Rails.env.test?
|
|
|
|
|
return "https://test.forge.trustie.net/homework_common?course=" + course_id.to_s
|
|
|
|
|
else
|
|
|
|
|
return "https://www.trustie.net/homework_common?course=" + course_id.to_s
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def student_work_index_url_in_org(homework_id)
|
|
|
|
|
if Rails.env.development?
|
|
|
|
|
return "http://localhost:3000/student_work?homework=" + homework_id.to_s
|
|
|
|
|
elsif Rails.env.test?
|
|
|
|
|
return "https://test.forge.trustie.net/student_work?homework=" + course_id.to_s
|
|
|
|
|
else
|
|
|
|
|
return "https://www.trustie.net/student_work?homework=" + course_id.to_s
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|