{"id":3754,"date":"2012-10-12T11:45:48","date_gmt":"2012-10-12T15:45:48","guid":{"rendered":"http:\/\/www.dr-chuck.com\/csev-blog\/?p=3754"},"modified":"2012-10-18T15:29:09","modified_gmt":"2012-10-18T19:29:09","slug":"installing-stanfords-open-source-class2go-large-scale-open-teaching-environment","status":"publish","type":"post","link":"https:\/\/www.dr-chuck.com\/csev-blog\/2012\/10\/installing-stanfords-open-source-class2go-large-scale-open-teaching-environment\/","title":{"rendered":"Installing Stanford&#8217;s Open Source Class2Go Large-Scale Open Teaching Environment"},"content":{"rendered":"<p>I have been watching the commits go by on Stanford&#8217;s <a href=\"http:\/\/class.stanford.edu\/\" target=\"_new\">Class2Go<\/a> software and really liked the high level of activity by Sef, Jason, and the rest of the team.   It is fun to watch a project like this even when they are a small team and sprinting forward and don&#8217;t have much time to build a community.   Starting from day one in the open is simply great &#8211; we can learn so much even if all we do is watch.<\/p>\n<p>Of course I <a href=\"https:\/\/twitter.com\/drchuck\/status\/255660563445739520\" target=\"_new\">tweeted<\/a> about how cool it was to watch and threatened to write some code and contribute it.   Then <a href=\"https:\/\/twitter.com\/jinpa1345\/status\/256584491949236225\" target=\"_new\">Jane Manning<\/a> suggested via Twitter that I actually try to add <a href=\"http:\/\/developers.imsglobal.org\/\" target=\"_new\">IMS Learning Tools Interoperability (LTI)<\/a> to it.<\/p>\n<p>I didn&#8217;t teach SI502 until 1PM today and I had a full cup of coffee so I figured I would give it a try.  About 90 minutes later I have Class2Go running on my laptop.  <\/p>\n<p>Along the way I figured out that Class2Go <b>already<\/b> has IMS LTI built in as its method to integrate <a href=\"http:\/\/www.piazza.com\/\" target=\"_new\">Piazza<\/a> discussion forum.  But I still figure I can hack in a nice &#8220;External Tool&#8221; capability into Class2Go and do LTI 1.1 grade integration since I bet they don&#8217;t have that yet. Here are my results so far:<\/p>\n<p><center><a href=\"http:\/\/www.dr-chuck.com\/csev-blog\/wp-content\/uploads\/2012\/10\/class2go-dr-chuck.png\" target=\"_new\"><img decoding=\"async\" src=\"http:\/\/www.dr-chuck.com\/csev-blog\/wp-content\/uploads\/2012\/10\/class2go-dr-chuck.png\" width=\"600\"><\/a><\/center><\/p>\n<p>The following are my notes as I went along that adjust what the Stanford documentation told me to do.  My step numbers follow their step numbers it is probably best to scroll through their documentation and my steps at the same time.<\/p>\n<p><b>Update October 15, 2012:<\/b> I submitted improvements to the Stanford instructions and they are now updated to reflect everything I say below.   So ignore my notes below and just look at the new-and-improved Stanford instructions &#8211; they should work.<\/p>\n<pre>\r\n\r\nStanford's Instructions:\r\n<a href=\"https:\/\/github.com\/Stanford-Online\/class2go\/blob\/master\/README_SETUP.md\" target=\"_new\">https:\/\/github.com\/Stanford-Online\/class2go\/blob\/master\/README_SETUP.md<\/a>\r\n\r\nChuck's Notes:  <b>Update:<\/b> My notes below have now been integrated into the above instructions.\r\n\r\n1. Upgrade Xcode to 4.5.1 via App Store\r\n\r\n2. Within XCode, add the command line tools: \r\nPreferences -> <b>Downloads<\/b> -> \"Command Line Tools\" Install button\r\n(tiny typo in their instructions)\r\n\r\n3.  Homebrew URL in their instructions - gives 404\r\n\r\nSo I went here:   http:\/\/mxcl.github.com\/homebrew\/\r\n\r\nAnd did this:\r\n\r\nruby -e \"$(curl -fsSkL raw.github.com\/mxcl\/homebrew\/go)\"\r\n\r\nAfterwards I ran :\r\n\r\nbrew doctor\r\n\r\n4. I skipped this step did not install Python - I already had 2.7.1 and \r\nhoped I would be OK.\r\n\r\n5. I already had mysql so I skipped this step\r\n\r\n6. sudo easy_install pip\r\n\r\n7. sudo pip install virtualenv\r\n\r\n8. Here is what I saw\r\n\r\ncsev$ pwd\r\n\/Users\/csev\/dev\/class2go\r\n\r\nvirtualenv sophi-venv --no-site-packages  \r\nNew python executable in sophi-venv\/bin\/python\r\nInstalling setuptools............done.\r\nInstalling pip...............done.\r\n\r\n9. Here is what I saw\r\n\r\n . .\/sophi-venv\/bin\/activate\r\n(sophi-venv):class2go csev$ \r\n\r\n10. Here is what I saw\r\n\r\n(sophi-venv):class2go csev$ pip install django\r\nDownloading\/unpacking django\r\n  Downloading Django-1.4.1.tar.gz (7.7MB): 7.7MB downloaded\r\n  Running setup.py egg_info for package django\r\n    \r\nInstalling collected packages: django\r\n  Running setup.py install for django\r\n    changing mode of build\/scripts-2.7\/django-admin.py from 644 to 755\r\n    \r\n    changing mode of \/Users\/csev\/dev\/class2go\/sophi-venv\/bin\/django-admin.py to 755\r\nSuccessfully installed django\r\nCleaning up...\r\n(sophi-venv):class2go csev$ \r\n\r\n11 - 15 - Ran just fine - there were lots of compiler warnings - but no errors so \r\nI pressed on\r\n\r\n16 - ?? I am sure this will bite me much later when I try to \r\nintegrate with Google Apps :)\r\n\r\n17 - Ran just fine\r\n\r\n<b>This is missing prior to step 18<\/b>\r\n\r\nIn Mysql:\r\n\r\ncreate database class2go;\r\ngrant all on class2go.* to class2go@'localhost' identified by 'class2gopw';\r\ngrant all on class2go.* to class2go@'127.0.0.1' identified by 'class2gopw';\r\n\r\nAs root:\r\n\r\nsudo mkdir \/var\/log\/django\/\r\nsudo chmod 777 \/var\/log\/django\/\r\n\r\nmkdir \/Users\/csev\/dev\/class2go\/sqlite3\/\r\n\r\nMust setup databases.py from databases_example.py\r\n\r\ncd main\r\n\r\ndatabases.py:\r\n\r\nDATABASES = {\r\n    'default': {\r\n        'ENGINE': 'django.db.backends.mysql', \r\n        'NAME': 'class2go',                      \r\n        'USER': 'class2go',                    \r\n        'PASSWORD': 'class2gopw',        \r\n        'HOST': '',                 \r\n        'PORT': '',       \r\n    },\r\n    'celery': {\r\n        'ENGINE': 'django.db.backends.sqlite3',\r\n        'NAME': '\/Users\/csev\/dev\/class2go\/sqlite3\/celerydb.sqlite',\r\n    },\r\n}\r\n\r\n18. Set up initial db.\r\n\r\n.\/manage.py syncdb \r\n\r\nThis failed the first time I ran it and I ran it again and it \r\ndid not fail - not sure if it worked really - but pressed on - \r\nthis is the output I saw the second time it ran:\r\n\r\n(sophi-venv):main csev$ .\/manage.py syncdb\r\nSyncing...\r\nCreating tables ...\r\nInstalling custom SQL ...\r\nInstalling indexes ...\r\nInstalled 0 object(s) from 0 fixture(s)\r\n\r\nSynced:\r\n > django.contrib.auth\r\n > django.contrib.contenttypes\r\n > django.contrib.sessions\r\n > django.contrib.sites\r\n > django.contrib.messages\r\n > django.contrib.staticfiles\r\n > django.contrib.admin\r\n > django.contrib.admindocs\r\n > registration\r\n > south\r\n > courses\r\n > courses.forums\r\n > courses.announcements\r\n > courses.videos\r\n > courses.video_exercises\r\n > courses.email_members\r\n > khan\r\n > problemsets\r\n > django.contrib.flatpages\r\n > storages\r\n > celerytest\r\n > convenience_redirect\r\n > exception_snippet\r\n > db_test_data\r\n\r\nNot synced (use migrations):\r\n - djcelery\r\n - c2g\r\n\r\nThese worked:\r\n\r\n    .\/manage.py syncdb --database=celery\r\n    .\/manage.py migrate --database=celery\r\n\r\nThis is that I saw in my MySql\r\n\r\nmysql> show tables;\r\n+----------------------------------+\r\n| Tables_in_class2go               |\r\n+----------------------------------+\r\n| auth_group                       |\r\n| auth_group_permissions           |\r\n| auth_permission                  |\r\n| auth_user                        |\r\n| auth_user_groups                 |\r\n| auth_user_user_permissions       |\r\n| c2g_additional_pages             |\r\n| c2g_announcements                |\r\n| c2g_content_sections             |\r\n| c2g_course_emails                |\r\n| c2g_courses                      |\r\n| c2g_courses_share_to             |\r\n| c2g_emailaddr                    |\r\n| c2g_exercises                    |\r\n| c2g_files                        |\r\n| c2g_institutions                 |\r\n| c2g_listemail                    |\r\n| c2g_mailinglist                  |\r\n| c2g_mailinglist_members          |\r\n| c2g_news_events                  |\r\n| c2g_page_visit_log               |\r\n| c2g_problem_activity             |\r\n| c2g_problem_sets                 |\r\n| c2g_problemset_to_exercise       |\r\n| c2g_sections                     |\r\n| c2g_sections_members             |\r\n| c2g_user_profiles                |\r\n| c2g_user_profiles_institutions   |\r\n| c2g_video_activity               |\r\n| c2g_video_to_exercise            |\r\n| c2g_video_view_traces            |\r\n| c2g_videos                       |\r\n| celery_taskmeta                  |\r\n| celery_tasksetmeta               |\r\n| django_admin_log                 |\r\n| django_content_type              |\r\n| django_flatpage                  |\r\n| django_flatpage_sites            |\r\n| django_session                   |\r\n| django_site                      |\r\n| djcelery_crontabschedule         |\r\n| djcelery_intervalschedule        |\r\n| djcelery_periodictask            |\r\n| djcelery_periodictasks           |\r\n| djcelery_taskstate               |\r\n| djcelery_workerstate             |\r\n| registration_registrationprofile |\r\n| south_migrationhistory           |\r\n+----------------------------------+\r\n48 rows in set (0.01 sec)\r\n\r\nmysql> \r\n\r\n(sophi-venv): csev$  cd main\r\n(sophi-venv):main csev$ python manage.py runserver 8100\r\n\r\nValidating models...\r\n\r\n0 errors found\r\nDjango version 1.4.1, using settings 'settings'\r\nDevelopment server is running at http:\/\/127.0.0.1:8100\/\r\nQuit the server with CONTROL-C.\r\n<\/pre>\n<p>Navigate to <a href=\"http:\/\/www.dr-chuck.com\/csev-blog\/wp-content\/uploads\/2012\/10\/class2go-dr-chuck.png\" target=\"_new\">http:\/\/localhost:8100<\/a> in a browser and start hacking :)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been watching the commits go by on Stanford&#8217;s Class2Go software and really liked the high level of activity by Sef, Jason, and the rest of the team. It is fun to watch a project like this even when they are a small team and sprinting forward and don&#8217;t have much time to build [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3754","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/3754","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/comments?post=3754"}],"version-history":[{"count":19,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/3754\/revisions"}],"predecessor-version":[{"id":3774,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/3754\/revisions\/3774"}],"wp:attachment":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/media?parent=3754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/categories?post=3754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/tags?post=3754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}