From 2768f1885df9c8c1ad15207dbe3f2c5cf1dffe01 Mon Sep 17 00:00:00 2001 From: Mohab Date: Wed, 23 Apr 2014 12:59:56 +0200 Subject: [PATCH] Issue #200 Editing right side bar --- .../views/layouts/_right_side_bar.html.erb | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/tutor/app/views/layouts/_right_side_bar.html.erb b/tutor/app/views/layouts/_right_side_bar.html.erb index 27803dc7..0f7bb300 100644 --- a/tutor/app/views/layouts/_right_side_bar.html.erb +++ b/tutor/app/views/layouts/_right_side_bar.html.erb @@ -4,22 +4,24 @@ # Author: Ahmed Elassuty --> \ No newline at end of file + <% if student_signed_in? %> +
+ <% recommended_problems = current_student.getClassMatesRecommendations + if recommended_problems != nil then %> + + + <% recommended_problems.each do |key , value| %> + + + + + <% end %> +
Recommendations by classmates
+ <%= value["recommender_name"] %> + + <%= link_to value["problem_title"], controller: "problems", action: "show", id: key %> +
+ <% end %> +
+ <% end %> +