{"id":876,"date":"2020-07-01T06:59:56","date_gmt":"2020-07-01T10:59:56","guid":{"rendered":"https:\/\/drsmith.blog.yorku.ca\/?p=876"},"modified":"2020-07-01T06:59:56","modified_gmt":"2020-07-01T10:59:56","slug":"virtual-programming-lab","status":"publish","type":"post","link":"https:\/\/www.yorku.ca\/professor\/drsmith\/2020\/07\/01\/virtual-programming-lab\/","title":{"rendered":"Virtual Programming Lab"},"content":{"rendered":"<p>Virtual Programming Lab is a plugin for Moodle (eClass at YorkU) that permits interactive programming assignments to be made for students. \u00a0 There are some really good examples at Smith College on how to <a href=\"http:\/\/www.science.smith.edu\/dftwiki\/index.php\/Moodle_VPL_Tutorials\">set it up with Python<\/a> and a few with Java and C.<\/p>\n<div id=\"attachment_1223\" style=\"width: 310px\" class=\"wp-caption alignright\"><a href=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-10-24-at-6.11.29-AM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1223\" class=\"size-medium wp-image-1223\" src=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-10-24-at-6.11.29-AM-300x188.png\" alt=\"Java Example on VPL with JUnit testing framework\" width=\"300\" height=\"188\" srcset=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-10-24-at-6.11.29-AM-300x188.png 300w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-10-24-at-6.11.29-AM.png 767w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1223\" class=\"wp-caption-text\"><a href=\"https:\/\/youtu.be\/69Ma3BJYHbo\">YouTube Java Example on VPL<\/a> with JUnit testing framework<\/p><\/div>\n<p>I've posted, on YouTube, an <a href=\"https:\/\/youtu.be\/69Ma3BJYHbo\">example of how to set up a Java assignment using a JUnit<\/a> testing framework on the Moodle (eClass) platform at York University. \u00a0We should be encouraging students to use JUnit in their own program development and using it within the VPL system, even if the students can't see the JUnit aspect directly is entirely consistent (practice what you preach, eh?)<\/p>\n<div class=\"mceTemp\"><\/div>\n<p>&nbsp;<\/p>\n<p>Settings for the VPL are available once you have placed a VPL assignment in your Moodle course page. \u00a0Once it's been placed, click on the assignment and find the gear icon.<\/p>\n<div id=\"attachment_880\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.45.21-AM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-880\" class=\"size-medium wp-image-880\" src=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.45.21-AM-300x177.png\" alt=\"set up details about the VPL assignment\" width=\"300\" height=\"177\" srcset=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.45.21-AM-300x177.png 300w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.45.21-AM-1024x604.png 1024w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.45.21-AM-1536x905.png 1536w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.45.21-AM-2048x1207.png 2048w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-880\" class=\"wp-caption-text\">set up details about the VPL assignment<\/p><\/div>\n<div id=\"attachment_878\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.41.17-AM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-878\" class=\"size-medium wp-image-878\" src=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.41.17-AM-300x183.png\" alt=\"Options for the VPL assignment with Matlab\/Octave\" width=\"300\" height=\"183\" srcset=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.41.17-AM-300x183.png 300w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.41.17-AM-1024x624.png 1024w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.41.17-AM-1536x935.png 1536w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.41.17-AM-2048x1247.png 2048w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-878\" class=\"wp-caption-text\">Options for the VPL assignment with Matlab\/Octave<\/p><\/div>\n<p>You need to set up test cases.<\/p>\n<div id=\"attachment_882\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.47.29-AM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-882\" class=\"size-medium wp-image-882\" src=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.47.29-AM-300x174.png\" alt=\"test case setup\" width=\"300\" height=\"174\" srcset=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.47.29-AM-300x174.png 300w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.47.29-AM-1024x592.png 1024w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.47.29-AM-1536x888.png 1536w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.47.29-AM.png 1850w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-882\" class=\"wp-caption-text\">test case setup<\/p><\/div>\n<p>Here's an <a href=\"http:\/\/www.science.smith.edu\/dftwiki\/index.php\/Tutorial:_Moodle_VPL_Min_of_3_--_Python#Correct-Program_Test\">example of how to do it with Python<\/a>.<\/p>\n<p>When I set it up and try to run the example... I get a terminal window that doesn't do much...<\/p>\n<div id=\"attachment_883\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.58.44-AM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-883\" class=\"size-medium wp-image-883\" src=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.58.44-AM-300x189.png\" alt=\"terminal window shows up upon running ...\" width=\"300\" height=\"189\" srcset=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.58.44-AM-300x189.png 300w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.58.44-AM-1024x647.png 1024w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.58.44-AM-1536x970.png 1536w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-01-at-6.58.44-AM-2048x1293.png 2048w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-883\" class=\"wp-caption-text\">terminal window shows up upon running ...<\/p><\/div>\n<p>Work has been proceeding on the Moodle Preview site here at York. \u00a0I've been able to run through a number of the Smith College VPL tutorials and they're looking good.<\/p>\n<p>It looks like it should be able to work for Python, C, x86 Assembler and Java.<\/p>\n<div id=\"attachment_1044\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-17-at-10.09.20-AM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1044\" class=\"size-medium wp-image-1044\" src=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-17-at-10.09.20-AM-300x195.png\" alt=\"VPL Screenshot on Moodle Preview.\" width=\"300\" height=\"195\" srcset=\"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-17-at-10.09.20-AM-300x195.png 300w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-17-at-10.09.20-AM-1024x666.png 1024w, https:\/\/www.yorku.ca\/professor\/drsmith\/wp-content\/uploads\/sites\/444\/2020\/07\/Screen-Shot-2020-07-17-at-10.09.20-AM.png 1395w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1044\" class=\"wp-caption-text\">VPL Screenshot on Moodle Preview.<\/p><\/div>\n<p>&nbsp;<\/p>\n<ol>\n<li id=\"yui_3_17_2_1_1594995074037_30\">First Java tutorial: <a href=\"http:\/\/www.science.smith.edu\/dftwiki\/index.php\/Tutorial:_Moodle_VPL_--_Java_Tester_Class\">http:\/\/www.science.smith.edu\/dftwiki\/index.php\/Tutorial:_Moodle_VPL_--_Java_Tester_Class <\/a>\"<em>This tutorial generates a VPL activity that allows automatic evaluation of a Java program with 1 class submitted by the student, which is derived from another class (given to the students, but not submitted by the students). The program is tested by a class provided by the instructor. This class outputs a series of lines. The <b>vpl_run.sh script tests<\/b> how many keywords appear in the output and decides on the correctness of the program from the number of keywords output, and not on the exact output by the student program.<\/em>\"<\/li>\n<li>Second Java tutorial: \"<em>This tutorial builds on the\u00a0<a title=\"Tutorial: Moodle VPL Hello World -- Python\" href=\"http:\/\/www.science.smith.edu\/dftwiki\/index.php\/Tutorial:_Moodle_VPL_Hello_World_--_Python\">first one in the series<\/a>, which should be done first, as the present tutorial skips some steps. This tutorial generates a VPL activity that allows automatic evaluation of a Java program with 2 classes stored in 2 files. The application gets its input from a data file. The evaluation tests the program with 3 different data files<\/em>.\"\u00a0Source: <a href=\"http:\/\/www.science.smith.edu\/dftwiki\/index.php\/Tutorial:_Moodle_VPL_--_A_Multi-File_Java_Program_with_Data_File\">http:\/\/www.science.smith.edu\/dftwiki\/index.php\/Tutorial:_Moodle_VPL_--_A_Multi-File_Java_Program_with_Data_File<\/a>.<\/li>\n<li>Third Java tutorial: \"<em>This VPL activity allows the automatic evaluation of 2 Java programs submitted by students. The first one is an implementation of a list. The second uses the list for some simple computation. The VPL evaluation checks that one of the student programs does not contain a particular pattern, in this case the use of [ ] brackets, indicating that one class uses the private member array of the other. Depending on the various stages of success, the module assigns different grades to the submitted programs.<\/em>\" source: <a href=\"http:\/\/www.science.smith.edu\/dftwiki\/index.php\/Tutorial:_Moodle_VPL_--_Testing_Two_Java_Classes\">http:\/\/www.science.smith.edu\/dftwiki\/index.php\/Tutorial:_Moodle_VPL_--_Testing_Two_Java_Classes<\/a><\/li>\n<\/ol>\n<hr \/>\n<p>&nbsp;<\/p>\n<h3>Update (April 2021)<\/h3>\n<p><a href=\"http:\/\/www.science.smith.edu\/dftwiki\/index.php\/Tutorial_Moodle_VPL_Tips_%26_Tricks\">Tips and tricks<\/a> for scripting in VPL. \u00a0Could Microchip's <a href=\"https:\/\/microchipdeveloper.com\/mplabx:mdb-ref-print\">MDB<\/a> \"<a href=\"https:\/\/www.mouser.com\/pdfDocs\/Microchip_Debugger_User_Guide.pdf\">debugger<\/a>\/simulator\" be accessed in VPL?<\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<p>James Andrew Smith is an associate professor in Electrical Engineering and Computer Science <a href=\"http:\/\/eecs.lassonde.yorku.ca\">Department<\/a> in <a href=\"http:\/\/www.yorku.ca\/index.html\">York<\/a> University's <a href=\"http:\/\/lassonde.yorku.ca\">Lassonde<\/a> School. \u00a0He lives in Toronto, Canada. \u00a0While on sabbatical\u00a0in 2018-19 with his wife and kids he lived in Strasbourg, France and taught at the <a href=\"https:\/\/www.insa-strasbourg.fr\/en\/\">INSA Strasbourg<\/a> and <a href=\"https:\/\/www.hs-karlsruhe.de\">Hochschule Karlsruhe<\/a>\u00a0and wrote about his\u00a0<a href=\"https:\/\/twitter.com\/search?q=(%23sabbaticallife)%20(from%3Aonnimikki)&amp;src=typed_query\">personal<\/a> and <a href=\"https:\/\/twitter.com\/search?q=insa%20(from%3Ajasmith_yorku)&amp;src=typed_query\">professional<\/a> <a href=\"https:\/\/twitter.com\/search?q=karlsruhe%20(from%3Ajasmith_yorku)&amp;src=typed_query\">perspectives<\/a>. \u00a0You can find him on\u00a0<a href=\"https:\/\/twitter.com\/jasmith_yorku\">Twitter<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Virtual Programming Lab is a plugin for Moodle (eClass at YorkU) that permits interactive programming assignments to be made for students. \u00a0 There are some really good examples at Smith College on how to set it up with Python and a few with Java and C. I've posted, on YouTube, an example of how to [&hellip;]<\/p>\n","protected":false},"author":762,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","footnotes":""},"categories":[43,46,50,51,53,54,55],"tags":[158,164,219,261,263],"class_list":["post-876","post","type-post","status-publish","format-standard","hentry","category-assembler","category-c-programming","category-java","category-lms","category-moodle","category-pedagogy","category-programming","tag-interactive","tag-java","tag-python","tag-virtual-programming-lab","tag-vpl"],"taxonomy_info":{"category":[{"value":43,"label":"assembler"},{"value":46,"label":"c programming"},{"value":50,"label":"java"},{"value":51,"label":"lms"},{"value":53,"label":"Moodle"},{"value":54,"label":"pedagogy"},{"value":55,"label":"programming"}],"post_tag":[{"value":158,"label":"interactive"},{"value":164,"label":"java"},{"value":219,"label":"python"},{"value":261,"label":"virtual programming lab"},{"value":263,"label":"VPL"}]},"featured_image_src_large":false,"author_info":{"display_name":"drsmith","author_link":"https:\/\/www.yorku.ca\/professor\/drsmith\/author\/drsmith\/"},"comment_info":"","category_info":[{"term_id":43,"name":"assembler","slug":"assembler","term_group":0,"term_taxonomy_id":43,"taxonomy":"category","description":"","parent":0,"count":30,"filter":"raw","cat_ID":43,"category_count":30,"category_description":"","cat_name":"assembler","category_nicename":"assembler","category_parent":0},{"term_id":46,"name":"c programming","slug":"c-programming","term_group":0,"term_taxonomy_id":46,"taxonomy":"category","description":"","parent":0,"count":50,"filter":"raw","cat_ID":46,"category_count":50,"category_description":"","cat_name":"c programming","category_nicename":"c-programming","category_parent":0},{"term_id":50,"name":"java","slug":"java","term_group":0,"term_taxonomy_id":50,"taxonomy":"category","description":"","parent":0,"count":27,"filter":"raw","cat_ID":50,"category_count":27,"category_description":"","cat_name":"java","category_nicename":"java","category_parent":0},{"term_id":51,"name":"lms","slug":"lms","term_group":0,"term_taxonomy_id":51,"taxonomy":"category","description":"","parent":0,"count":24,"filter":"raw","cat_ID":51,"category_count":24,"category_description":"","cat_name":"lms","category_nicename":"lms","category_parent":0},{"term_id":53,"name":"Moodle","slug":"moodle","term_group":0,"term_taxonomy_id":53,"taxonomy":"category","description":"","parent":0,"count":27,"filter":"raw","cat_ID":53,"category_count":27,"category_description":"","cat_name":"Moodle","category_nicename":"moodle","category_parent":0},{"term_id":54,"name":"pedagogy","slug":"pedagogy","term_group":0,"term_taxonomy_id":54,"taxonomy":"category","description":"","parent":0,"count":28,"filter":"raw","cat_ID":54,"category_count":28,"category_description":"","cat_name":"pedagogy","category_nicename":"pedagogy","category_parent":0},{"term_id":55,"name":"programming","slug":"programming","term_group":0,"term_taxonomy_id":55,"taxonomy":"category","description":"","parent":0,"count":30,"filter":"raw","cat_ID":55,"category_count":30,"category_description":"","cat_name":"programming","category_nicename":"programming","category_parent":0}],"tag_info":[{"term_id":158,"name":"interactive","slug":"interactive","term_group":0,"term_taxonomy_id":158,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":164,"name":"java","slug":"java","term_group":0,"term_taxonomy_id":164,"taxonomy":"post_tag","description":"","parent":0,"count":10,"filter":"raw"},{"term_id":219,"name":"python","slug":"python","term_group":0,"term_taxonomy_id":219,"taxonomy":"post_tag","description":"","parent":0,"count":3,"filter":"raw"},{"term_id":261,"name":"virtual programming lab","slug":"virtual-programming-lab","term_group":0,"term_taxonomy_id":261,"taxonomy":"post_tag","description":"","parent":0,"count":14,"filter":"raw"},{"term_id":263,"name":"VPL","slug":"vpl","term_group":0,"term_taxonomy_id":263,"taxonomy":"post_tag","description":"","parent":0,"count":13,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/posts\/876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/users\/762"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/comments?post=876"}],"version-history":[{"count":0,"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/posts\/876\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/media?parent=876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/categories?post=876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yorku.ca\/professor\/drsmith\/wp-json\/wp\/v2\/tags?post=876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}