Skip to content

Newaddcomplementarylayout#18

Merged
tekaratzas merged 13 commits intodevfrom
NewAddComplementaryLayout
Jul 26, 2016
Merged

Newaddcomplementarylayout#18
tekaratzas merged 13 commits intodevfrom
NewAddComplementaryLayout

Conversation

@tomaswolfgang
Copy link
Copy Markdown
Collaborator

@tomaswolfgang tomaswolfgang commented Jul 20, 2016

Add course button corresponding to particular semesters
Unified complementary/elective/custom course modals
Fixed drop down menu for Required courses in the initial required placement;
Added a transition/Tutorial modal that appears after placing the last required course in the schedule.
adding semesters include/dont include the add course button depending on whether last required course has been placed.
Users can select courses in Electives menu and Complementary menu and clicking add will add all of them
These added courses update the credit counter and progress bar


This change is Reviewable

Made all complementary courses appear on the same modal with mdl tabs
Adding complementary courses adds to selected semester!
Dynamically adds complementary/elective courses into semester
Courses are removable/buttons work
Reveal modal is centralized with tabs
Some styling for the add-course button -- STILL LOOKS WEIRD
Put both Complementary and Elective courses on the same modal with
different tabs
Corrected issues with removing courses from exemption semester
Animation after all req courses are moved into the schedule -- NOT DONE
-- this will trigger the adding complementary courses tutorial
complementary courses added now appear the correct color
Mini Tutorial appears after adding your last required course! (this will
only happen once because required courses are not removable)
Dynamic add course buttons on all the semesters are added on this
transition.
Adding semesters before transition doesn't have add courses and after
there is add course option
@tekaratzas
Copy link
Copy Markdown
Collaborator

Damn nice job!

Overall the functionality is great. The buttons could use some more styling but thats just a minor detail. The one thing is that you are forgetting to check if complementary[] is set in the flowchart.blade view. hence when a new user registers it throws an error. There are also variables called "class" that are present in the view that don't belong and also throw errors.

var semester = $(target_sem.find("div.sortable")).attr("id");
semester = semester.split(" ");
semester = semester[0] + " " + semester[1];
console.log(semester);
Copy link
Copy Markdown
Collaborator

@tekaratzas tekaratzas Jul 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure you delete all the console.log(). EDIT: nevermind you totally did in the later commit

@tekaratzas
Copy link
Copy Markdown
Collaborator

Ill look into splitting up views. The flowchart.blade is turning into a blob. Ill also try and find a cool style for the button.

@tristanrenondin
Copy link
Copy Markdown
Collaborator

Ill test it out tonight. What i noticed was the UI for new users was confusing, but looks like you added a drop down menu so it's probably better now

@tekaratzas
Copy link
Copy Markdown
Collaborator

Ive been thinking and i feel the add course buttons should be there the entire time. Also, if we have them there the entire time maybe the required courses should be a tab in that modal also? not too sure about that but it think it could use some thought.

What do you guys think about this?

I accidentally had an incorrect variable name!
Also added a check if there exists complementary courses before adding
them
Removed the required section at the very bottom
Added a new required tab to the course modal
ability to add required courses
NOTE: we need to expand how the complementary/elective courses are
parsed (from the SET_TEXT_ENGLISH)
@tekaratzas
Copy link
Copy Markdown
Collaborator

I like this A LOT better, Great job.

-Just small things. We should add a button on exemption semester.
-Place the Add button on the (modal) on top thats way its easier to see
-If a Group has no courses, dont add the tab.

Tristan, give this thing a shot and tell us how you like it.

<div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
<div class="mdl-tabs__tab-bar">
<a href="#complementary_tab" class="mdl-tabs__tab is-active">Complementaries</a>
<a href="#required_tab" class="mdl-tabs__tab is-active">Required</a>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these should be put in a array that is created in the controller and have it iterated in a for loop. It will make it much more dynamic.

<a href="#elective_tab" class="mdl-tabs__tab">Electives</a>
<a href="#custom_tab" class="mdl-tabs__tab">Custom</a>
<a href="#Required_tab" class="mdl-tabs__tab is-active">Required</a>
<a href="#Complementary_tab" class="mdl-tabs__tab">Complementary</a>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use a for loop here also? Something like:

@foreach ($groupsWithCourses as $key=>$value)
@if(count($value) > 0)
{{ $key }}
@endif
@Endforeach

Tab is removed if it is empty
Add button is centered and at the top for ease of access
Add course button added to exemption semester
Re-adds header and course if all courses in a single groups are added
then a single one is removed
<a href="#Elective_tab" class="mdl-tabs__tab">Electives</a>
@foreach($groupsWithCourses as $tabtitle => $Courses)
@if(!is_null($Courses))
@if($tabtitle == 'Complementary')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you do a check and make sure groups with no courses dont get added as a tab? for example, software engineering has to complementary courses (in the new curriculum) but the tab still shows up. Maybe just make the first entry in the array the active one?

@tekaratzas
Copy link
Copy Markdown
Collaborator

Aight almost there. Can you add an "Add Course" button on the exemption semester and put the "add" button on the top of the modal?

tabs now dynamically appear and disappear!
disappear happens if the last course from a tab is added.
appear happens when a course from tab that doesn't exist is removed from
the schedule.
Additionally, I minified some repetitive js code within the add course
listener function.
Specific groups will also appear and disappear in the same manner that
tabs operate with respect to particular groups.
Required courses are now removable
(they appear in a required tab in the modal after being removed)
@tekaratzas
Copy link
Copy Markdown
Collaborator

Alright looks good

@tekaratzas tekaratzas merged commit 2ca8794 into dev Jul 26, 2016
@tomaswolfgang
Copy link
Copy Markdown
Collaborator Author

Registration bug fixed!

@tekaratzas
Copy link
Copy Markdown
Collaborator

Did you commit? And its supposed to be on the other pull request. This one is closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants