Skip to content
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

Added Per-Participant Page | Participants Page Revamp #416

Merged
merged 15 commits into from
Aug 11, 2014

Conversation

liam-middlebrook
Copy link
Contributor

Participant Page

Now each participant has their own page that is generated from data within their .yaml file. The url format for each page is /blogs/<year>/<term>/<username> so for example /blogs/2014/spring/loothelion would be my participant page.

Participants Listing Page

  • Lists current term's participants
    Important: This means that yaml files should no longer be added to /scripts/people but rather /scripts/people/<year>/<term>. For example a student who is taking HFOSS fall of 2014 would place their YAML file in the following directory /scripts/people/2014/fall.
  • Now has support to show participants by year
    You can access all of the participants from a certain year with the following format /blogs/<year>. So if you wanted to get a list of all the students who took HFOSS in 2013 you would use the /blogs/2013 filepath
  • Now has support to show participants by year and term
    You can access all of the participants from a certain year with the following format /blogs/<year>/<term>. So if you wanted to get a list of all the students who took HFOSS in Spring 2013 you would use the /blogs/2013/spring filepath
  • Can now show all participants ever in the course
    You can access all of the participants with the following format /blogs/all.

This should cover issues #412 and #414

@liam-middlebrook
Copy link
Contributor Author

Here's a few screenshots of what this looks like in-action:
http://imgur.com/a/YCGqJ

@ryansb
Copy link
Collaborator

ryansb commented Aug 11, 2014

This is solid, but I'd really like to see the "participants" endpoints and related functions moved into its own file (possibly participants.py) and have those endpoints served under a blueprint like the homework + lectures.

@liam-middlebrook
Copy link
Contributor Author

You'll notice in participants.py that I had to do an import hflossk this was because the participants function needs to know when the course starts. I tried moving things around to avoid the circular include but after about 20 minutes I just went with the easy way out.

@ryansb
Copy link
Collaborator

ryansb commented Aug 11, 2014

The way you have it set up now I get a ton of 500's loading /blogs/2013, but with this patch that stops happening.

diff --git a/hflossk/templates/blogs.mak b/hflossk/templates/blogs.mak
index 4b824e5..c7ae425 100644
--- a/hflossk/templates/blogs.mak
+++ b/hflossk/templates/blogs.mak
@@ -49,7 +49,7 @@
 <div class="row">
   %for student in student_data:
     <div class="col-sm-4">
-      <div class="student shadowcard padded" data-student=${student['yaml']}>
+      <div class="student shadowcard padded" data-student=${"../blogs/" + student['participant_page']}>
         <div>
           <img class="uglymug pull-left" src="${gravatar(student['rit_dce'] + '@rit.edu')}" alt="${student['irc']}'s Avatar" />
           <h4 class="item"><a href="${student['participant_page']}">${student['irc']}</a></h4>

@ryansb
Copy link
Collaborator

ryansb commented Aug 11, 2014

@ryansb
Copy link
Collaborator

ryansb commented Aug 11, 2014

Looks good to me. 👍

@decause
Copy link
Owner

decause commented Aug 11, 2014

@liam-middlebrook and @ryansb

Excellent Work. Merging into Develop.

:shipit:

decause added a commit that referenced this pull request Aug 11, 2014
Added Per-Participant Page | Participants Page Revamp
@decause decause merged commit 01ade3b into decause:develop Aug 11, 2014
@decause
Copy link
Owner

decause commented Aug 11, 2014

After testing this out (which is awesome) I've got an observation: between fall/spring .yaml files had differing keys. This shows more red than is necessary when looking at legacy, and does not link to the stuff that students did infact post. Perhaps we can either:

  • Adjust the older .yaml keys to match the current keys identified in the template
  • Create a template for each year/view (not optimlal, but clean-ish)
  • Have a "legacy" template that doesn't do the red-texting, but just shows every .yaml entry.

Just my $0.02

Thoughts @liam-middlebrook / @ryansb ?

@liam-middlebrook
Copy link
Contributor Author

If you adjust the YAML keys then if you ever decide to add new assignments then old participants would have red lines.

I like the idea of a legacy template. The only thing is that there are certain YAML entries (due to my participant page) that we would have to ignore.

Potentially (this is a little less clean) we could have a YAML dictionary for assignments. That way you would access assignments in the following format. student['hw']['litreview1'] If we were to go this route here could be an example YAML file

- blog: http://gearchicken.com/wordpress/
  feed: http://gearchicken.com/wordpress/?feed=rss
  forges:
    - http://github.com/liam-middlebrook
    - http://bitbucket.org/liam-middlebrook
  irc: loothelion
  name: Liam Middlebrook
  rit_dce: ljm2906
  hw:
    litreview1: http://gearchicken.com/wordpress/?p=17
    quiz1: http://gearchicken.com/wordpress/?p=20
    bugfix: http://gearchicken.com/wordpress/?p=33
    teamprop1: http://gearchicken.com/wordpress/?p=47
    commarchreport: http://gearchicken.com/wordpress/?p=57
    commarchpreso: http://gearchicken.com/commarch_hfoss.pdf #Displays incorrectly in FireFox for GNU/Linux
    curriculum: http://gearchicken.com/wordpress/?p=71
    teamprop2: http://gearchicken.com/wordpress/?p-76 # Isn't this covered in the projprop?
    litreview2: http://gearchicken.com/wordpress/?p=98
    quiz2: http://gearchicken.com/wordpress/?p=101
  bio: |
    This is a long string of text
    that I'm using as my personal biography on
    the RIT HFOSS site
  github: liam-middlebrook
  twitter: liammiddlebrook
  coderwall: liam-middlebrook

This would allow for you to just list out everything (in legacy mode) that is under the hw section of the YAML.

@ryansb
Copy link
Collaborator

ryansb commented Aug 12, 2014

See #418

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