Download presentation
Presentation is loading. Please wait.
Published byMerilyn Cross Modified over 8 years ago
2
David Hietpas Library Web Developer University of Wisconsin - Polk Library
3
Ted Mulvey Information Literacy Librarian University of Wisconsin - Polk Library
4
ANVIL General Understanding Integration into D2L through Valence Samples and examples None Technical Technical Geek Level
5
ANVIL… “huh???” Active iNstructional Videos for Information Literacy External learning and assessment application disguised as “Bar Trivia” Leaderboards Game play Fun themes
6
USP – Universities Study Program Required learning outcomes uwosh.edu/usp Research Instruction & Information Literacy Learning through repetition and competition. Learning through a fun, game environment
7
Quick Demo
8
“it was helpful” “this was more helpful too” “By the way, I LOVE ANVIL” “This is great!” “This is awesome! Nice work.” "Very cool game, by the way. I can see (having had some fun with it myself), that this is very valuable [early] in the research process." “That was fun” “It was resourceful”
9
This happened this week! Player Nated32 played game over 50 times to be #1 on all the leaderboards The next day, another player beat Nated32 Nated32 replayed the game, past midnight, for a total of 137 times played to regain the #1 spot Nated32 approached our librarian Ted Mulvey and told him how “he owned that game” and how he was “upset when someone beat him”
10
Currently used in 44 courses! Some courses not even USP! In some courses this is 10% of the total grade! Feedback has only been positive Leaderboard Pro’s Completed questions each question in 2 seconds! Played dozens of times, learning through repetition! First Semester Success
11
Lets move into the technical ANVIL is built on the Pyramid framework Python language Our campus web presence is python ▪ Plone CMS
12
ANVIL Python 2.7 Valence Client SDK Only Python 3.* I made the Valence Client SDK backwards compatible with python 2.7 Packaged the client code back up
13
Read the Valence documentation Apply for API Key http://docs.valence.desire2learn.com/index.html http://docs.valence.desire2learn.com/index.html Have your D2L administrator setup a sandbox course for you to work in with test users Don’t do anything live with real users Have a local environment ready to go with your Valence SDK Client
14
Understand RESTful Representational State Transfer Learn from the Sample Code which comes with the Valence Client SDK You MUST read this… http://docs.valence.desire2learn.com/basic/auth.html http://docs.valence.desire2learn.com/basic/auth.html (The following slide picture is from the link above.)
16
What Valence API components are we using? Authentication (AppContext, UserContext) WhoAmI (UserContext) Enrollment (UserContext) Dropbox (UserContext, OrgUnit) Dropbox Files (UserContext, OrgUnit)
17
Authentication Creating App Context Retrieving User Context In My Opinion “Hardest Part” Lots of requests and redirects with D2L Lets walk through it!
18
App Context Requires Application ID and Key Provide ID and Key to AppContext Creator in your SDK Will create your AppContext Object Again… http://docs.valence.desire2learn.com/basic/auth.html http://docs.valence.desire2learn.com/basic/auth.html
19
Python AppContext Example def get_app_context(self): global app_context if app_context == None: app_context = d2lauth.fashion_app_context(app_id=D2L_ID, app_key=D2L_KEY) return app_context def get_app_context(self): global app_context if app_context == None: app_context = d2lauth.fashion_app_context(app_id=D2L_ID, app_key=D2L_KEY) return app_context
20
User Context Requires AppContext Object Also requires ▪ Redirection URL ▪ D2L Host Again… http://docs.valence.desire2learn.com/basic/auth.html http://docs.valence.desire2learn.com/basic/auth.html
21
Python UserContext Example def get_user_context(self): url = self.request.url # your current url try: if not self.check_auth_tokens(): return Redirect(self.get_app_context().create_url_for_authentication(d2l_domain, url)) return self.get_app_context().create_user_context(result_uri=url, host=d2l_domain, encrypt_requests=True) except Exception as e: return HTTPForbidden() def get_user_context(self): url = self.request.url # your current url try: if not self.check_auth_tokens(): return Redirect(self.get_app_context().create_url_for_authentication(d2l_domain, url)) return self.get_app_context().create_user_context(result_uri=url, host=d2l_domain, encrypt_requests=True) except Exception as e: return HTTPForbidden() Go to D2L Return response here
22
Ready to make API request def authenticated_d2l_user(self): user_context = self.get_user_context() if not isinstance(user_context, d2lauth.D2LUserContext): return user_context # Below do any Valence API Calls with your User Context whoami = d2lservice.get_whoami(user_context) def authenticated_d2l_user(self): user_context = self.get_user_context() if not isinstance(user_context, d2lauth.D2LUserContext): return user_context # Below do any Valence API Calls with your User Context whoami = d2lservice.get_whoami(user_context) Type Introspection
23
Ready to make API request def authenticated_d2l_user_enrollment(self): user_context = self.my_get_user_context() if not isinstance(user_context, d2lauth.D2LUserContext): return user_context # Below do any Valence API Calls with your User Context courses = d2lservice.get_my_enrollments(user_context) def authenticated_d2l_user_enrollment(self): user_context = self.my_get_user_context() if not isinstance(user_context, d2lauth.D2LUserContext): return user_context # Below do any Valence API Calls with your User Context courses = d2lservice.get_my_enrollments(user_context) Type Introspection
24
App Context Permanently kept around User Context Created and contained within the scope of function and destroyed once function call completes No information is logged
25
Setup App Context Request from D2L the current users authorization D2L verifies and returns Auth Tokens Request from D2l the User Context D2l returns User Context With the User Context you can now make API requests API Requests Finished, User Context Destroyed Overview
26
Limitations in API Give me everything or nothing ▪ e.g. user information ▪ Services are not fine grained Not everything is available yet ▪ e.g. Creating new Dropbox folders ▪ Lots more… Role restrictions ▪ “Even as a power user, I wasn’t able to do certain things”
27
Python SDK does a lot of the work for me The PHP SDK seems more complex Seems to require lots of CURL Seems to require more url redirections
28
Authentication http://docs.valence.desire2learn.com/basic/auth.html http://docs.valence.desire2learn.com/basic/auth.html API Index http://docs.valence.desire2learn.com/genindex.html http://docs.valence.desire2learn.com/genindex.html Stackoverflow D2L http://stackoverflow.com/questions/tagged/desire2learn http://stackoverflow.com/questions/tagged/desire2learn Clients SDK Sample Code http://docs.valence.desire2learn.com/clients/index.html http://docs.valence.desire2learn.com/clients/index.html
29
Goal to Open Source the product ANVIL Capabilities All content is created through-the-web Export/Import trivia content Easy theming and changing themes Goal: Community of sharable educational content ▪ Information Literacy Package is available Coming Soon: Assessment and Report Generation
30
Feel free and try out the demo site http://www.uwosh.edu/library/anvil/demo http://www.uwosh.edu/library/anvil/demo D2L integration has been removed due to it being publicly accessible We want YOUR opinion on the following: Do you want it open sourced? What services would you want us to provide?
31
David Hietpas University of Wisconsin - Polk Library hietpasd@uwosh.edu SLIDES @ http://www.uwosh.edu/library/lts/presentation-slides/d2l-ignite-2013http://www.uwosh.edu/library/lts/presentation-slides/d2l-ignite-2013 ICONS @ https://www.iconfinder.com (Only free used)https://www.iconfinder.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.