How to add the course Image URL in REM course

I am trying to create a offline classroom in REM through REM4 API.
following is my code
using (EnrollmentAddon rem = ObjectFactory.CreateAddonSite(url))
using (SPSite osite = new SPSite(url))
using (SPWeb oweb = osite.OpenWeb())
CourseType crstype = CourseType.OfflineClassroom;
ICourseInfo course = rem.CoursesInfo.Create(crstype);
course.Category = new SPFieldLookupValue(1, "category1");
course.Title = "New Test Course";
SPFieldUserValueCollection ovaluecol=new SPFieldUserValueCollection();
ovaluecol.Add(new SPFieldUserValue(oweb,2,"domain\\user"));
course.Teachers = ovaluecol;
course.Published = true;
course.StartDate = DateTime.Now;

course.EndDate = new DateTime(DateTime.Now.Year, 12, 31);
I also need to give Course Image URL , but there is no property to do so.
Can you tell me how can I add the course Image url?



Please find the information below to help you,

ICourseInfo info = GetSomeHow();
                var fieldaccessor = (IEntityFieldAccessor) info;
                var fieldUrlValue = new SPFieldUrlValue();
                fieldUrlValue.Url = "url";
           fieldaccessor.SetValue(CoursesFields.CourseImageUrl, fieldUrlValue);
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.

Powered by Zendesk