Merge branch 'educoder' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into educoder

dev_aliyun
jingquan huang 6 years ago
commit 972c8e6f3c

@ -3,7 +3,7 @@ class ManagementsController < ApplicationController
before_filter :require_business
before_filter :require_admin, :only => [:shixun_setting_list, :mirror_repository, :mirror_picture_shixuns, :editmd_template,
:editmd_template, :subject_level_system, :subject_setting_list,
:shixun_authorization, :ec_template, :codemirror_template,
:shixun_authorization, :ec_template, :codemirror_template, :update_user,
:course_guide_template, :shixun_quality_score, :tech_system, :update_notice, :setting_banner,
:training_2018, :create_standard]
layout 'base_management'

@ -360,6 +360,13 @@ class UsersController < ApplicationController
@messages = PrivateMessage.find_by_sql("SELECT ui.* FROM (SELECT * FROM private_messages WHERE STATUS != 2 AND user_id = #{@user.id} ORDER BY id DESC) ui GROUP BY ui.target_id ORDER BY ui.send_time DESC")
end
def join_private_courses
@invitation_code = params[:invitation_code]
respond_to do |format|
format.js
end
end
# 我收到的issue
def user_receive_issues
@receive_issues = "我收到的Issue"

@ -171,7 +171,8 @@ class SourcesService
def get_user_info params
user = User.find params[:id]
{username: user.show_real_name, user_id: user.id, email: user.mail, phone: user.phone, sex: user.sex, school_name: user.school_name}
mail = user.mail.presence || "login@educoder.net"
{username: user.show_real_name, user_id: user.id, email: mail, phone: user.phone, sex: user.sex, school_name: user.school_name}
end
# courses start ############################################

@ -4,35 +4,35 @@
</div>
<div class="task_popup_con mt15 ml30">
<div class="mr15">
<%= form_tag({:controller => 'courses', :action => 'join_course_multi_role'}, :remote => true, :method => :post, :id => 'new-watcher-form') do %>
<ul>
<li class="clearfix mb10">
<label class="panel-form-label fl">课堂邀请码:</label>
<input type="text" class="input-60-40 fl" name="invite_code" placeholder="请输入5位课堂邀请码或6位分班邀请码" style="width: 70%;" value="<%= @invitation_code %>">
</li>
<p id="none_invite_code_notice" class="color-orange none f12" style="margin-left: 90px;">请输入5位课堂邀请码或6位分班邀请码</p>
<li class="clearfix ">
<label class="panel-form-label fl">身份:</label>
<span class="fl mr20 mt2">
<form id="new-watcher-form">
<ul>
<li class="clearfix mb10">
<label class="panel-form-label fl">课堂邀请码:</label>
<input type="text" class="input-60-40 fl" name="invite_code" placeholder="请输入5位课堂邀请码或6位分班邀请码" style="width: 70%;" value="<%= @invitation_code %>">
</li>
<p id="none_invite_code_notice" class="color-orange none f12" style="margin-left: 90px;">请输入5位课堂邀请码或6位分班邀请码</p>
<li class="clearfix ">
<label class="panel-form-label fl">身份:</label>
<span class="fl mr20 mt2">
<input type="checkbox" name="role[]" value="9" id="join_course_role_9" class="ml-3 mr5 magic-checkbox" style="float:left; margin-top: 8px;"/>
<label for="join_course_role_9">教师</label>
</span>
<span class="fl mr20 mt2">
<span class="fl mr20 mt2">
<input type="checkbox" name="role[]" value="7" id="join_course_role_7" class="ml5 mr5 magic-checkbox" style="float:left; margin-top: 8px;"/>
<label for="join_course_role_7">助教</label>
</span>
<span class="fl mr20 mt2">
<span class="fl mr20 mt2">
<input type="checkbox" name="role[]" value="10" id="join_course_role_10" class="ml5 mr5 magic-checkbox" style="float:left; margin-top: 8px;"/>
<label for="join_course_role_10">学生/参赛者</label>
</span>
</li>
<p id="none_checked_notice" class="color-orange none f12" style="margin-left: 90px;">请至少选择一个身份</p>
<li class="clearfix mt10 edu-txt-center">
<a href="javascript:void(0);" class="task-btn mr10" onclick="hideModal()">取消</a>
<a href="javascript:void(0);" class="task-btn task-btn-orange ml20" onclick="submit_join_course();">确定</a>
</li>
</ul>
<% end %>
</li>
<p id="none_checked_notice" class="color-orange none f12" style="margin-left: 90px;">请至少选择一个身份</p>
<li class="clearfix mt10 edu-txt-center">
<a href="javascript:void(0);" class="task-btn mr10" onclick="hideModal()">取消</a>
<a href="javascript:void(0);" class="task-btn task-btn-orange ml20" onclick="submit_join_course();">确定</a>
</li>
</ul>
</form>
</div>
</div>
</div>
@ -45,10 +45,30 @@
$("#none_invite_code_notice").hide();
if ($("input[name='role[]']:checked").length >= 1){
$("#none_checked_notice").hide();
$('#new-watcher-form').submit();
hideModal();
$.ajax({
url: "/api/courses/apply_to_join_course.json",
type: "post",
dataType: 'json',
data: {
student: $("#join_course_role_10").is(":checked") ? 1 : "",
professor: $("#join_course_role_9").is(":checked") ? 1 : "",
assistant_professor: $("#join_course_role_7").is(":checked") ? 1 : "",
invite_code: $("input[name='invite_code']").val(),
},
success: function(data){
if(data.status == -1){
$("#none_checked_notice").html(data.message).show();
} else if(data.status == 0 && data.message == "成功"){
window.location = "/courses/"+data.course_id+"/students";
} else{
hideModal();
notice_box(data.message);
}
}
});
return;
}else{
$("#none_checked_notice").show();
$("#none_checked_notice").html("请至少选择一个身份").show();
}
}
}

@ -85,7 +85,7 @@
<li><%= link_to '新建项目', new_project_path() %></li>
</ul>
<ul class="fl with50 edu-txt-center">
<li><%= link_to "加入课堂", join_private_courses_courses_path, :remote => true %></li>
<li><%= link_to "加入课堂", join_private_courses_users_path, :remote => true %></li>
<li><%= link_to "加入项目", applied_join_project_path, :remote => true %></li>
</ul>
</div>

@ -28,7 +28,7 @@
<span class="edu-filter-btn ml20 <%= tids.status == 0 ? 'edu-filter-btn-red' : tids.status == 1 ? 'edu-filter-btn-green' : "" %>"><%= tids.status == 0 ? '待处理' : tids.status == 1 ? '已处理' : "" %></span>
<% end %>
</p>
<p class="color-grey-6 break_word_firefox" style="word-break: break-word;"><%= tids.container_type == "StudentJoinCourse" ? tids.user.try(:show_name) : "" %><%= message_content(tids.keyx_word).html_safe %></p>
<p class="color-grey-6 break_word_firefox" style="word-break: break-word;"><%= tids.container_type == "StudentJoinCourse" ? tids.user.try(:show_name) : "" %><%= message_content(tids.key_word).html_safe %></p>
</div>
<% if @onclick_time < tids.created_at %>
<span class="new-point fr mr40 mt22"></span>

@ -0,0 +1,2 @@
var htmlvalue = "<%= escape_javascript(render :partial => 'courses/join_private_course') %>";
pop_box_new(htmlvalue,460,220);

@ -1670,6 +1670,7 @@ RedmineApp::Application.routes.draw do ## oauth相关
get 'html_show'
get 'switch_user_module'
get 'reward_grade'
match 'join_private_courses', :via => [:get, :post]
end
member do

@ -27,7 +27,7 @@ class CommunityHome extends Component {
}
}
componentWillMount(){
window.document.title = 'Educoder';
window.document.title = 'EduCoder';
}
componentWillReceiveProps(nextProps){

@ -36,14 +36,14 @@ class NewFooter extends Component {
<div className="newFooter edu-txt-center">
<div className="inner-footer_con">
<div className="footercon">
<div class="inline mt40 mb5">
{/* <div class="inline mt40 mb5">
<a href="/" class="fl" style={{height:'70px'}}>
{ImageUrlType===false?<img alt="高校智能化教学与实训平台" src={getImageUrl(ImageUrl)} style={{width: '70px'}}/>:<img alt="高校智能化教学与实训平台" src={getImageUrl(ImageUrl)} style={{width: '100px'}}/>}
</a>
<span class="fl color-grey-c cdefault font-28 ml22" style={{lineHeight:'74px'}}>EduCoder.net</span>
</div>
</div> */}
<ul className="clearfix inner-footernav">
<li><a href="/" className="fl" target="_blank">网站首页</a></li>
<li><a href="/help?index=1" className="fl" target="_blank">关于我们</a></li>

@ -37,7 +37,4 @@ body>.-task-title {
}
/*Main START*/
.newMain {
/* 330̫<30><CCAB><EFBFBD>ˣ<EFBFBD>*/
padding-bottom: 240px !important;
}

@ -13,11 +13,11 @@ const $ = window.$;
let _url_origin = getUrl()
$('head').append( $('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1525440977`) );
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1525440978`) );
$('head').append( $('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/magic-check.css?1525440977`) );
$('head').append( $('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?1525440977`) );
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?1525440978`) );
$('head').append( $('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-admin.css?1525440977`) );

@ -51,6 +51,8 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px}
.search-content a{display: inline-block;width:100%;height: 30px;line-height: 30px;padding:0px 20px;box-sizing: border-box;text-align: left;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;}
/*底部*/
.newFooter{ position: absolute; bottom: 0; width: 100%; height: 235px;background: #323232; clear:both; min-width: 1200px;z-index:8;left: 0px;}
/* 去掉了logo */
.newFooter{ height: 110px; }
.footercon{border-bottom:1px solid #47494d;}
.inner-footernav{width: 560px;margin: 0px auto}
.inner-footernav li{float: left;height: 50px;width: 80px;text-align: center}

@ -192,6 +192,7 @@ input::-ms-clear{display:none;}
.newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;}
.educontent{width: 1200px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/
.newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;padding-top: 60px}/*padding-bottom根据底部的高度而定*/
.newMain{ padding-bottom: 120px !important; }
/*高度*/
.height-100{height: 100%;}

Loading…
Cancel
Save