| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
1232ed5ccf | Merge branch 'linchun' of https://git.trustie.net/jacknudt/trustieforge into linchun | 10 years ago |
|
|
383a53515d | 20160603data_analysis | 10 years ago |
|
|
ff6b26b071 | 20160603data_analysis | 10 years ago |
|
|
7c2cd5ffd8 | dataaanlysis2 | 10 years ago |
| @@ -0,0 +1,3 @@ | |||||
| # Place all the behaviors and hooks related to the matching controller here. | |||||
| # All this logic will automatically be available in application.js. | |||||
| # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ | |||||
| @@ -0,0 +1,3 @@ | |||||
| // Place all the styles related to the data_analysis controller here. | |||||
| // They will automatically be included in application.css. | |||||
| // You can use Sass (SCSS) here: http://sass-lang.com/ | |||||
| @@ -63,6 +63,23 @@ class AdminController < ApplicationController | |||||
| end | end | ||||
| end | end | ||||
| # 课程数据分析 | |||||
| def course_analysis | |||||
| @course = Course.find(params[:course_id]) | |||||
| respond_to do |format| | |||||
| format.html | |||||
| end | |||||
| end | |||||
| #课程中学生作业得分分析 | |||||
| def homework_analysis | |||||
| end | |||||
| #课程中学生综合成绩 | |||||
| def student_course_comprehensive_performace | |||||
| end | |||||
| #精品课程下的全部课程 | #精品课程下的全部课程 | ||||
| def excellent_all_courses | def excellent_all_courses | ||||
| name = params[:name] | name = params[:name] | ||||
| @@ -0,0 +1,4 @@ | |||||
| class DataAnalysisController < ApplicationController | |||||
| def index | |||||
| end | |||||
| end | |||||
| @@ -0,0 +1,2 @@ | |||||
| module DataAnalysisHelper | |||||
| end | |||||
| @@ -0,0 +1,7 @@ | |||||
| <div class="tabs"> | |||||
| <ul> | |||||
| <li><%= link_to '作业成绩分析', {:action => 'homework_analysis'}, class: "#{current_page?(homework_analysis_path)? 'selected' : nil }" %></li> | |||||
| <li><%= link_to '学生综合得分', {:action => 'student_course_comprehensive_performace'}, class: "#{current_page?(student_course_comprehensive_performace_path)? 'selected' : nil }" %></li> | |||||
| </ul> | |||||
| </div> | |||||
| @@ -0,0 +1,8 @@ | |||||
| <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', :media => 'all' %> | |||||
| <h1 class="BgBox_h2">课程中学生行为数据分析</h1> | |||||
| <tr>课程名:<tr/><%= @course.name %><br> | |||||
| <tr>主讲教师:</tr><%=@course.tea_id %><br> | |||||
| <tr>学生数:</tr><%= studentCount(@course) %><br><br><br> | |||||
| <%= render 'tab_homework_analysis' %> | |||||
| @@ -39,6 +39,9 @@ | |||||
| <th style="width: 70px;"> | <th style="width: 70px;"> | ||||
| 动态数 | 动态数 | ||||
| </th> | </th> | ||||
| <th style="width: 70px;"> | |||||
| 数据分析 | |||||
| </th> | |||||
| </tr> | </tr> | ||||
| </thead> | </thead> | ||||
| <tbody> | <tbody> | ||||
| @@ -74,7 +77,11 @@ | |||||
| <td class="center"> | <td class="center"> | ||||
| <%= course.course_activities.count%> | <%= course.course_activities.count%> | ||||
| </td> | </td> | ||||
| <td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=course.name%>'> | |||||
| <%= link_to '进入数据分析', {:controller => "admin", :action => "course_analysis", :course_id => course.id} %> | |||||
| </td> | |||||
| </tr> | </tr> | ||||
| <% end %> | <% end %> | ||||
| </tbody> | </tbody> | ||||
| </table> | </table> | ||||
| @@ -0,0 +1 @@ | |||||
| sdfddsg | |||||
| @@ -0,0 +1 @@ | |||||
| dfgasd | |||||
| @@ -0,0 +1,2 @@ | |||||
| <h1>DataAnalysis#index</h1> | |||||
| <p>Find me in app/views/data_analysis/index.html.erb</p> | |||||
| @@ -26,6 +26,8 @@ | |||||
| # Example: :via => :get ====> :via => :get | # Example: :via => :get ====> :via => :get | ||||
| RedmineApp::Application.routes.draw do | RedmineApp::Application.routes.draw do | ||||
| get "data_analysis/index" | |||||
| mount Mobile::API => '/api' | mount Mobile::API => '/api' | ||||
| # Enable Grack support | # Enable Grack support | ||||
| @@ -1007,6 +1009,9 @@ RedmineApp::Application.routes.draw do | |||||
| match 'admin/projects', :via => :get | match 'admin/projects', :via => :get | ||||
| get 'admin/courses' | get 'admin/courses' | ||||
| get 'admin/excellent_courses', as: :excellent_courses | get 'admin/excellent_courses', as: :excellent_courses | ||||
| get 'admin/course_analysis', as: :course_analysis | |||||
| get 'admin/homework_analysis', as: :homework_analysis | |||||
| get 'admin/student_course_comprehensive_performace', as: :student_course_comprehensive_performace | |||||
| get 'admin/excellent_all_courses', as: :excellent_all_courses | get 'admin/excellent_all_courses', as: :excellent_all_courses | ||||
| match 'admin/set_excellent_course/:id', :to => 'admin#set_excellent_course' | match 'admin/set_excellent_course/:id', :to => 'admin#set_excellent_course' | ||||
| get 'admin/course_resource_list' | get 'admin/course_resource_list' | ||||
| @@ -0,0 +1,12 @@ | |||||
| require 'rails_helper' | |||||
| RSpec.describe DataAnalysisController, :type => :controller do | |||||
| describe "GET #index" do | |||||
| it "returns http success" do | |||||
| get :index | |||||
| expect(response).to have_http_status(:success) | |||||
| end | |||||
| end | |||||
| end | |||||