dev_haigong
cxt 6 years ago
commit 5e0cea8e88

@ -65,7 +65,7 @@ class GamesService
# power判断用户是否有权限查看隐藏测试集(TPM管理员平台认证的老师花费金币查看者) -1 表示不能解锁 0 表示需要付费解锁 1表示可以看
# myshixun_manager
myshixun_manager = shixun_manager(shixun, current_user) || (current_user.is_certification_teacher && shixun.test_set_permission)
myshixun_manager = shixun_manager(shixun, current_user) || (current_user.is_certification_teacher)
power = (myshixun_manager || game.test_sets_view ) ? 1 : (shixun.test_set_permission ? 0 : -1)
# 选择题和编程题公共部分
@ -862,7 +862,7 @@ class GamesService
Rails.logger.warn("last_output is #{latest_output}")
# power判断用户是否有权限查看隐藏测试集(TPM管理员平台认证的老师花费金币查看者)
power = (shixun_manager(shixun, current_user) || (current_user.is_certification_teacher && shixun.test_set_permission)) ? 1 : (shixun.test_set_permission ? 0 : -1)
power = (shixun_manager(shixun, current_user) || (current_user.is_certification_teacher)) ? 1 : (shixun.test_set_permission ? 0 : -1)
# 测试集统计及处理
unless qurey_test_sets.blank?
check_power = (power == 1 || game.test_sets_view)

@ -15,6 +15,33 @@
<div class="educontent">
<!--我的课堂-->
<div class="square-list clearfix">
<!--课堂新建入口-->
<div class="square-Item">
<div class="substance substancepad" >
<a href="/courses/new">
<div class="substancenenew">
<div class="leftten"></div>
<div class="topten"></div>
</div>
</a>
</div>
<div class="edu-txt-center course-bottom">
<div class="inline color-grey-6">
<span class="fl ml10 mr10 squareIconSpan substancefont">
新建课堂
</span>
</div>
</div>
</div>
<%#= render :partial => "users/course_item", :locals => {:objects => @objects} %>
<% @objects.each do |object| %>
<% allow_visit = @show_all || object.is_public == 1 || User.current.member_of_course?(object) %>

@ -15,6 +15,33 @@
<div class="educontent">
<!--我的项目-->
<div class="square-list clearfix">
<!--新建项目新建入口-->
<div class="square-Item">
<div class="substance substancepad" >
<a href="/projects/new">
<div class="substancenenew">
<div class="leftten"></div>
<div class="topten"></div>
</div>
</a>
</div>
<div class="edu-txt-center course-bottom">
<div class="inline color-grey-6">
<span class="fl ml10 mr10 squareIconSpan substancefont">
新建项目
</span>
</div>
</div>
</div>
<% @objects.each do |object| %>
<% allow_visit = object.is_public || User.current.admin? || User.current.member_of?(object) %>
<div class="square-Item" onclick="open_project(<%= object.id %>, <%= allow_visit %>)" style="cursor: pointer;">

@ -34,6 +34,34 @@
<div class="educontent">
<!--我的实训-->
<div class="square-list clearfix">
<!--实训新建入口-->
<div class="square-Item">
<div class="substance substancepad" >
<a href="/shixuns/new">
<div class="substancenenew">
<div class="leftten"></div>
<div class="topten"></div>
</div>
</a>
</div>
<div class="edu-txt-center course-bottom">
<div class="inline color-grey-6">
<span class="fl ml10 mr10 squareIconSpan substancefont">
新建实训
</span>
</div>
</div>
</div>
<% @objects.each do |object| %>
<div class="square-Item">
<% if object.tag_repertoires.first.present? %>

@ -22,6 +22,34 @@
<div class="educontent">
<!--我的实训路径-->
<div class="square-list clearfix">
<!--实训路径新建入口-->
<div class="square-Item">
<div class="substance substancepad" >
<a href="/paths/new">
<div class="substancenenew">
<div class="leftten"></div>
<div class="topten"></div>
</div>
</a>
</div>
<div class="edu-txt-center course-bottom">
<div class="inline color-grey-6">
<span class="fl ml10 mr10 squareIconSpan substancefont">
新建实训课程
</span>
</div>
</div>
</div>
<% @objects.each_with_index do |object, index| %>
<div class="square-Item">
<% if object.status < 2 && !User.current.member_of_subject?(object) %>

@ -3171,3 +3171,50 @@ line-height: 20px;display: inline-block;color: rgba(65, 140, 205, 1) !important;
position: relative;
color: #05101a;
}
.substancenenew{
width: 236px;
height: 156px;
background: rgba(248,248,248,1);
border: 2px dotted rgba(225,225,225,1);
opacity: 1;
border-radius: 4px;
padding-top: 50px;
position: inherit;
}
.substancepad{
padding: 20px 20px 0px 20px;
border-bottom: 1px solid transparent;
}
.substancefont{
height:24px;
font-size:18px;
font-family:Microsoft YaHei;
font-weight:400;
line-height:21px;
color:rgba(153,153,153,1);
opacity:1;
margin-top: -8px;
}
.topten{
width: 1px;
height: 100px;
border: 2px soild rgba(225,225,225,1);
background: rgba(225,225,225,1);
border: 1px solid rgba(225,225,225,1);
margin: 0 auto;
}
.leftten{
width: 100px;
height: 1px;
background: rgba(225,225,225,1);
border: 1px solid rgba(225,225,225,1);
margin: 0px auto;
position: absolute;
top: 120px;
left: 88px;
}
Loading…
Cancel
Save