Closed evgeny-s closed 8 years ago
Hi Evgeny,
I had left a reference to a new feature in the LTI2_tc_sample_app and LTI2_tp_sample_app.
So:
and try again.
John
On May 8, 2015, at 3:44 AM, Evgeny notifications@github.com<mailto:notifications@github.com> wrote:
Hello, I'm new in RoR. I'm using ruby vertion 2.1.4 Could you please say what I'm doing wrong:
I cloned TC example to folder, then ran: gem install bundler For each application I ran: bundle install rake init_task:backup
First problem - when I'm trying to login - there is no data in DB. So I import test data from the file in TC application: data\lti2_tc_mysql_init.sql
Ok, I logged in. But when I trying new tool. I enter http://localhost:5000/lti2_tp/registrations, then click submit button, and then error: undefined method `tc_oauth_half_secret=' for #Lti2Tp::Registration:0x0000000773bdb8
Any ideas?
— Reply to this email directly or view it on GitHubhttps://github.com/vitalsource/LTI2-Reference/issues/6.
Hello, thank you for your support. I think you have some issues in your docs:
So, after bundling each of applications (TC and TP), I running command, shown in paragraph 3 in section "Getting it running" of the LTI-Reference documentation.
rake init_task:backup
I have empty databases, and there is a notification : "run migrations..."
After this I run migrations and try again:
rake init_task:backup
Then I'm going to 'http://localhost:4000/admin' and trying to authenticate, but no user found, because table 'admin_users' is empty.
Could you please put some test data and write how correctly inject it to database. <----------------->
I found .sql file in data folder: lti2_tc_mysql_init.sql.
But table name is not correct here, so I can't test applications. <-----------------> So I corrected table name and tried to enter application. And I logged in. When I'm tryied to enter URL: http://localhost:5000/lti2_tp/registrations - On next form field "Institution name" is empty. When I enter institution name 1113 - it redirected me to TC admin Tools action page with 404 Not Found Error. <-----------------> I'm already wrote that I'm new in RoR. Sorry for maybe obvious questions. Could you please check and start installation with empty folder and empty database to make sure that all docs are correct.
Thank you very much.
Hi Evgeny,
The problems here are mostly not yours. Last week we did a radical reorganization of the gem and broke it into three repos. We’ve needed to do this for a couple of different projects. Apparently the scripting that created the sample data broke with the reorg.
I’ve done a quick adjustment of the script and it looks like it’s working. So I can give you two alternatives. Either
LTI2_tc_sample_app/data/lti2_tc_mysql_init.sql for the ToolConsumer database
LTI2_tp_sample_app/data/lti2_tp_mysql_init.sql for the ToolProvider database
run rake init_task:backup in BOTH the TC and TP directories.
This worked for me. I didn’t however do it to an empty state because I didn’t want to destabilize anything in my MySQL installation.
Once you’ve done with this the DBs should be fully recovered in a migrated state.
Remember that if you’re running MySQL you need to explicitly start as:
rails s -p 4000 -e mysql -P tmp/pids/server4000.pid
and
rails s -p 5000 -e mysql -P tmp/pids/server5000.pid
Otherwise it defaults to sqlite3
Hope this does it for you.
John
On May 11, 2015, at 4:09 AM, Evgeny notifications@github.com<mailto:notifications@github.com> wrote:
Hello, thank you for your support. I think you have some issues in your docs:
So, after bundling each of applications (TC and TP), I running command, shown in paragraph 3 in section "Getting it running" of the LTI-Reference documentation. rake init_task:backup
I have empty databases, and there is a notification : "run migrations..." After this I run migrations and try again: rake init_task:backup
Then I'm going to 'http://localhost:4000/admin' and trying to authenticate, but no user found, because table 'admin_users' is empty.
Could you please put some test data and write how correctly inject it to database.
I found .sql file in data folder: lti2_tc_mysql_init.sql.
But table name is not correct here, so I can't test applications. So I corrected table name and tried to enter application. And I logged in. When I'm tryied to enter URL: http://localhost:5000/lti2_tp/registrations - On next form field "Institution name" is empty. When I enter institution name 1113 - it redirected me to TC admin Tools action page with 404 Not Found Error.
I'm already wrote that I'm new in RoR. Sorry for maybe obvious questions. Could you please check and start installation with empty folder and empty database to make sure that all docs are correct.
Thank you very much.
— Reply to this email directly or view it on GitHubhttps://github.com/vitalsource/LTI2-Reference/issues/6#issuecomment-100870361.
Hello, John. Thanks for your answers.
So I pulled this repos again and dumped files into database.
So now it's another problem.
When I'm trying to register new tool, I enter:
http://localhost:5000/lti2_tp/registrations
and then submit form, and there is error occurred:
console says: Completed 500 Internal Server Error in 120005ms
in browser: Net::OpenTimeout at /registrations execution expired
And process stopped on link:
http://localhost:5000/lti2_tp/registrations
Any ideas?
Thank you.
Hello again. I think I solved last problem. So in TC in table lti2_tc_registries it was record tc_deployment_url with wrong URL. I changed it to http://localhost:4000 and in TP in table lti2_tp_registries it was record tp_deployment_url with wrong URL. I changed it to http://localhost:5000. And it works for me.
Thank you.
Glad you found that problem. This should be more clearly documented and the database backup script should probably always back it up as localhost.
The reason it’s a stored value at all has to do with some test scenarios when running within a firewall. These values are passed to the alternate partner and if the session is running on separate boxes the outside-the-firewall name is needed.
In the meantime I’ll make a note in the docs right now.
John
On May 12, 2015, at 2:43 AM, Evgeny notifications@github.com<mailto:notifications@github.com> wrote:
Hello again. I think I solved last problem. So in TC in table lti2_tc_registries it was record tc_deployment_url with wrong URL. I changed it to http://localhost:4000 and in TP in table lti2_tp_registries it was record tp_deployment_url with wrong URL. I changed it to http://localhost:5000. And it works for me.
Thank you.
— Reply to this email directly or view it on GitHubhttps://github.com/vitalsource/LTI2-Reference/issues/6#issuecomment-101215370.
Hello again. Found some issues.
When I'm trying to see this link:
http://localhost:5000/iresources
I enter 0.65 value for example and an error occurs:
Couldn't find Tenant without an ID
Another one issue. When I choosing any link a new window appears and button "Return to Admin" is not working. So there is error occurs when I click on it:
No route matches [GET] "/admin/launches"
I suppose last issue because of reorganization.
Thank you!
Hi Evgeny,
I’m not seeing these errors. I can only guess there’s something different about the database configs or launches.
First let me be sure that you’re starting the TC and TP with something like the following:
rails s -p 4000 -e mysql -P tmp/pids/server4000.pid rails s -p 5000 -e mysql -P tmp/pids/server5000.pid
The -e ensures that you’re looking at Mysql. The -P isn’t essential but in certain debugging scenarios is useful.
The missing tenant is a symptom that the tenant table has been changed after registration. You might want to re-seed the database for both TP and TC
RAILS_ENV=mysql bundle exec rake db:seed
Then register again and repeat everything.
What timezone are you in? In a pinch we need to find a common time and I can screenshare over google+ or some web conf thing I have.
I also might want to look at a few tables in your database.
John
On May 12, 2015, at 7:46 AM, Evgeny notifications@github.com<mailto:notifications@github.com> wrote:
Hell again. Found some issues. When I'm trying to see this link: http://localhost:5000/iresources I enter 0.65 value for example and an error occurs: Couldn't find Tenant without an ID
Another one issue. When I choosing any link a new window appears and button "Return to Admin" is not working. So there is error occurs when I click on it: No route matches [GET] "/admin/launches"
I suppose last issue because of reorganization.
Thank you!
— Reply to this email directly or view it on GitHubhttps://github.com/vitalsource/LTI2-Reference/issues/6#issuecomment-101306047.
Hello, John. I think it works. Problem was in launch parameters for TC and TP. So I tried to launch with parameters you wrote in last message and it works fine. I thought, that my database "mysql" by default, but I was wrong.
My timezone is MSK (Moscow Standard Time), offset: +03:00 hours. We can to do something like skype call. My skype is: e.svirsky. <---------------------> One more question for you: Did you do any application for Common Cartridge supporting for this tools? Or maybe you can give some advice about it.
Thank you!
Hi Evgeny,
Glad to hear that it works.
We don’t need to Skype. I was only looking for a mechanism to collaborate if we needed more debugging.
I haven’t done any Common Cartridge integration at this point.
Cheers,
John
On May 13, 2015, at 12:44 AM, Evgeny notifications@github.com<mailto:notifications@github.com> wrote:
Hello, John. I think it works. Problem was in launch parameters for TC and TP. So I tried to launch with parameters you wrote in last message and it works fine. I thought, that my environment "mysql" by default, but I was wrong. My timezone is MSK (Moscow Standard Time), offset: +03:00 hours.
We can to do something like skype call. My skype is: e.svirsky. <---------------------> One more question for you: Did you do any application for Common Cartridge supporting for this tools? Or maybe you can give some advice about it.
Thank you!
— Reply to this email directly or view it on GitHubhttps://github.com/vitalsource/LTI2-Reference/issues/6#issuecomment-101553734.
Hello, John. I think I found issue. When I registered new Tool by URL: http://localhost:5000/lti2_tp/registrations, in database appeared 3 new rows and 2 dublicate for each. Total amount is 9. lti2_tc_resources table:
1,1,setting,Settings,"Settings service"
2,1,setting,Settings,"Settings service"
3,1,setting,Settings,"Settings service"
4,1,echo,Echo,"Echo service"
5,1,echo,Echo,"Echo service"
6,1,echo,Echo,"Echo service"
7,1,iresource,InteractiveResource,"Interactive resource"
8,1,iresource,InteractiveResource,"Interactive resource"
9,1,iresource,InteractiveResource,"Interactive resource"
lti2_tc_links table:
1,Settings,1,NULL,2,1,{},NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15"
2,Settings,1,NULL,5,2,{},NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15"
3,Settings,1,NULL,6,3,{},NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15"
4,Echo,1,NULL,2,4,{},NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15"
5,Echo,1,NULL,5,5,{},NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15"
6,Echo,1,NULL,6,6,{},NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15"
7,InteractiveResource,1,1,2,7,"{""vbid"":""L-999-74180""}",NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15"
8,InteractiveResource,1,2,5,8,"{""vbid"":""L-999-74180""}",NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15"
9,InteractiveResource,1,3,6,9,"{""vbid"":""L-999-74180""}",NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15"
Does that correct?
Another one issue: When I try to add new link to course - error occurs:
No route matches [POST] "/admin/course_page"
One more question: When we add new link, "Select tool" widget has 9 choices and lots of duplicates. "Select gradebook lineitem" widget also has duplicates. Is that correct?
Thank you.
Hi Evgeny,
The problem you’re seeing reflects that the fact that the Tool Consumer code in this gem has only ever been used for demos and LTI2 testing. At Vitalsource we’re Tool Providers. We developed this code before there were any Tool Consumers so we needed to create a minimal Tool Consumer.
Because we give so many demos with this code we decided to create standard resources for the demos. And the code was, incorrectly, left in the gem’s LTI2Tc ToolsController. When we split the sample app (LTI2_tc_sample_app) from the gem (LTI2-Reference) we should have moved that code to the sample append figured out some callback to get it when the tool is registered. (We did this in similar places in the TP code, but not in the TC). Of course, in real life the Registration should not create ANY resources like this…this code should be deleted for a real TC.
BTW when we give demos we also run the rake db:seed script on both tc and tp and these duplicates are then eliminated.
I have added a comment to the code that it should be moved out of the Tools Controller. But I wouldn’t expect any action on this in the immediate future.
John
On May 18, 2015, at 12:25 AM, Evgeny notifications@github.com<mailto:notifications@github.com> wrote:
Hello, John. I think I found issue. When I registered new Tool by URL: http://localhost:5000/lti2_tp/registrations, in database appeared 3 new rows and 2 dublicate for each. Total amount is 9. lti2_tc_resources table:
1,1,setting,Settings,"Settings service" 2,1,setting,Settings,"Settings service" 3,1,setting,Settings,"Settings service" 4,1,echo,Echo,"Echo service" 5,1,echo,Echo,"Echo service" 6,1,echo,Echo,"Echo service" 7,1,iresource,InteractiveResource,"Interactive resource" 8,1,iresource,InteractiveResource,"Interactive resource" 9,1,iresource,InteractiveResource,"Interactive resource"
lti2_tc_links table:
1,Settings,1,NULL,2,1,{},NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15" 2,Settings,1,NULL,5,2,{},NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15" 3,Settings,1,NULL,6,3,{},NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15" 4,Echo,1,NULL,2,4,{},NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15" 5,Echo,1,NULL,5,5,{},NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15" 6,Echo,1,NULL,6,6,{},NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15" 7,InteractiveResource,1,1,2,7,"{""vbid"":""L-999-74180""}",NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15" 8,InteractiveResource,1,2,5,8,"{""vbid"":""L-999-74180""}",NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15" 9,InteractiveResource,1,3,6,9,"{""vbid"":""L-999-74180""}",NULL,NULL,"2015-05-18 07:08:15","2015-05-18 07:08:15"
— Reply to this email directly or view it on GitHubhttps://github.com/vitalsource/LTI2-Reference/issues/6#issuecomment-102948412.
Hello, John Could you please answer one question. For example in my LMS I want to register teacher in TP and then create some courses for the students with links which, TP provided.
Teacher must register and get all links and then compose courses from this links? Does every student has to register in TP?
Thank you.
John, another one request. Could you please check, why I couldn't add new Tool in:
http://localhost:4000/admin/course_page?method=show&course_id=7
? It's error occurs:
No route matches [POST] "/admin/course_page"
Thank you.
Hello, I'm new in RoR. I'm using ruby version 2.1.4 Could you please say what I'm doing wrong:
I cloned TC and TP examples to separate folders, then ran for each one:
gem install bundler
For each application I ran:bundle install
rake init_task:backup
First problem - when I'm trying to login - there is no data in DB. So I import test data from the file in TC application: data\lti2_tc_mysql_init.sql
Ok, I logged in. But when I trying new tool. I enter http://localhost:5000/lti2_tp/registrations, then click submit button, and then error:
undefined method `tc_oauth_half_secret=' for #Lti2Tp::Registration:0x0000000773bdb8
Any ideas?