Student Tasks Component: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 8: Line 8:


The logic from the original student_task_controller.rb controller and expertiza/app/views/student_task/list.html.erb view is translated to our new API only controller. The list method in our new controller api/v1/student_task_controller.rb renders a JSON which consists of things shown in the picture below,
The logic from the original student_task_controller.rb controller and expertiza/app/views/student_task/list.html.erb view is translated to our new API only controller. The list method in our new controller api/v1/student_task_controller.rb renders a JSON which consists of things shown in the picture below,
[[File:Student_task_list.PNG]]


== Redux ==  
== Redux ==  


== React ==
== React ==

Revision as of 05:31, 5 August 2019

Introduction

After a student logs into Expertiza, the page that the student lands up on is the student tasks list, which as the name suggests lists the tasks the student has. The controller we are concerned with for procuring a list of such tasks is the student_task_controller.rb, which has a method called list which will provide us with a JSON object listing all the tasks.


Rails

The logic from the original student_task_controller.rb controller and expertiza/app/views/student_task/list.html.erb view is translated to our new API only controller. The list method in our new controller api/v1/student_task_controller.rb renders a JSON which consists of things shown in the picture below,

Redux

React