Skip to content

Co-Op Submission Page #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 28, 2017
Merged

Co-Op Submission Page #138

merged 6 commits into from
May 28, 2017

Conversation

mbillow
Copy link
Member

@mbillow mbillow commented May 24, 2017

Add a page where user's can report their co-op block. This then properly updates voting counts and attendance for house meeting.

Fixes #80

screen shot 2017-05-24 at 01 43 12

padding-left: 10px;
}

.radio-inline input[type='radio'], .radio input[type='radio'], input[type='radio'] {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not how this should be selected. It also makes the linter unhappy.

I will figure this out later. (or if someone wants to fix it, I am also fine with that)

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed 👍

logger = structlog.get_logger()

@co_op_bp.route('/co_op/')
def display_conditionals():
Copy link
Member

Choose a reason for hiding this comment

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

change name

Copy link
Member Author

Choose a reason for hiding this comment

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

I totally didn't copy and paste that... 😜 haha



@co_op_bp.route('/co_op/submit', methods=['POST'])
def submit_major_project():
Copy link
Member

Choose a reason for hiding this comment

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

change name

@mbillow mbillow force-pushed the co-op branch 2 times, most recently from 6faf36d to 3028102 Compare May 24, 2017 05:57
voting_list = [uid for uid in [member.uid for member in ldap_get_active_members()]
if uid not in [member.uid for member in ldap_get_intro_members()]]
if uid not in [member.uid for member in ldap_get_intro_members()] and
uid not in [member.uid for member in CurrentCoops.query.filter(
Copy link
Member

Choose a reason for hiding this comment

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

I think this would be a good place for us to use a filter and a lambda function.

Something where we get the relevant lists before and then just do a quick comparator seems more elegant.

db.session.commit()

return jsonify({"success": True}), 200

Copy link
Member

Choose a reason for hiding this comment

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

EOF!

Copy link
Member Author

Choose a reason for hiding this comment

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

Huh?

Copy link
Member

Choose a reason for hiding this comment

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

Github is reporting no newline at the end of the file.

Copy link
Member Author

@mbillow mbillow May 24, 2017

Choose a reason for hiding this comment

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

Line 55 looks a lot like a newline to me. Also it passed that portion of the linter.

Copy link
Member

Choose a reason for hiding this comment

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

It's because you have trailing whitespace there. So it's not just a '\n'

Copy link
Member Author

Choose a reason for hiding this comment

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

The amount of effort I just put into convincing my IDE that there was whitespace there was a little asinine. Should be all good now.

<input type="submit" role="button" class="btn btn-raised btn-primary" style="width:100%;" value="Submit Form"/>
</form>
{% else %}
<p class="align-center">Thanks for submitting this form. Good luck on your {{on_coop.semester}} co-op!</p>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Plans change; we should allow people to change their co-op report (up to a certain cutoff perhaps? would be a simple date comparison)

Copy link
Member Author

Choose a reason for hiding this comment

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

I am fine with changing it up to a certain point. What I was trying to avoid with this was people having the ability to go on hour long "co-ops" during house meetings.

I will spend some time (probably later today) fleshing out the best way to do this. If you have ideas, feel free to pass them on.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, yep, that's definitely a valid concern. In that case we could define self-service windows that would only allow changes outside of when school is in session.

Copy link
Member Author

Choose a reason for hiding this comment

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

The more that I think about it, the more I am in favor of keeping it like it is. We can add a table to member management for listing who is on co-op and the evals director can just clear it if a mistake was made.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added better language to point those whose need to change their submission towards the Evals Director.

CurrentCoops.date_created > start_of_year(),
CurrentCoops.semester == semester).all())

voting_list = list(active_members - intro_members - on_coop)
Copy link
Member

Choose a reason for hiding this comment

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

Huh I didn't realize you could do that with lists in python, weird.

@mbillow
Copy link
Member Author

mbillow commented May 28, 2017

screen capture on 2017-05-27 at 22-15-16
Co-op submissions can now be deleted by the evals director. @stevenmirabito I think this should take care of any plans that might change or accidents.

Copy link
Member

@liam-middlebrook liam-middlebrook left a comment

Choose a reason for hiding this comment

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

lgtm

@mbillow mbillow merged commit 894cb9e into ComputerScienceHouse:develop May 28, 2017
@mbillow mbillow deleted the co-op branch May 28, 2017 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants