From bb64dc945247ff29b03e1a117cc8d7a5b386f4e2 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 23 Jan 2015 10:19:23 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E8=B0=83=E6=9F=A5=E6=8C=89=E9=92=AE=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_courses.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 466e711c2..06626c155 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -305,7 +305,7 @@ .polls_btn a{font-size:14px; color:#444444;font-weight:bold;} .polls_btn span{ color:#15bed1; font-size:12px; font-weight:normal;} .polls_btn a{ float:left;} - .polls_n{float: left;background: #ff5d31;color: #fff;width: 12px;padding-left: 2px;height: 7px;padding-bottom: 5px;padding-top: 3px;margin-top: -4px;margin-left: 3px; } + .polls_n{float: left;background: #ff5d31;color: #fff;width: 32px;padding-left: 2px;height: 7px;padding-bottom: 5px;padding-top: 3px;margin-top: -4px;margin-left: 3px; } .polls_n p{ margin-top:-4px;} .cl{ clear:both; overflow:hidden; } @@ -313,7 +313,7 @@ <%= link_to l(:label_poll), poll_index_path(:polls_type => "Course", :polls_group_id => @course.id)%>
-

N

+

NEW

From 15a8bddfe6e70ea5e3eba2bbd763b222cf0d97e9 Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 23 Jan 2015 14:02:00 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/en.yml | 79 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 72 insertions(+), 7 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index a7d98a21c..755157245 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -345,7 +345,7 @@ en: field_identity_url: OpenID URL field_content: Content field_group_by: Group results by - field_sharing: Sharing + field_sharing: Sharinglable_hot_course field_parent_issue: Parent task field_member_of_group: "Assignee's group" field_assigned_to_role: "Assignee's role" @@ -536,6 +536,70 @@ en: project_module_boards: Forums project_module_calendar: Calendar project_module_gantt: Gantt + + #edit by meng + lable_hot_course: Hot projects + lable_hot_projects: Active courses + lable_user_active: User movements + lable_bar_active: Bar posts + label_project_score: Score + label_course_join_student: Join a course + label_join_project: Join a project + label_contest_modify_settings: Configuration + bale_news_notice: Add a notification + label_field_correct: correct input + label_work_description_lengthlimit: less than 500 characters + label_create_new_projects: Create a project + label_work_scores_people: The total number of users given scores + label_project_new_description: A project can be used to do anything that requires distributed collaboration + label_project_grade: Score + label_user_for_project_grade: Score + label_relation_files: Select an existing resource + + label_my_brief_introduction: How are feeling today? Leave your footprints ~ + label_submit: Submit + + label_tags_course_name: Course Title + label_new_course_password: Password + label_new_course_description: Description + field_open_student: Student list is public ? + label_course_board: Forum + label_course_open_student_info: (Tick as "open list of students," if not open, the external person couldn't see the list of students) + label_teacher_list: Teacher list + label_student_list: Student list + label_export_excel: Export list + + label_course_organizers: Institute + label_poll: Questionnaire + + field_open_anonymous_evaluation: Use anonymous mutual-evaluation + field_evaluation_num: Number of anonymous works sent to each student + + label_edit_homework: Update homework + label_homework_list: Work list + + label_teacher_score: Teacher's score + label_time: Commit time + label_student_score: Student's score + label_without_score: No evaluated + label_homework_description: Description + label_responses: Messages + + lable_has_commit_homework: You have submitted your work + + + label_user_create_project_homework: created the task + label_commit_limit: Expired but can submit your work + + label_current_group: Current group + + project_module_dts: DTS Test tool + label_module_share: DTS Test tool + field_dts_test: DTS Test tool + + label_technical_support: Support : + label_feedback: Feedback + #end label_user: User label_user_plural: Users @@ -618,7 +682,7 @@ en: label_home: Home label_my_page: My page label_my_account: My account - label_my_message: My messages + label_my_message: Msgs label_my_projects: My projects label_my_page_block: My page block label_administration: Administration @@ -1249,6 +1313,7 @@ en: #fq button_leave_meassge: Submit + button_clear_meassge: Reset label_leave_message_to: leave %{name} a message label_leave_message: Message content label_message: message board @@ -1350,9 +1415,9 @@ en: label_leave_others_message: leave message to him/her label_leave_a_message: Leave him/her a message: label_leave_your_message: Leave a message to you - label_new_activities: ' has new activity in' # modified by bai - label_new_activity: ' has new activity in' - label_i_new_activity: ' have new activity in' + label_new_activities: ' has a new activity in' # modified by bai + label_new_activity: ' has a new activity in' + label_i_new_activity: ' have a new activity in' label_create_project: had participated in label_praise: praise label_cancel_praise: cancel praise @@ -1631,7 +1696,7 @@ en: label_bids_form_contest_new_description: Enterprise or college can release a contest here. label_contest_name: Input the name of the contest label_contest_description: Content:description your contest - label_main_teacher: Main teacher + label_main_teacher: Lecturer label_main_term: Term label_teacher_work_unit: Position label_course_overview: Status @@ -1698,7 +1763,7 @@ en: label_reply_empty: Reply Cann't Empty. label_setup_time: Start date label_endup_time: Over date - label_class_period: Class hour + label_class_period: Lessons label_class_hour: period label_activity_time: publish date From 6645648027be82145ed7a0db50cdd1121f6e0d93 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 23 Jan 2015 14:10:38 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E7=9C=8B=E5=88=B0=E9=97=AE=E5=8D=B7=E7=BB=93=E6=9E=9C=E8=80=81?= =?UTF-8?q?=E5=B8=88=E5=8F=AF=E9=85=8D=E7=BD=AE=E5=A2=9E=E5=8A=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 1 + db/migrate/20150123020615_add_show_result.rb | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 db/migrate/20150123020615_add_show_result.rb diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 4abddaa5e..0ee17222e 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -47,6 +47,7 @@ class PollController < ApplicationController :user_id => User.current.id, :published_at => Time.now, :closed_at => Time.now, + :show_result => 1, :polls_description => "" } @poll = Poll.create option diff --git a/db/migrate/20150123020615_add_show_result.rb b/db/migrate/20150123020615_add_show_result.rb new file mode 100644 index 000000000..0407abceb --- /dev/null +++ b/db/migrate/20150123020615_add_show_result.rb @@ -0,0 +1,9 @@ +class AddShowResult < ActiveRecord::Migration + def up + add_column :polls, :show_result, :integer, default: 1 + end + + def down + remove_column :polls, :show_result + end +end From 2be757a3d581b548b6c51eb0cd1c644531688a25 Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 23 Jan 2015 14:19:43 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 755157245..036410a25 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -562,7 +562,7 @@ en: label_tags_course_name: Course Title label_new_course_password: Password label_new_course_description: Description - field_open_student: Student list is public ? + field_open_student: Student list is public? label_course_board: Forum label_course_open_student_info: (Tick as "open list of students," if not open, the external person couldn't see the list of students) label_teacher_list: Teacher list From dbdae2ac7e5d3c4eb654bf684a94a68a5722af82 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 23 Jan 2015 14:25:29 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=9C=A8=E5=8F=91=E5=B8=83=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E5=92=8C=E7=82=B9=E5=87=BB=E9=97=AE=E5=8D=B7=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E5=A2=9E=E5=8A=A0=E9=97=AE=E5=8D=B7=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E4=B8=8D=E8=83=BD=E4=B8=BA=E7=A9=BA=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 4 ++-- app/views/poll/_edit_head.html.erb | 2 +- app/views/poll/_poll_form.html.erb | 29 ++++++++++++++++++++--------- app/views/poll/_show_head.html.erb | 2 +- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 0ee17222e..8926c0be6 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -70,8 +70,8 @@ class PollController < ApplicationController end def update - @poll.polls_name = params[:polls_name].empty? ? l(:label_poll_title) : params[:polls_name] - @poll.polls_description = params[:polls_description].empty? ? l(:label_poll_description) : params[:polls_description] + @poll.polls_name = params[:polls_name] + @poll.polls_description = params[:polls_description] if @poll.save respond_to do |format| format.js diff --git a/app/views/poll/_edit_head.html.erb b/app/views/poll/_edit_head.html.erb index 802832601..ed90a5ef8 100644 --- a/app/views/poll/_edit_head.html.erb +++ b/app/views/poll/_edit_head.html.erb @@ -7,7 +7,7 @@
diff --git a/app/views/poll/_poll_form.html.erb b/app/views/poll/_poll_form.html.erb index df4859613..1d0dee837 100644 --- a/app/views/poll/_poll_form.html.erb +++ b/app/views/poll/_poll_form.html.erb @@ -25,6 +25,10 @@ } //问卷头 function pollsCancel(){$("#polls_head_edit").hide();$("#polls_head_show").show();} + function pollsSubmit(doc){ + var title = $.trim($("#polls_title").val()); + if(title.length == 0){alert("问卷标题不能为空");}else{doc.parent().parent().parent().submit();} + } function pollsEdit(){$("#polls_head_edit").show();$("#polls_head_show").hide();} // function pollQuestionCancel(question_id){ @@ -57,15 +61,22 @@ function poll_submit() { - $('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll,:is_remote => false}) %>'); - showModal('ajax-modal', '310px'); - $('#ajax-modal').css('height','115px'); - $('#ajax-modal').siblings().remove(); - $('#ajax-modal').before("" + - ""); - $('#ajax-modal').parent().removeClass("alert_praise"); - $('#ajax-modal').parent().css("top","").css("left",""); - $('#ajax-modal').parent().addClass("popbox_polls"); + var title = $.trim($("#polls_name_h").html()); + if(title.length == 0) + { + alert("问卷标题不能为空"); + } + else{ + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll,:is_remote => false}) %>'); + showModal('ajax-modal', '310px'); + $('#ajax-modal').css('height','115px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before("" + + ""); + $('#ajax-modal').parent().removeClass("alert_praise"); + $('#ajax-modal').parent().css("top","").css("left",""); + $('#ajax-modal').parent().addClass("popbox_polls"); + } } diff --git a/app/views/poll/_show_head.html.erb b/app/views/poll/_show_head.html.erb index 7ab16b24d..ce74dc10a 100644 --- a/app/views/poll/_show_head.html.erb +++ b/app/views/poll/_show_head.html.erb @@ -1,7 +1,7 @@

- <%= poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name%> + <%= poll.polls_name%>

<%= @poll.polls_description%> From 900cff8f8e51c9b585e7afc5327b198526dd185f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 23 Jan 2015 14:43:40 +0800 Subject: [PATCH 6/6] =?UTF-8?q?1=E3=80=81=E9=97=AE=E5=8D=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=95=8C=E9=9D=A2=E5=8F=91=E5=B8=83=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=A2=9E=E5=8A=A0=E9=97=AE=E5=8D=B7=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E4=B8=8D=E8=83=BD=E4=B8=BA=E7=A9=BA=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E6=96=AD=202=E3=80=81=E5=8E=BB=E6=8E=89=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E6=8F=92=E4=BB=B6=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_poll.html.erb | 2 +- app/views/poll/index.html.erb | 41 ++++++++++++++++++++--------------- config/application.rb | 6 ++--- db/schema.rb | 19 ++++------------ 4 files changed, 32 insertions(+), 36 deletions(-) diff --git a/app/views/poll/_poll.html.erb b/app/views/poll/_poll.html.erb index c53f09361..1bf6b3716 100644 --- a/app/views/poll/_poll.html.erb +++ b/app/views/poll/_poll.html.erb @@ -34,7 +34,7 @@

  • <%if @is_teacher %> <% if poll.polls_status == 1 %> - 发布问卷 + 发布问卷 <% elsif poll.polls_status == 2%> 取消发布 <% end%> diff --git a/app/views/poll/index.html.erb b/app/views/poll/index.html.erb index a8aca1308..3962768da 100644 --- a/app/views/poll/index.html.erb +++ b/app/views/poll/index.html.erb @@ -26,28 +26,35 @@ function clickCanel(){hideModal("#popbox02");} - function poll_submit(poll_id) + function poll_submit(poll_id,poll_name) { - $('#ajax-modal').html("
    " + - "
    " + - "
    " + + if(poll_name == 0) + { + alert("问卷标题不能为空"); + } + else + { + $('#ajax-modal').html("
    " + + "
    " + + "
    " + "

    问卷发布后将不能对问卷进行修改,
    是否确定发布该问卷?

    " + "
    " + - "确  定" + - "取  消" + + "确  定" + + "取  消" + "
    " + "
    " + - "
    " + - "
    " + - "
    "); - showModal('ajax-modal', '310px'); - $('#ajax-modal').css('height','115px'); - $('#ajax-modal').siblings().remove(); - $('#ajax-modal').before("" + - ""); - $('#ajax-modal').parent().removeClass("alert_praise"); - $('#ajax-modal').parent().css("top","").css("left",""); - $('#ajax-modal').parent().addClass("popbox_polls"); + "
    " + + "
    " + + "
    "); + showModal('ajax-modal', '310px'); + $('#ajax-modal').css('height','115px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before("" + + ""); + $('#ajax-modal').parent().removeClass("alert_praise"); + $('#ajax-modal').parent().css("top","").css("left",""); + $('#ajax-modal').parent().addClass("popbox_polls"); + } }
    diff --git a/config/application.rb b/config/application.rb index 2f1534d00..7e47cc64e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,9 +17,9 @@ module RedmineApp # -- all .rb files in that directory are automatically loaded. # verifier if email is real - EmailVerifier.config do |config| - config.verifier_email = "lizanle521@126.com" - end + #EmailVerifier.config do |config| + # config.verifier_email = "lizanle521@126.com" + #end config.generators do |g| g.test_framework :rspec, diff --git a/db/schema.rb b/db/schema.rb index d0d755bd3..20c74ba1e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150121030451) do +ActiveRecord::Schema.define(:version => 20150123020615) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -23,18 +23,6 @@ ActiveRecord::Schema.define(:version => 20150121030451) do add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" add_index "activities", ["user_id"], :name => "index_activities_on_user_id" - create_table "api_keys", :force => true do |t| - t.string "access_token" - t.datetime "expires_at" - t.integer "user_id" - t.boolean "active", :default => true - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" - add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" - create_table "applied_projects", :force => true do |t| t.integer "project_id", :null => false t.integer "user_id", :null => false @@ -844,9 +832,10 @@ ActiveRecord::Schema.define(:version => 20150121030451) do t.integer "user_id" t.datetime "published_at" t.datetime "closed_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.text "polls_description" + t.integer "show_result", :default => 1 end create_table "praise_tread_caches", :force => true do |t|