I'd like to use the Valence Learning Framework APIs to upload a file into the ePortfolio of another user (identified by D2L UserId). How can I do this?
You can use two routes to import ePortfolio packages into another user's D2L ePortfolio. In both cases, the upload package you use must conform to the format ePortfolio uses when it exports such packages. And, in both cases, the calling user context must have permission to import eP objects for other users.
POST /d2l/api/ep/{ver}/import/new
Available since ePortfolio v3.5.1, this route allows you to import a package to your own ePortfolio, or provide a list of users to receive the import. It provides you back one or more import task IDs you may be able to use to retrieve the status of the import task.
POST /d2l/api/ep/{ver}/import/newwithdetails
Available since ePortfolio v4.2.0, this route allows you to import a package to your own ePortfolio, or provide a list of users to receive the import; it provides you back more details about the started tasks (including the import task ID for status-fetching purposes).
Note. In both these cases, currently the import task belongs to the user receiving the import package, and not solely the calling user. That means that, if you're trying to import a package to another user's ePortfolio, you either must use a calling user context for that user to inquire about the import task's status, or be willing to not have visibility into the import task's status.
Related
I'm using the Graph API to construct a simple Dashboard for Teachers and Students. Everything works well except that when a Student is added they do not get access to the Class Notebook and they don't get a Section Group for them created in the Class Notebook.
Notably, if I open the Class in Microsoft Teams and add or remove anyone from it then all of the users that have been added through the API get access and their section groups created correctly.
This behavior seems to happen both with .Education.Classes["..."].Members and Groups["..."].Members. The Members added this way also don't show up in the Teams "Manage Members" interface but I'm not concerned about that.
I'm using the v1.0 endpoint, and OneDrive and Sharepoint permissions all work as expected.
My question is do I have to do something extra to get the Class Notebook updated with the membership or are there some additional properties that need to be sent when adding a user or is this just a bug?
The Class Notebook doesn't automatically watch the group membership. Rather experiences that add members need to use Class Notebook APIs to do the matching update.
Unfortunately, the Class Notebook APIs aren't yet available directly on the Microsoft graph, so you have to switch over to the OneNote API endpoint (refresh your token with that as the resource) and make the call there.
This is the API you need
I want to build a smart search agent which would use Watson conversation to process the request and give response but will use my own database say SQL server to search the desired output.
In Short Instead of writing intents and dialogues manually or importing from a csv file, I want to write my won code in .net in such a way that all the request and responses are influenced by my own data stored in my database. I only intent to use watson's processing and interpreting capability. But the processing must happen on my data.
E.g If the user searches for a word say "Dog", the Watson conversation service must search in my database and give relevant answers to the user based on the search.
Take a look at the solution architecture in the Watson Conversation documentation. Your database would be one of the depicted backend systems. Your application would be, as you mentioned, written in .NET and would use WCS to process the user input. It would return a response with all the associated metadata. Instead of having complete answers configured in a dialog, you would use something I have described as "replaced markers" in my collection of examples. Those markers are kind of hints to your application of which database query or which action to perform.
Note that WCS requires some intents and entities to work on. If you want to rely just on the detected intents and entities, you could work with one or two generic dialog nodes. As another technique you could use data from your database to generate intents and entities as an initial setup. In my "Mutating EgoBot" I use the Watson Conversation API to add intents and entities on the fly.
I believe you should use the standard trick:
instead of defining resposnses in the node of your diaglog, define an action on the output object of the node and let your applicatation take care of providing response (see https://console.bluemix.net/docs/services/conversation/develop-app.html#building-a-client-application)
I meet a problem when I import data in an ios app.
The data is stored with coredata. I was trying to import the data with a button. After it is clicked, the data, which is firstly stored in a txt file in JSON format will be stored in the sqllite file.
My question is this, it is very slow to import such amount of data and it is not friendly for user to click button or wait to import the initial data. Is there a better way to import data?
Thanks.
It depends. For example you could just import data in – applicationDidFinishLaunching:or when the user touches a specific button.
In both cases I would import data in background. This allows you to avoid UI freeze (if you have a lot amount of data) and to display a sort of progress indicator. Maybe the user could be more happy to know what is going on.
To import data in background, you could just use new iOS 5 API for Core Data or follow Marcus Zarra tutorial on importing-and-displaying-large-data-sets-in-core-data/.
Another way could be to start with a pre-populated db. Create a dummy project where you populate that db (with your JSON file) and then use that db in your real application project.
Hope that helps.
Edit
It is not user friendly to import the data when the app begins.
Why not?
So I was trying to put the data - the db file into the archive and
send it to app store. In this way, I was wondering if I could get the
db file during test, which is finished importing the data and the
initial data is acceptable. And put this test db file in the archive
and publish on appstore. So user do not need to import the data at
first. Just use the copy of the testing data
I'm not sure I got the point here. Here what I mean with preload and import existing data. You need to ship the db file with your app when you submit it to the app store. For example within the application directory. You could ship it also within the bundle. But in this case pay attention since the db file it is read-only (you need to move somewhere elese if you want to modify).
I suggested you to create a dummy project since it's my personal way to do thing when I need to create a prepolutade db. This allows you to maintain cleaner your project. But you can also populated that db in your real project. If you follow the first way you can simply move the sql file in the application directory for your app and say to core data to read that.
I'm working on a service to provide our students and faculty with one single calendar (ICS subscription) of their academic dates (start and end of term & exam periods, class dates and times, exam dates and times, etc). I'm a Ruby and Rails newbie; we're starting to work more with it here so I figured this would be a good learning opportunity. I'm having trouble figuring out how to structure and model (if at all) certain parts of the app.
The app is conceptually pretty basic:
User logs in and a user record is created for them. A UUID is generated and stored on the user's record; it's used to generate their ICS URL (http://myservice.foo/feeds/johndoe_ce4970706f320130588b109add5c7cb0.ics).
When the user requests their ICS file (through the above URL), I need to query a bunch of different systems in order to get information in order to build a calendar:
The Student Information System (SIS) contains the user's schedule (e.g. johndoe is taking ENGL 100 on MWF from 10:30 - 11:20). I need to parse this data and create events.
Our online learning management system, Canvas, provides a calendar of assignments for courses contained inside it. It's accessible as an ICS file, so I need to pull down that file, parse it and include it in the "master" calendar that my app will generate.
Instructors can specify an additional ICS URL for their course so that they can include arbitrary events not provided by either of the two above sources. Like the Canvas calendar, I need to download and parse that ICS.
I have the first part working; I can log in through our single sign-on system (CAS) and a user record is created with a generated UUID. I'm not sure how to handle the second part, though. I don't need to store much permanent data; basically, I only need to keep around the user record (which contains their username, the generated UUID, and some access tokens for the Canvas LMS). The feed will be generated the first time it's requested, cached for some period (and regenerated on-demand when needed).
Where should I be putting the parsing and generating code? I'd like it to be somewhat modular as I expect that we'd be adding other data sources as they crop up. Should I be creating calendar and event models if I'm not actually persisting that data?
No, there is no need to create an empty model for interaction with 3rd party services. I had a similar problem, where I needed to receive data from an external service and wanted it to be modular. One of recommended solutions I found was to create a class (that handles business logic of the interaction with the external service) in the "lib" folder under the root directory of your rails project.
It later can be required in your controller and used to receive date from the third party service. Or if you want it autoloaded, then you can add path to lib directory in your application.rb file under config.autoload_paths setting.
I need to share some sensitive data among activities.
I have two EditText which are basically username and password
I am consuming a webservice which on the base of provided username and password return some user info (DataType:String). Like userid,useremail etc.. which is basically in CSV format
I need these piece of information throughout my application.But i can't figure out which is the better way.
-- One way i could found out so far is to use sqlite with MonoAndroid
-- Other way i found out is using Application class
I just started to learn android today , but i want to know if there are some other ways to share data ?
As you mentioned, a global Application class and the database are two good ways to share application-wide data. One thing to be careful with is that your Application class could be recycled when the app is in the background, so you would lose any data that hasn't been persisted to something more permanent.
In addition to the database, you can also persist data down to the filesystem as well. This recipe from Xamarin has an example of writing directly to a file. Most of the classes you'll need to do file access are found in the System.IO namespace. Mono for Android also supports isolated storage, which provides a higher level API for reading and writing files.
If you simply need to pass data directly between activities, you can do so by adding it as an extra to the intent. This recipe explains how to do that.
If you want to wrap up access to a particular resource in a more managed fashion that can be accessed by either other parts of your application or even external applications, you can look into implementing a content provider. Android itself provides several built-in content providers for resources like contacts and media, if you need an example of what it's like to use one. This recipe explains how to read from the contacts provider.