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

Y.one(...) is null #1

Open
fabianp60 opened this issue Jan 22, 2014 · 8 comments
Open

Y.one(...) is null #1

fabianp60 opened this issue Jan 22, 2014 · 8 comments

Comments

@fabianp60
Copy link
Contributor

Hi Andre, I am a student of software engineering and am trying to use your DASIS package blocks, but I am getting an error when I try to configure the learning paths, the problem is I can not create a learning path and believe it is due to a error with the YUI module since Firebug tells me that Y.one(...) is null. Could you give me your help? I am using Moodle 2.1
error-y one

@AndreScherl
Copy link
Owner

Hi Fabian,
could you decribe your problem more precisely?
What exactly is your interaction?
Did you tried it with other browsers?
Cheers, Andre

@fabianp60
Copy link
Contributor Author

Hi Andre I already solve the problem by myself, I was trying to create learning paths logged as a teacher, when I read de access.php file I understand that the teacher can't create learning paths, only admin.

The problem was in the semantic_web.js file when used in the edit_form.php logged as a teacher, the link with id="id_delete_path" was not created because capability of the teacher. And when semantic_web.js try to execute:

Y.one("#id_delete_path").on("click", removeLearningPath);

an error occurs because the object Y.one("#id_delete_path") is null, then I replace that line by:

var deletePathObj = Y.one("#id_delete_path");
if(deletePathObj) {
deletePathObj.on("click", removeLearningPath);
}

delete my browser and Moodle themes cache, login as a teacher again and update the plugin edit page, that works for me.

I apologize for my bad English, I have not much experience writing it

Greetings and thanks for replying

@fabianp60
Copy link
Contributor Author

screen1
screen2

I thought the teacher could not create learning paths because a javascript error, but then I realized that the teacher could not create paths because have no capabilities

@AndreScherl
Copy link
Owner

Hi Fabian,
thanks a lot for your contribution!
Send me a pull request if you want. I will merge your changes into the repository.
Cheers, Andre

@AndreScherl
Copy link
Owner

You can change the capabilities of blocks is their block settings or even in the access.php file.

@fabianp60
Copy link
Contributor Author

I am a begginer using github, I still dont know how to make forks and pulls, I just download your code from Moodle plugins page and modify it using netbeans :(

I can make a pull or modification just using this web? the change implies only one line in semantic_web.js file

@fabianp60
Copy link
Contributor Author

I Just did it!! ... what a nice tool is github

Cheers, Fabian

@AndreScherl
Copy link
Owner

Fine! I'm also new to github to collaborate. But it seems to work fine :-)

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