Search in sources :

Example 81 with Student

use of com.remswork.project.alice.model.Student in project classify-system by anverliedoit.

the class StudentAdapter method onBindViewHolder.

@Override
public void onBindViewHolder(StudentAdapterViewHolder holder, int position) {
    Student student = studentList.get(position);
    holder.setView(student, position);
}
Also used : Student(com.remswork.project.alice.model.Student)

Example 82 with Student

use of com.remswork.project.alice.model.Student in project classify-system by anverliedoit.

the class ClassStudentListResource method addStudentById.

@POST
public Response addStudentById(@PathParam("classId") long classId) {
    try {
        ClassStudentListResourceLinks resourceLinks = new ClassStudentListResourceLinks(uriInfo);
        if (studentId == 0)
            throw new ClassDaoException("Query param : studentId is required");
        Student student = classService.addStudentById(classId, studentId);
        student.addLink(resourceLinks.self(classId, studentId));
        return Response.status(Response.Status.OK).entity(student).build();
    } catch (ClassException | ClassDaoException e) {
        e.printStackTrace();
        Message message = new Message(400, "Bad Request", e.getMessage());
        return Response.status(Response.Status.BAD_REQUEST).entity(message).build();
    }
}
Also used : ClassStudentListResourceLinks(com.remswork.project.alice.resource.links.ClassStudentListResourceLinks) ClassDaoException(com.remswork.project.alice.dao.exception.ClassDaoException) Message(com.remswork.project.alice.model.support.Message) ClassException(com.remswork.project.alice.exception.ClassException) Student(com.remswork.project.alice.model.Student)

Aggregations

Student (com.remswork.project.alice.model.Student)82 GradingFactorException (com.remswork.project.alice.exception.GradingFactorException)29 CompoundButton (android.widget.CompoundButton)22 Message (com.remswork.project.alice.model.support.Message)21 Grade (com.remswork.project.alice.model.Grade)20 ArrayList (java.util.ArrayList)19 StudentException (com.remswork.project.alice.exception.StudentException)17 CardView (android.support.v7.widget.CardView)15 DefaultItemAnimator (android.support.v7.widget.DefaultItemAnimator)15 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)15 RecyclerView (android.support.v7.widget.RecyclerView)15 View (android.view.View)15 TextView (android.widget.TextView)15 ClassException (com.remswork.project.alice.exception.ClassException)14 Button (android.widget.Button)13 List (java.util.List)13 ToggleButton (android.widget.ToggleButton)11 Client (javax.ws.rs.client.Client)10 WebTarget (javax.ws.rs.client.WebTarget)10 Response (javax.ws.rs.core.Response)10