{"id":10669,"date":"2019-04-12T11:31:08","date_gmt":"2019-04-12T15:31:08","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=10669"},"modified":"2019-04-12T11:31:08","modified_gmt":"2019-04-12T15:31:08","slug":"matlab-grader-test-assessment-generator","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2019\/04\/12\/matlab-grader-test-assessment-generator\/","title":{"rendered":"MATLAB Grader Test (Assessment) Generator"},"content":{"rendered":"\r\n<div class=\"content\"><p><a href=\"http:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/869871\">Jiro<\/a>&#8216;s Pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/70661\">MATLAB Grader Test Generator<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/1775861\">Robin T. Bye<\/a>.<\/p><p><a href=\"https:\/\/jp.mathworks.com\/products\/matlab-grader.html\">MATLAB Grader<\/a> is a web service product available for our academic customers. It&#8217;s an auto-grading system for MATLAB problems. Professors can author MATLAB problems and invite students to their courses, and students can take the course through a web browser, with immediate feedback to their answers. One of the key aspects to creating a problem in MATLAB Grader is the <a href=\"https:\/\/www.mathworks.com\/help\/matlabgrader\/ug\/assessments-for-script-based-learner-solutions.html\">assessments<\/a>. Assessments check whether the answers submitted by the student are correct. One of the easiest ways to do that is to check whether a particular varible equals the provided solution.<\/p><p>Robin&#8217;s submission provides a creative way of generating assessment code. You provide the solution and learner template files, and the app automatically creates assessment code for all the appropriate variables.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_gradertestgenerator\/grader_app_screenshot.png\" alt=\"\"> <\/p><p>I chose this entry as a Pick this week, because<\/p><div><ol><li>I was happy to see an entry that was related to MATLAB Grader. Since I primarily work with academic customers, I often promote MATLAB Grader.<\/li><li>It tries to automate and simplify what could be a tedious task.<\/li><li>It&#8217;s quite robust and flexible, allowing exclusion of certain variables.<\/li><\/ol><\/div><p>However, I do want to highlight a feature in MATLAB Grader that makes variable assessment quite simple. There is a &#8220;Variable Equals Reference Solution&#8221; option where all you need to do is enter the name of the variable, and the assessment will automatically check whether the variable equals the solution. It could be a simple alternative to the code version of the assessments.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_gradertestgenerator\/grader_variable_assessment.png\" alt=\"\"> <\/p><p><b>Comments<\/b><\/p><p>Give it a try and let us know what you think <a href=\"http:\/\/blogs.mathworks.com\/pick\/?p=10669#respond\">here<\/a> or leave a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/70661#comment\">comment<\/a> for Robin.<\/p><script language=\"JavaScript\"> <!-- \r\n    function grabCode_2bab1737486046b593765b8bbddf26cb() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='2bab1737486046b593765b8bbddf26cb ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 2bab1737486046b593765b8bbddf26cb';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        copyright = 'Copyright 2019 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n\r\n        d.title = title + ' (MATLAB code)';\r\n        d.close();\r\n    }   \r\n     --> <\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_2bab1737486046b593765b8bbddf26cb()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n      the MATLAB code <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; R2018b<br><\/p><p class=\"footer\"><br>\r\n      Published with MATLAB&reg; R2018b<br><\/p><\/div><!--\r\n2bab1737486046b593765b8bbddf26cb ##### SOURCE BEGIN #####\r\n%%\r\n% <http:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/869871 Jiro>'s\r\n% Pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/70661 MATLAB Grader\r\n% Test Generator> by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/1775861 Robin T.\r\n% Bye>.\r\n%\r\n% <https:\/\/jp.mathworks.com\/products\/matlab-grader.html MATLAB Grader> is a\r\n% web service product available for our academic customers. It's an\r\n% auto-grading system for MATLAB problems. Professors can author MATLAB\r\n% problems and invite students to their courses, and students can take the\r\n% course through a web browser, with immediate feedback to their answers.\r\n% One of the key aspects to creating a problem in MATLAB Grader is the\r\n% <https:\/\/www.mathworks.com\/help\/matlabgrader\/ug\/assessments-for-script-based-learner-solutions.html\r\n% assessments>. Assessments check whether the answers submitted by the\r\n% student are correct. One of the easiest ways to do that is to check\r\n% whether a particular varible equals the provided solution.\r\n%\r\n% Robin's submission provides a creative way of generating assessment code.\r\n% You provide the solution and learner template files, and the app\r\n% automatically creates assessment code for all the appropriate variables.\r\n%\r\n% <<grader_app_screenshot.png>>\r\n%\r\n% I chose this entry as a Pick this week, because \r\n%\r\n% # I was happy to see an entry that was related to MATLAB Grader. Since I\r\n% primarily work with academic customers, I often promote MATLAB Grader.\r\n% # It tries to automate and simplify what could be a tedious task.\r\n% # It's quite robust and flexible, allowing exclusion of certain\r\n% variables.\r\n%\r\n% However, I do want to highlight a feature in MATLAB Grader that makes\r\n% variable assessment quite simple. There is a \"Variable Equals Reference\r\n% Solution\" option where all you need to do is enter the name of the\r\n% variable, and the assessment will automatically check whether the\r\n% variable equals the solution. It could be a simple alternative to the\r\n% code version of the assessments.\r\n%\r\n% <<grader_variable_assessment.png>>\r\n%\r\n% *Comments*\r\n%\r\n% Give it a try and let us know what you think\r\n% <http:\/\/blogs.mathworks.com\/pick\/?p=10669#respond here> or leave a\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/70661#comment\r\n% comment> for Robin.\r\n\r\n##### SOURCE END ##### 2bab1737486046b593765b8bbddf26cb\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_gradertestgenerator\/grader_app_screenshot.png\" onError=\"this.style.display ='none';\" \/><\/div><p>\r\nJiro&#8216;s Pick this week is MATLAB Grader Test Generator by Robin T. Bye.MATLAB Grader is a web service product available for our academic customers. It&#8217;s an auto-grading system for MATLAB&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2019\/04\/12\/matlab-grader-test-assessment-generator\/\">read more >><\/a><\/p>","protected":false},"author":35,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/10669"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=10669"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/10669\/revisions"}],"predecessor-version":[{"id":10673,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/10669\/revisions\/10673"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=10669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=10669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=10669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}