Canvas Lms Api Get Student Schedule - canvas-lms

How can I retrieve a student schedule from the api. Info im looking for... student xyz, course id, day, time of class, days - M/W/F, instructor id, etc... what is the correct endpoint for this?

Related

ActiveRecord: Select a record only if it has expired and a new one isn't available

Currently, I'm working on a Signup model with ActiveRecord which has the following attributes:
issue_date
expiration_date
signup_status
student_id
And what I'm trying to achieve is to show 1 signup per student (another model: a student has many signups) only if the latest student's signup has expired and a new one isn't available.
To make things a little bit clearer, let's say I have 2 signups from two different students issued on September 23rd, 2014 and are now expired. And today I decided to generate a new issue for one of the students, so now we have one Student with an active Signup and another one with an expired Signup. The Student with the active Signup should be filtered and should not show up, while the Student with the expired Signup should appear as long as a new Signup isn't generated for him.
The closest I've got to achieve my goal was with the following AR query with no success:
#expired_signups = Signup.where(
signup_status: 'Expired signup').group(:student_id).having(
"MAX(expiration_date) >= #{Date.today}").order(student_id: :desc)
The query shows up the latest expired signup regardless of whether the Student has an active Signup or not.
Any help would be greatly appreciated, thanks!

MySQL - Attendance model for Sports team

I tried to search for answer for over a day, but with no staisfying results.
I would like to build site to track attendace of our players on trainings and matches. All attendance systems I found so far were pretty simple - usually two tables (students, attendance). But I think that I need more complex solution for my project.
Here are some hints:
We have trainings on many schools. At each school there is many training lessons during week.
Each training lesson is for one team, but the team has more than 1 training lesson during week and usualy has them on different schools.
Each team has players and players can be part of multiple teams.
Player can attend just some training lessons - for example for team1 - MondayTraining, TuesdayTraining but not FridayTraining and for team2 just ThursdayTraining.
Attendance will manage coaches. One coach can have more than 1 team.
The main goal is to have website where Coach can see in calendar his trainings for that day and when he click the link in calendar new page with list of players who should be attending on this lesson will be opened - ideally with checkboxes or radio buttons for tracking attendance.
EDIT: here is my basic model, but I know its horrible
my try on model
Hope someone can help me with database model.
Thanks for your answers.

Database Design for Games Attended

I go to a lot of sports games, mostly hockey. I have been tracking the games via an excel sheet and even at one point a simple database table. I am trying to build this a little better and eventually create a web interface. But I also want to be able to run various queries.
I don't care about player goals, ice-time, sog or any of those stats - merely just teams playing, score and date with a section for notes. (eg, Hat trick, 500th game for player)
So what I had was:
(id, home_team, home_score, away_team, away_score, jersey = [home,away,alt], date, notes, timestamp)
I have thought of other ways to normalize it but I don't want to over complicate it and trying to query has been a nightmare.
I had a three table design in mind:
Team
(team_id, city, state, nickname)
League
(league_id, league_name, conference, division)
Venue
(venue_id, venue_name, venue_city, venue_state, venue_zip, venue_address, venue_capacity)
Venue table and even league table seem unnecessary for the most part but I was thinking of different types of queries.
Then I would create some views or a games table that would pull in the necessary fields.
Queries I had in mind to execute:
Games attended that the home team won
How many times my team has played whatever team and overall record
Games won/lost wearing alternate jersey, home jersey, away jersey
Venues visited and record when visiting
Games attended where there has been a significant event. (Hat trick, record)
Overall record of games attended in x year, all time.
Playoff game record, preseason game record, regular season record (I was thinking I could notate game type in notes or create a field for type and do (playoff, preseason, regular)
Any advice would be appreciated, its not that I do not know how to build the database, it is that I do not know how to build it right and without stressing over the entire website I want to build from it.
Eventually I would like to expand it to other sporting events (football, baseball, basketball, etc..) but before getting too far ahead of myself I would like to get the hockey one running.
Thanks in advance

MySQL Database table

I really need some help. I have this project and confused how to build its database
I have this general messaging.
students have year and section
I need to send a message in different types
Send to all students
Send to all students who wants to receive daily update
Send to students who are belong in specified years
Send to students who are belong in that year who wants to receive daily update
Send to students who's belong to sections
Send to students who's belong to sections and who wants to receive daily update
Send to students who's year is and section is
Send to specific students
some features
Resend notification to new students
Time of notification to end sending
now here is my structure of database
message_queue
id
type
message
isWantToReceive
date_added
type field value is json string
i save it something like this
sample value
id type Message isWantToReceive date_added
1 a:1:{s:3:"all";a:0:{}} Hi welcome! 0 2009-12-2
2 a:1:{s:6:"others";a:5:{s:7:"year";a:1:{i:0;s:11:"1";}s:10:"section";a:1:{i:0;s:7:"1";}}} Hi welcome! 0 2009-12-2
then i have a cron job sender that will query it and send message depending on the type.
My problem is when querying all the notification that been send like
get all notification that been send to year 2 or year 1 section 1
since my type field is a json. Can you help me restructure my database design on how my features work.
Well, in addition to your message_queue table you should have a table as follows:
student
id
year
section
wantsDailyUpdates
This table will allow you to keep track of all the students and which year and section they're in. As well as whether or not they want to receive daily updates.

Database design a simple database for a functional school

So i am having a little trouble in coming up with the entity-relationships for my database however i have some of the design process done be that of minimum caliber. The database will be created so that students can have many courses many to many relationship (obvious i know). The database will need to keep track of homework and attendence daily. However, classes can be just one day of the week or many days.
advisors->(advisorid, firstname, lastname, phone , email)
students->(studentid,firstname, lastname, phone, email)
courses->(courseid, description, startdate, statetime, room)
studentscourses->(studentid, courseid)
Here i am stuck, i am thinking of creating a calendar table, but how will i correlate the data to the homework table and with attendance. If any suggestions that would be great criticism is welcome.
You need to create some more entities to achieve an efficient database design. One solution would be:
Attendance(id,student_id,course_id,date)
Homework(id, course_offering_id, date) -- course_offering_id: primary key of student courses
-- since many to many relation lies between homework and student
Homework_Student(id, homework_id, student_id)
U can expand the studentscourses table to add more columns like
Studentcourses->(studentid,courseid,attendence(bool),datetime,homework(text),previoushomework(bool))
attendence will be true if the student is present on that particular date and time at which the course is scheduled.
datetime-> the date and time of the course
homework-> this shows the homework that student gets
previoushomework-> this will be true when the student has completed the homework given the previous time
This is the simplest and most compact table design u can have with this project and you can also make other relational tables according to your needs
Hope that might solve your problem