Installation

Unable to access old courses after upgrading to 2.18

Unable to access old courses after upgrading to 2.18

by Aakash Jayavel -
Number of replies: 5

After upgrading webwork to 2.18 whenever i try to access any existing course im encountering this error


Error messages

Can't locate object method "unparsed_uri" via package "WeBWorK::ContentGenerator::ProblemSets" at /opt/webwork/pg/lib/WeBWorK/Authen/CAS.pm line 118.

Context

  • 113: 		#my $cas_certs = $ce->{authen}{cas_options}{certs};
  • 114: 		#my $cas = new AuthCAS(casUrl => $cas_url,
  • 115: 		#    CAFile => $cas_certs);
  • 116: 		my $cas = new AuthCAS(%{ $ce->{authen}{cas_options}{AuthCAS_opts} });
  • 117: 
  • 118: 		my $service = $c->unparsed_uri();
  • 119: 		# Remove the "ticket=..." parameter that the CAS server added
  • 120: 		# (Not sure if the second test is really needed.)
  • 121: 		$service =~ s/[?&]ticket=[^&]*$//
  • 122: 			or $service =~ s/([?&])ticket=[^&]*&/$1/;
  • 123: 		$service = $ce->{server_root_url} . $service;

Am i missing any files?
In reply to Aakash Jayavel

Re: Unable to access old courses after upgrading to 2.18

by Glenn Rice -

The CAS.pm module is not tested, and is not known to work with webwork 2.18.  The unparsed_uri method is a mod_perl method that needs to be converted to a Mojolicious::Controller method.  If someone could update that module, that would be great.

In reply to Glenn Rice

Re: Unable to access old courses after upgrading to 2.18

by Glenn Rice -

I have submitted a pull request that may fix the CAS.pm module.  It is https://github.com/openwebwork/webwork2/pull/2144.  If you could test that pull request that would be appreciated.  If you need help checking out the pull request to test, let me know.  The only difference between the webwork 2.18 release (the main branch) and the pull request is the fix for this.  So all you need to do is check out the pull request branch and restart the webwork2 app to test it.

In reply to Glenn Rice

Re: Unable to access old courses after upgrading to 2.18

by Aakash Jayavel -

Yes that resolves that issue.

But then i was unable to access admin course which then i resolved it from db. 

While then trying to upgrade the courses from admin course the service ticket fails to validate

and also encountering this warning in that page

  • Use of uninitialized value in hash element at template ContentGenerator/Login.html.ep line 12.

In reply to Aakash Jayavel

Re: Unable to access old courses after upgrading to 2.18

by Glenn Rice -
Did you get an error like the one you showed from the Login.html.ep file with webwork 2.17?  It would have been from a different file (Login.pm instead), but I suspect you would get the same error with CAS authentication.  Paul Vojta wrote the CAS authentication module, and most likely he will need to update it. These obscure authentication modules that can only survive if the original authors continue to provide support for them, or if someone else steps in to take care of it that has access to these types of systems.
In reply to Aakash Jayavel

Re: Unable to access old courses after upgrading to 2.18

by Glenn Rice -

I don't know what you mean about the service ticket failing to validate when you try to upgrade courses from the admin course.  There should be no service ticket when you are upgrading courses.

To fix the warning that you are getting about the use of an uninitialized hash element, you will need to set the variables $LTIVersion (probably set this to 'v1p1') and $LTI{v1p1}{LMS_name} (set this to something that make sense -- I don't know what that would be though).  Those would usually be set in authen_LTI.conf and authen_LTI_1_1.conf.  However, I don't think you are using LTI authentication, so probably add and set those in authen_CAS.conf.