2014-10-23 11:30:34 +08:00
|
|
|
<% if object_id%>
|
2015-03-27 19:50:01 +08:00
|
|
|
$("#join_in_course_header").html("<%= escape_javascript(join_in_course_header(course, user)) %>");
|
2015-07-30 11:21:35 +08:00
|
|
|
$("#try_join_course_link").replaceWith("<a href='<%=url_for(:controller => 'homework_common', :action => 'index',:course=>course.id, :host=>Setting.host_course)%>' target='_blank' class='blue_n_btn fr mt20'>提交作品</a>");
|
2014-10-23 11:30:34 +08:00
|
|
|
<% end %>
|
|
|
|
<% if @state %>
|
|
|
|
<% if @state == 0 %>
|
|
|
|
alert("加入成功");
|
2015-07-30 11:21:35 +08:00
|
|
|
hideModal($("#popbox02"));
|
2014-10-23 11:30:34 +08:00
|
|
|
<% elsif @state == 1 %>
|
|
|
|
alert("密码错误");
|
|
|
|
<% elsif @state == 2 %>
|
|
|
|
alert("课程已过期\n请联系课程管理员重启课程。(在配置课程处)");
|
|
|
|
<% elsif @state == 3 %>
|
|
|
|
alert("您已经加入了课程");
|
|
|
|
<% elsif @state == 4 %>
|
|
|
|
alert("您加入的课程不存在");
|
|
|
|
<% elsif @state == 5 %>
|
|
|
|
alert("您还未登录");
|
|
|
|
<% else %>
|
|
|
|
alert("未知错误,请稍后再试");
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|