zak-hassan / WhoTeachsWhat

JBoss JSP Application for Data Management
0 stars 0 forks source link

Changes to model, service layer, controller and Dao #158

Closed ghost closed 10 years ago

ghost commented 10 years ago

We still need to fix a few models..

Course needs eval_1, eval_2, eval_3

EvalFactor needs to drop factor_val

CourseInSemester needs to drop eval_1, eval_2, eval_3, eval_1_ans, eval_2_ans, eval_3_ans, addition_attribute

FacultyToCourseInSemesterYear needs eval_1, eval_2, eval_3 and factor_id.

FacultyToCourseInSemesterYear needs to drop compHour_allowance

We need to set a faculty member's compHour allowance somewhere. It can't be per FacultyCourseInSemesterYear

Without these changes, I can't completed fix the UI. Validation is done, the AJAX requests need to be updated to reflect these changes. When will this be done? This is critical.

zak-hassan commented 10 years ago

Lets clarify what is incorrect. Which file?

On Wed, Apr 9, 2014 at 2:01 AM, Anil Santokhi notifications@github.comwrote:

No it's not. The controller and service methods are incorrect.

On Wed, Apr 9, 2014 at 1:59 AM, Zak Hassan notifications@github.com wrote:

Course is working.

On Wed, Apr 9, 2014 at 1:57 AM, Anil Santokhi <notifications@github.com

wrote:

Okay, so any idea on when Course, FacultyToCourseInSemesterYear and CourseInSemester will have their service methods and controllers updated to reflect the new model?

Reply to this email directly or view it on GitHub<

https://github.com/zmhassan/WhoTeachsWhat/issues/158#issuecomment-39931011

.

Reply to this email directly or view it on GitHub< https://github.com/zmhassan/WhoTeachsWhat/issues/158#issuecomment-39931115

.

  • Anil D. Santokhi

Reply to this email directly or view it on GitHubhttps://github.com/zmhassan/WhoTeachsWhat/issues/158#issuecomment-39931179 .

ghost commented 10 years ago

CourseController.java, CourseService.java, FacultyToCourseInSemesterYear.java, FacultyToCourseInSemesterYearController, CourseInSemesterYear.java, CourseInSemesterYearController.java

Basically every controller and service method that changed with the model.

zak-hassan commented 10 years ago

Okay its actually a problem in your javascript.

On Wed, Apr 9, 2014 at 2:02 AM, Anil Santokhi notifications@github.comwrote:

Unless you haven't pushed a change, the course controller and service aren't passing the evaluation factors. It's using the old design.

Reply to this email directly or view it on GitHubhttps://github.com/zmhassan/WhoTeachsWhat/issues/158#issuecomment-39931220 .

ghost commented 10 years ago

No, it's not. Look closely. You're not passing the right data towards the model.

For example..

@RequestMapping(value = "/api/course/{id}", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody Map<String, String> listUpdateJSON( @PathVariable("id") Integer id, @RequestParam(value = "course_code", required = true) String courseCode, @RequestParam(value = "course_name", required = true) String courseName, @RequestParam(value = "crossover_input", required = false) String crossoverCourse, @RequestParam(value = "reference_input", required = false) String oldCourse) {

    courseService.update(id, courseCode, courseName, crossoverCourse,
            oldCourse);

    Map<String, String> list = new HashMap<String, String>();
    list.put("success", "true");

    return list;

You are not looking for evaluation factors 1-3, nor does your service method accept it.

This repeats on all the controllers/service methods I've listed. The Javascript can't be wrong because it hasn't changed yet.

I am waiting for you to update your methods so that I can update my AJAX and retest it. This is what I've been talking about since last night. This is what this entire issue is about.

On Wed, Apr 9, 2014 at 2:05 AM, Zak Hassan notifications@github.com wrote:

Okay its actually a problem in your javascript.

On Wed, Apr 9, 2014 at 2:02 AM, Anil Santokhi <notifications@github.com

wrote:

Unless you haven't pushed a change, the course controller and service aren't passing the evaluation factors. It's using the old design.

Reply to this email directly or view it on GitHub< https://github.com/zmhassan/WhoTeachsWhat/issues/158#issuecomment-39931220

.

Reply to this email directly or view it on GitHubhttps://github.com/zmhassan/WhoTeachsWhat/issues/158#issuecomment-39931397 .

zak-hassan commented 10 years ago

Okay I will look at the models and fix them right now.

On Wed, Apr 9, 2014 at 2:07 AM, Anil Santokhi notifications@github.comwrote:

No, it's not. Look closely. You're not passing the right data towards the model.

For example..

@RequestMapping(value = "/api/course/{id}", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody Map<String, String> listUpdateJSON( @PathVariable("id") Integer id, @RequestParam(value = "course_code", required = true) String courseCode, @RequestParam(value = "course_name", required = true) String courseName, @RequestParam(value = "crossover_input", required = false) String crossoverCourse, @RequestParam(value = "reference_input", required = false) String oldCourse) {

courseService.update(id, courseCode, courseName, crossoverCourse, oldCourse);

Map<String, String> list = new HashMap<String, String>(); list.put("success", "true");

return list;

You are not looking for evaluation factors 1-3, nor does your service method accept it.

This repeats on all the controllers/service methods I've listed. The Javascript can't be wrong because it hasn't changed yet.

On Wed, Apr 9, 2014 at 2:05 AM, Zak Hassan notifications@github.com wrote:

Okay its actually a problem in your javascript.

On Wed, Apr 9, 2014 at 2:02 AM, Anil Santokhi <notifications@github.com

wrote:

Unless you haven't pushed a change, the course controller and service aren't passing the evaluation factors. It's using the old design.

Reply to this email directly or view it on GitHub<

https://github.com/zmhassan/WhoTeachsWhat/issues/158#issuecomment-39931220

.

Reply to this email directly or view it on GitHub< https://github.com/zmhassan/WhoTeachsWhat/issues/158#issuecomment-39931397

.

  • Anil D. Santokhi

Reply to this email directly or view it on GitHubhttps://github.com/zmhassan/WhoTeachsWhat/issues/158#issuecomment-39931484 .

ghost commented 10 years ago

This fix is taking too long. I will do it.

ghost commented 10 years ago

Course is now complete and pushed. FacultyToCourseInSemesterYear and CourseInSemester coming.

ghost commented 10 years ago

Issue resolved.