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

IE Compatibility mode still a problem with SLK v1.8.2 #2

Open
varunmshetty opened this issue Oct 24, 2017 · 4 comments
Open

IE Compatibility mode still a problem with SLK v1.8.2 #2

varunmshetty opened this issue Oct 24, 2017 · 4 comments

Comments

@varunmshetty
Copy link

Hi,

I upgraded my environment to the latest SLK version 1.8.2 yesterday from 1.3.1. However, from my tests I find the IE compatibility mode is still causing me problems. I have to add my site to the compatibility list for the module to load on IE browsers. Is it just me? Am I doing something wrong? If anyone has any inputs, please let me know.

Thanks,
Varun

@rpwillis
Copy link
Owner

I think I did some work around SLK compatibility mode for the 1.8 release but I can't remember what it was. It's not something I've looked at in a while.

@varunmshetty
Copy link
Author

Thanks for your response Richard.

I observe the issue is only with IE 11. IE 10 works well.
On a similar note, we have been using a custom solution wherein we are using the API to create assignments. The implementation is as shown here:

if (learnerAssignmentGuidId == Guid.Empty)
{
AssignmentProperties properties = slkStore.GetNewAssignmentDefaultProperties(SPContext.Current.Web, Location, OrganizationIndex, SlkRole.Learner, out packageWarnings);

AssignmentItemIdentifier assignmentId = slkStore.CreateAssignment(SPContext.Current.Web, Location, OrganizationIndex, SlkRole.Learner, properties);

learnerAssignmentGuidId = slkStore.GetCurrentUserLearnerAssignment(assignmentId);

//start attempt
AttemptItemIdentifier attemptId = slkStore.StartAttemptOnLearnerAssignment(learnerAssignmentGuidId);

executionType = AssignmentView.Execute;
}

However, with v1.8.2, the GetNewAssignmentDefaultProperties() method is no longer available. CreateAssignment() doesn't take 5 arguments.

Do you have any suggestions as to how I can implement this function with the latest binaries?

I have managed to tweak the previous implementation in the following area:

  1. LearningStoreHelper class isn't available. Hence doing an explicit conversion.
  2. Replaced the following:
    a. slkStore.GetCurrentUserId(); with slkStore.CurrentUserId;
    b. slkStore.GetAssignmentProperties(id, SlkRole.Learner); with slkStore.LoadAssignmentProperties(id, SlkRole.Learner);
    c. slkStore.GetCurrentUserLearnerAssignment(id); with slkStore.xGetCurrentUserLearnerAssignment(id);

Please let me know your thoughts.

Thanks,
Varun

@rpwillis
Copy link
Owner

Have a look at AssignmentProperties.aspx.cs to see how it works now. At one point it's doing

AssignmentProperties = AssignmentProperties.CreateNewAssignmentObject(SlkStore, SPWeb, SlkRole.Instructor);
AssignmentProperties.SetLocation(Location, OrgIndex, Request.QueryString["title"]);

@varunmshetty
Copy link
Author

Thanks for the pointer Richard! It worked. This is how my final implementation looks:

=========================
AssignmentProperties properties1 = AssignmentProperties.CreateNewAssignmentObject(slkStore, SPContext.Current.Web, SlkRole.Learner);
properties1.Title = ModuleTitle;
properties1.SetLocation(Location1, OrganizationIndex, ModuleTitle);

AssignmentItemIdentifier assignmentId1 = slkStore.CreateAssignment(properties1);
learnerAssignmentGuidId = slkStore.xGetCurrentUserLearnerAssignment(assignmentId1);

AttemptItemIdentifier attemptId1 = slkStore.StartAttemptOnLearnerAssignment(learnerAssignmentGuidId);
executionType = AssignmentView.Execute;

Still trying to figure out the original issue (need of compatibility view for IE11) as I am still forced to add my website to the compatible list for the modules to render. Any help on this would be greatly appreciated!

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

No branches or pull requests

2 participants