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

Exception thrown on creation of new assignment #19

Closed
danawortman opened this issue Feb 16, 2020 · 21 comments
Closed

Exception thrown on creation of new assignment #19

danawortman opened this issue Feb 16, 2020 · 21 comments

Comments

@danawortman
Copy link

After installing this plugin, when creating a new assignment in any of my courses, the following error occurred:

Exception - Argument 1 passed to assign::calculate_properties() must be an instance of stdClass, null given, called in [dirroot]/mod/assign/locallib.php on line 1705

Admittedly, I am using the plugin with moodle 3.8, which you have not verified your build for, yet, but most plugins have continued to work and I assume you'll eventually want to get your plugin working on 3.8. I uninstalled this plugin and moodle is working fine again, so it is definitely your plugin's interaction with assignments.

Steps to reproduce:

  • Navigate to a class
  • Enable editing
  • Add an activity or resource
  • Select Assignment
  • Exception is thrown
@cokelalo
Copy link

cokelalo commented Apr 5, 2020

Hello ... did you solve this problem? ... I have had the same problem

@micmaster8
Copy link

Hi, I am also having the same problem. I have the most up to date Moodle installed. Did either of you have any luck in resolving?

@ally199
Copy link

ally199 commented May 18, 2020

Me too. I suddenly encounter the same issue. I need help to resolve this problem. Anyone? please.

@micmaster8
Copy link

I actually think I've resolved this issue:

In site administration>plugins>assignment>feedback plugins>manage assignment feedback plugins - switch off the plugin 'Annotate PDF advanced' by clicking the eye so that it's greyed out.

Screen Shot 2020-05-18 at 13 21 29

@ally199
Copy link

ally199 commented May 18, 2020

It works! Thank you so much!

@davidwitika
Copy link

I actually think I've resolved this issue:

In site administration>plugins>assignment>feedback plugins>manage assignment feedback plugins - switch off the plugin 'Annotate PDF advanced' by clicking the eye so that it's greyed out.

Screen Shot 2020-05-18 at 13 21 29

Thanks this solution worked

@nsgreen749
Copy link

Any feedback on the issue? We need to use the Annotate PDF Advanced, so disabling it does not fix the issue.

@ndunand
Copy link
Collaborator

ndunand commented Sep 1, 2021

@danawortman as Moodle 3.8 is no longer supported (not even for security fixes), I guess that in the mean time you have migrated to a supported version. Is this the case?

@nsgreen749 what Moodle version are you using?

@ndunand
Copy link
Collaborator

ndunand commented Sep 1, 2021

@nsgreen749 if you can reproduce the error, can you please post reproducibility steps and details about:

  • Moodle version
  • the plugin version
  • the full stack trace (complete error message displayed when Moodle is set to display all errors for developers)

@mnasruul
Copy link

mnasruul commented Sep 5, 2021

i have same issue, moodle version 3.8 plugin version 2.4 for Moodle 3.7-3.9 (Build: 2021020501) (2021020501), this error Argument 1 passed to assign::calculate_properties() must be an instance of stdClass, null given, called in [dirroot]/mod/assign/locallib.php on line 1677

@nsgreen749
Copy link

@nsgreen749 if you can reproduce the error, can you please post reproducibility steps and details about:

  • Moodle version
  • the plugin version
  • the full stack trace (complete error message displayed when Moodle is set to display all errors for developers)

I'm using Moodle 3.10 (Build 20201211)
Plugin version is IS 2.4 for Moodle 3.7-3.9 (Build: 2021020501)
Full error message and stack trace:
Exception - Argument 1 passed to assign::calculate_properties() must be an instance of stdClass, null given, called in [dirroot]/mod/assign/locallib.php on line 1705
Error code: generalexceptionmessage
Stack trace:
line 1716 of /mod/assign/locallib.php: TypeError thrown
line 1705 of /mod/assign/locallib.php: call to assign->calculate_properties()
line 371 of /mod/assign/assignmentplugin.php: call to assign->get_instance()
line 434 of /mod/assign/feedback/editpdfplus/locallib.php: call to assign_plugin->get_config()
line 1566 of /mod/assign/locallib.php: call to assign_feedback_editpdfplus->is_enabled()
line 1610 of /mod/assign/locallib.php: call to assign->add_plugin_settings()
line 107 of /mod/assign/mod_form.php: call to assign->add_all_plugin_settings()
line 214 of /lib/formslib.php: call to mod_assign_mod_form->definition()
line 130 of /course/moodleform_mod.php: call to moodleform->__construct()
line 141 of /course/modedit.php: call to moodleform_mod->__construct()

@danawortman
Copy link
Author

@danawortman as Moodle 3.8 is no longer supported (not even for security fixes), I guess that in the mean time you have migrated to a supported version. Is this the case?

@nsgreen749 what Moodle version are you using?

@ndunand Thanks for the follow-up, but I've actually migrated to using my University's LMS, Canvas. There are many things I hate about it, but at least I don't have to manage the backend anymore!

@nsgreen749
Copy link

Any feedback on this?

@paulaflah
Copy link

Is there any resolution for this issue? We want to use the annotate PDF so disabling isn't an option. Information regarding our issue below:

  • Moodle version 3.9

  • 2020061500

  • Exception - Argument 1 passed to assign::calculate_properties() must be an instance of stdClass, null given, called in [dirroot]/mod/assign/locallib.php on line 1705

More information about this error
Debug info:
Error code: generalexceptionmessage
Stack trace:

line 1716 of /mod/assign/locallib.php: TypeError thrown
line 1705 of /mod/assign/locallib.php: call to assign->calculate_properties()
line 371 of /mod/assign/assignmentplugin.php: call to assign->get_instance()
line 434 of /mod/assign/feedback/editpdfplus/locallib.php: call to assign_plugin->get_config()
line 1566 of /mod/assign/locallib.php: call to assign_feedback_editpdfplus->is_enabled()
line 1610 of /mod/assign/locallib.php: call to assign->add_plugin_settings()
line 107 of /mod/assign/mod_form.php: call to assign->add_all_plugin_settings()
line 214 of /lib/formslib.php: call to mod_assign_mod_form->definition()
line 130 of /course/moodleform_mod.php: call to moodleform->__construct()
line 150 of /course/modedit.php: call to moodleform_mod->__construct()

@paulaflah
Copy link

@ndunand please can you advise on the issue we are experiencing with the plugin?

@ndunand
Copy link
Collaborator

ndunand commented Nov 22, 2021

Hello,

We are not experiencing any problems on our side (using the latest version of this plugin, i.e. 2.4 for Moodle 3.7-3.9 (Build: 2021020501)) in Moodle 3.11.

This version of the plugin should work without any issue on all currently supported Moodle versions.

Could you please confirm you are actually on the plugin's latest released version?

@paulaflah
Copy link

Hi thanks so much for getting back. Yes I've just done a fresh install just to check, even though I was sure using the right version, and we are still getting the same error message.

Version we are using: 2.4 for Moodle 3.7-3.9 (Build: 2021020501)2021020501

So I'm confident I'm using the correct version, but it just doenst work. On either our test install or live installation.

The error message:
Exception - Argument 1 passed to assign::calculate_properties() must be an instance of stdClass, null given, called in [dirroot]/mod/assign/locallib.php on line 1705

(debug info in previous comment)

@ndunand
Copy link
Collaborator

ndunand commented Nov 22, 2021

Thanks @paulaflah ,

I've just tried to reinstall a blank Moodle 3.9, and then add only this one extra plugin. I didn't encounter any issue creating the assignment, even logging in as a student to submit a file, and then grading it as a teacher.

I see you're using Moodle version 3.9, in particular release 2020061500 (which means 3.9.0), which is the original 3.9 release without subsequent bug fixes (minor updates to Moodle 3.9), whereas I'm testing on 3.9.8...

Do you have any means of testing this issue on (at lease) Moodle 3.9.8 on your test environment?

@paulaflah
Copy link

Hi again @ndunand thanks for looking into this. So, I've tested on Moodle 3.10.3 (Build: 20210325), Moodle 3.9.8+ (Build: 20210716) and Moodle 3.9.10+ (Build: 20210917) and all of these versions present the same error message.

@paulaflah
Copy link

@ndunand it seems that the issue was arising from the GhostScript fileopath not being correct/present. it is now resolved I had a bit of a dig around and noticed that wasnt quite right. I wonder if this is the same issue @nsgreen749 had as well.. Sorry for bugging you so much. But your help is much appreciated. Thank you also for such a great plugin! We're excited we can now use this again.

@ndunand
Copy link
Collaborator

ndunand commented Nov 22, 2021

@paulaflah , thanks for reporting back here.

I'm glad you could resolve the issue finally, I was really at a loss as to why the plugin would not operate properly.

In any case, I'm closing this issue now, but feel free to reopen if needed.

@ndunand ndunand closed this as completed Nov 22, 2021
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

9 participants