User Tools

Site Tools


services:labtest:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
services:labtest:start [2025/01/27 11:54] – [1. Allow lab machines to access eClass in labtest mode] jasservices:labtest:start [2025/03/05 03:46] (current) – [3. Allow Access To Your eClass Quiz ID In Labtest Mode] jas
Line 247: Line 247:
 restrict list                                List labtest URL restrictions (including line numbers) restrict list                                List labtest URL restrictions (including line numbers)
 restrict add <restriction> [<line number>  Add labtest URL restriction <restriction> restrict add <restriction> [<line number>  Add labtest URL restriction <restriction>
-restrict eclass                              Allow access to eClass Quiz and VPL+restrict eclass                              Allow access to eClass (*)
 restrict delete <line-number>                Delete restriction <restriction> restrict delete <line-number>                Delete restriction <restriction>
 restrict edit                                Edit labtest restrictions restrict edit                                Edit labtest restrictions
Line 261: Line 261:
 labtest> restrict add -www.w3schools.com/html/html_editors.asp labtest> restrict add -www.w3schools.com/html/html_editors.asp
  
-To allow access to eClass Quiz/VPL:+(*) To allow access to eClass Quiz/VPL, please read the following web page:
  
-labtest> restrict eclass+https://wiki.eecs.yorku.ca/dept/tdb/services:labtest:start#accessing_external_hosts_in_labtest_eclass_example
  
-NOTE: Running an eClass in labtest requires other setup as well.  Please refer +*** Don't forget - ALWAYS test your eClass quiz using ltcloud! https://webapp.eecs.yorku.ca/ltcloud ***
-      to this URL for further instructions: +
- +
-  https://wiki.eecs.yorku.ca/dept/tdb/services:labtest:start#accessing_external_hosts_in_labtest_optional+
 </code> </code>
  
-By default, labtest doesn't permit students to access external websites.  Using the "restrict" subcommand, you can allow access to other web sites if your labtest requires it.  For more information, refer to this page.+By default, labtest doesn't permit students to access external websites.  Using the "restrict" subcommand, you can allow access to other web sites if your labtest requires it.  For more information on the restriction formatplease refer to this page
 + 
 +  * https://wiki.eecs.yorku.ca/dept/tdb/services:labtest:start#accessing_external_hosts_in_labtest_optional 
 + 
 +For eClass specific restrictions, please refer to this page:
  
-https://wiki.eecs.yorku.ca/dept/tdb/services:labtest:start#accessing_external_hosts_in_labtest_optional+  * https://wiki.eecs.yorku.ca/dept/tdb/services:labtest:start#accessing_external_hosts_in_labtest_eclass_example
  
-Labtest restrictions are entirely optional as well.+Labtest restrictions are entirely optional.
  
 ===== Labtest Submit ===== ===== Labtest Submit =====
Line 318: Line 319:
 # <optional description> # <optional description>
 #version: <optional labtest version name> #version: <optional labtest version name>
-MM/DD/YYYY  HH:MM M labtest <HOSTSPEC> +MM/DD/YYYY  HH:MM M labtest HOSTSPEC 
-MM/DD/YYYY  HH:MM M default <HOSTSPEC>+MM/DD/YYYY  HH:MM M default HOSTSPEC
 </code> </code>
  
Line 328: Line 329:
   * HH:MM - hour:minute hour of your test (note that this is impacted by the next field)   * HH:MM - hour:minute hour of your test (note that this is impacted by the next field)
   * M - number of minutes of warnings to send to students before system will reboot (usually 5) - NOTE: If M=5, machines will REBOOT at HH:MM + 5 MIN, NOT at HH:MM   * M - number of minutes of warnings to send to students before system will reboot (usually 5) - NOTE: If M=5, machines will REBOOT at HH:MM + 5 MIN, NOT at HH:MM
-  * <HOSTSPEC- lets us know which hosts you want to book. <HOSTSPEC> can contain:+  * HOSTSPEC - lets us know which hosts you want to book. <HOSTSPEC> can contain:
     * individual machines separated by commas: ea01,ea02,ea03     * individual machines separated by commas: ea01,ea02,ea03
     * groups of machines:      * groups of machines: 
Line 380: Line 381:
 </code> </code>
  
-If you have students with different accommodations for extra time, please submit a **separate** block for each accommodation type.  Here's the same booking request above with 5 machines getting an extra hour, 2 machines getting 30 minutes extra, and 1 machine getting 10 minutes extra.  **Accommodations cannot exceed your lab booking time.  In order to book machines past your lab booking time, please consult with tech.**+If you have students with different accommodations for extra time, please submit a **separate** block for each accommodation type.  Here's the same booking request above with 5 machines getting an extra hour, 2 machines getting 30 minutes extra, and 1 machine getting 20 minutes extra.  **Accommodations cannot exceed your lab booking time.  In order to book machines past your lab booking time, please consult with tech.**
  
 <code> <code>
Line 422: Line 423:
 </code> </code>
  
-...  or you can create one long session 9:00 AM - 11:00 AM, but you will have to clear the lab manually between sessions yourself:+...  or you can create one long session 9:00 AM - 1:00 PM, but you will have to clear the lab manually between sessions yourself:
  
 <code> <code>
Line 949: Line 950:
 ====== Accessing External Hosts In Labtest (optional) ====== ====== Accessing External Hosts In Labtest (optional) ======
  
-Your labtest may require students to access external websites.  For example, if you're teaching a course on web development, you may want your students to be able to access www.w3schools.com during labtest.  You may also want your students to complete a quiz on eclass.yorku.ca. You can restrict access to a complete website, or even a part of a website!  +Your labtest may require students to access external websites.  For example, if you're teaching a course on web development, you may want your students to be able to access https://www.w3schools.com during your labtest. You can restrict access to a complete website, or even a part of a website!  In the next section we'll even cover restricting access to an eClass quiz. 
  
-With host level access control, you can give your labtest access to specific websites such as www.w3schools.com.  Students will be able to access any URL on the given sites.+With host level access control, you can give your labtest access to specific websites such as https://www.w3schools.com.  Students will be able to access any URL on the given sites.
  
-Create file called "labtest.allow" in your labtest web directory (/eecs/dept/www/course/<COURSE>/labtest/labtest.allow) Include in this file complete website names that you want students to be able to access during your test, one per line.  +Let's say you're teaching course EECS9999, and you want students in your labtest to be able to access "https://www.w3schools.com" and "https://validator.w3.org" web sites during your test:
  
-For example, if you're teaching a course EECS9999and you want students in your labtest to be able to access the "www.w3schools.com" and "validator.w3.org" web sites during your testthen create /eecs/dept/www/course/9999/labtest/labtest.allow containing:+**Setup With Labtest Assistant** 
 + 
 +From within Labtest Assistantuse the "restrict" command: 
 + 
 +<code> 
 +Labtest (9999) [labtest1]  > restrict add www.w3schools.com 
 + 
 +Restriction www.w3schools.com inserted. 
 + 
 +Labtest (9999) [labtest1]  > restrict add validator.w3.org 
 + 
 +Restriction validator.w3.org inserted. 
 +</code> 
 + 
 +You can use "restrict edit" to edit the restriction list in a text editor, or "restrict list" to list restrictions.  Use "restrict help" for more information on the options that are available. 
 + 
 +**Setup Manually** 
 + 
 +If you are setting your labtest up manually, create a file called "labtest.allow" in your labtest web directory (/eecs/dept/www/course/<COURSE>/labtest/labtest.allow).  Include in this file complete website names that you want students to be able to access during your test, one per line.  For example:
  
 <code> <code>
Line 969: Line 988:
 </code> </code>
  
-Please note that if the web site you are trying to access includes links to other sites that you want to work, or includes files from other sites (eg. css style file or font file), then you may need to add additional entries to your labtest.allow file.  Contact tech for assistance.+**Please note that if the web site you are trying to access includes links to other sites that you want to work, or includes files from other sites (eg. css style file or font file), then you may need to add additional entries to your labtest.allow file.  Contact tech for assistance.**
  
-Labtest also makes it possible to implement partial access to a website.  For example, if you wanted your students to only be able to access https://www.w3schools.com/html during your test (and not the main page https://www.w3schools.com, or https://www.w3schools.com/css, https://www.w3schools.com/jss, etc), then instead of just adding "www.w3schools.com" to your labtest.allow file, you would instead add "www.w3schools.com/html".+Labtest also makes it possible to implement partial access to a website.  For example, if you wanted your students to only be able to access https://www.w3schools.com/html during your test (and not the main page https://www.w3schools.com, or https://www.w3schools.com/css, https://www.w3schools.com/jss, etc), then you set it up like this:
  
-Now, if you try to visit anything but "https://www.w3schools.com/html", you will receive an error: "Access to this URL is blocked.".+**Setup with Labtest Assistant**
  
-However, you will also notice that the page doesn't display properly.  If you look at the page source you will realize that this is because the page is trying to access fonts from "https://www.w3schools.com/lib", and CSS from "https://www.w3schools.com/plus" You can easily add these additional entries to labtest.allow for the site to display properly:+From within Labtest Assistant, use the "restrict" command again: 
 + 
 +<code> 
 +Labtest (9999) [labtest1]  > restrict add www.w3schools.com/html 
 + 
 +Restriction www.w3schools.com/html inserted. 
 + 
 +Labtest (9999) [labtest1]  > restrict list 
 + 
 +     1 www.w3schools.com/html 
 +</code> 
 + 
 +**Setup Manually** 
 + 
 +Add "www.w3schools.com/html" to your labtest.allow file instead of "www.w3schools.com" alone. 
 + 
 +Now, during your labtest, if you try to visit anything but "https://www.w3schools.com/html", you will receive an error: "Access to this URL is blocked."
 + 
 +However, you will also notice that the page doesn't display properly.  If you look at the page source you will realize that this is because the page is trying to access fonts from "https://www.w3schools.com/lib", and CSS from "https://www.w3schools.com/plus" You can easily add these additional entries
 + 
 +**Setup with Labtest Assistant** 
 + 
 +Once again, use the restrict command: 
 + 
 +<code> 
 +Labtest (9999) [labtest1]  > restrict add www.w3schools.com/lib 
 + 
 +Restriction www.w3schools.com/lib inserted. 
 + 
 +Labtest (9999) [labtest1]  > restrict add www.w3schools.com/plus 
 + 
 +Restriction www.w3schools.com/plus inserted. 
 + 
 +Labtest (9999) [labtest1]  > restrict list 
 + 
 +     1 www.w3schools.com/html 
 +     2 www.w3schools.com/lib 
 +     3 www.w3schools.com/plus 
 +</code> 
 + 
 +**Setup Manually** 
 + 
 +Add "www.w3schools.com/lib" and "www.w3schools.com/plus" to labtest.allow.  It will now look like this:
  
 <code> <code>
Line 983: Line 1044:
 </code> </code>
  
-Now, let's say there's a particular URL under https://www.w3schools.com/html that you don't want the student to be able to access (eg. https://www.w3schools.com/html/html_editors.asp).  You could add this reject rule to your labtest.allow file:+Now, let's say there's a particular URL under https://www.w3schools.com/html that you don't want the student to be able to access (eg. https://www.w3schools.com/html/html_editors.asp).  This can easily be handled as well:
  
 +**Setup with Labtest Assistant**
 +
 +Again, use the restrict command:
 <code> <code>
--www.w3schools.com/html/html_editors.asp+Labtest (9999) [labtest1]  > restrict add -www.w3schools.com/html_editor.asp 
 + 
 +Restriction -www.w3schools.com/html_editor.asp inserted. 
 + 
 +Labtest (9999) [labtest1]  > restrict list 
 + 
 +     1 www.w3schools.com/html 
 +     2 www.w3schools.com/lib 
 +     3 www.w3schools.com/plus 
 +     4 -www.w3schools.com/html_editor.asp
 </code> </code>
 +
 +**Setup Manually**
 +
 +Add the following rule to labtest.allow:
 +
 +  -www.w3schools.com/html/html_editors.asp
  
 NOTE: Rejected URL fragments are processed before accepted URL fragments.  Add this rule to the bottom or top of your labtest.allow file, and it will have the same effect. NOTE: Rejected URL fragments are processed before accepted URL fragments.  Add this rule to the bottom or top of your labtest.allow file, and it will have the same effect.
Line 993: Line 1072:
 A few important notes: A few important notes:
  
-1) For every website that students needs to be able to access during labtest, you must specify the website name in the labtest.allow file.  You may include just the website name (in which case all URLs on that site will work), or you may include the URLs on that website that you want to be accessible. +1) For every website that students needs to be able to access during labtest, you must either use "restrict add <site>" in Labtest Assistant to add the restriction, or manually add the restriction to the labtest.allow file.  You may include just the website name (in which case all URLs on that site will work), or you may include the URLs on that website that you want to be accessible. 
  
 2) All external pages are rejected by default. 2) All external pages are rejected by default.
Line 1014: Line 1093:
 In this section, we will configure labtest to provide secure access to an eClass quiz. In this section, we will configure labtest to provide secure access to an eClass quiz.
  
-===== 1.  Allow lab machines to access eClass in labtest mode =====+===== 1.  Allow Lab Machines Limited Access To eClass In Labtest Mode =====
  
-First, you need to allow the lab machines to access eClass in labtest mode.+First, you need to allow the lab machines limited access to eClass in labtest mode.
  
-If you're using Labtest Assistant:+If you're using Labtest Assistant, use the "restrict eclass" command:
  
-  * Use the "restrict eclass" command.+<code> 
 +labtest> restrict eclass 
 +</code>
  
-If you're setting your labtest up manually, you will need to create a labtest.allow file in your labtest directory which includes the allowed URL parts for eClass.  At an absolute minimum this would be:+If you're not using Labtest Assistant, you need to create a labtest.allow file in your labtest directory which includes the allowed URL parts for eClass:
  
-  eclass.yorku.ca+<code> 
 +eclass.yorku.ca/login 
 +eclass.yorku.ca/auth 
 +eclass.yorku.ca/pluginfile.php 
 +eclass.yorku.ca/theme 
 +eclass.yorku.ca/lib 
 +eclass.yorku.ca/local 
 +eclass.yorku.ca/repository 
 +eclass.yorku.ca/course/switchrole.php 
 +dm7crvy4e45rz.cloudfront.net 
 +eclass.yorku.ca/mod/quiz/startattempt.php 
 +eclass.yorku.ca/mod/quiz/attempt.php 
 +eclass.yorku.ca/mod/quiz/processattempt.php 
 +eclass.yorku.ca/mod/quiz/summary.php 
 +eclass.yorku.ca/mod/quiz/review.php 
 +eclass.yorku.ca/mod/quiz/autosave 
 +</code>
  
-If your labtest.allow file only includes "eclass.yorku.ca", then labtest will do the following:+===== 2Determine Your eClass Quiz URL =====
  
-  restrict user access to "Private Files". +Visit your eClass quiz from your machine that is **not** in labtest mode. Grab the quiz URL from the URL bar in your web browser.  The URL will look something like this: https://eclass.yorku.ca/mod/quiz/view.php?id=12345
-  * restrict user access to eClass communications (so they cannot chat with other students).+
  
-However, there are still problems:+You can also get this link in eClass if you go toActivities >> Quizzes then hover your mouse over your quiz.
  
-  * Students will not be able to view images attached to quiz questions because eClass caches these on an external site which hasn't been allowed: dm7crvy4e45rz.cloudfront.net +===== 3Allow Access To Your eClass Quiz ID In Labtest Mode =====
-  * Students would still be able to access eClass pages for any courses to which they are enrolled.+
  
-This labtest.allow file is best for eClass use because it resolves the remaining problems:+If you're using Labtest Assistant, use the following command to allow access your eClass quiz in labtest:
  
-  eclass.yorku.ca/login +<code> 
-  eclass.yorku.ca/auth +labtest> restrict add eclass.yorku.ca/mod/quiz/view.php?id=ID 
-  eclass.yorku.ca/pluginfile.php +</code>
-  eclass.yorku.ca/quiz +
-  -eclass.yorku.ca/mod/quiz/index.php +
-  eclass.yorku.ca/mod/quiz +
-  eclass.yorku.ca/theme +
-  eclass.yorku.ca/lib +
-  eclass.yorku.ca/local +
-  eclass.yorku.ca/repository +
-  eclass.yorku.ca/course/switchrole.php +
-  dm7crvy4e45rz.cloudfront.net+
  
-If you wish to use additional functionality in eClass (other than just quizzes), you may need to add additional URLs to labtest.allow.  For example, to add access to Virtual Programming Lab (VPL), add the following to labtest.allow:+Replace ID with your eClass Quiz ID.
  
-  eclass.yorku.ca/mod/vpl +If you're not using Labtest Assistant, add the following line to the end of your labtest.allow file in your labtest directory: 
-  vpl1.eecs.yorku.ca+ 
 +<code> 
 +eclass.yorku.ca/mod/quiz/view.php?id=ID 
 +</code> 
 +   
 +Replace ID with your eClass Quiz ID.
  
 Ensure that the labtest.allow file is readable: <code>chmod 644 /eecs/dept/www/course/COURSE/labtest/labtest.allow</code> Ensure that the labtest.allow file is readable: <code>chmod 644 /eecs/dept/www/course/COURSE/labtest/labtest.allow</code>
  
-===== 2. Provide a Link to Your eClass Quiz in Your Labtest Start Page =====+===== 4. Provide a Link to Your eClass Quiz in Your Labtest Start Page =====
  
-Your labtest start page (eg. /eecs/dept/www/course/<COURSE>/labtest/index.html) (or a PDF that your start page refers to) **must** include a direct link to your specific eclass quiz.  It will look something like this: https://eclass.yorku.ca/mod/quiz/view.php?id=XXXX  You can get this link in eClass if you go to: Activities >> Quizzes  then hover your mouse over your quiz, or, if you click on the quiz to start it, you can copy and paste the URL from your browser+Your labtest start page (eg. /eecs/dept/www/course/<COURSE>/labtest/index.html) (or a PDF that your start page refers to) **must** include a direct link to your specific eclass quiz. You found this URL in step 2.
  
-If you're using Labtest Assistant, open your labtest start page using the "gedit" (GUI editor) or "edit" (text editor) commands.+If you're using Labtest Assistant, open your labtest start page using the "gedit" (GUI editor) or "edit" (text editor) commands and add a link to your eClass quiz on the page For example: 
 + 
 +<code> 
 +Click <a href="https://eclass.yorku.ca/mod/quiz/view.php?id=12345">here</a> to take the quiz. 
 +</code>
  
 If you're not using Labtest Assistant, open the index.html file in your labtest directory, and add the link manually. If you're not using Labtest Assistant, open the index.html file in your labtest directory, and add the link manually.
Line 1068: Line 1163:
 **IMPORTANT** If students try to access "https://eclass.yorku.ca" in their web browser during your labtest, **they will be blocked**.  Students can **only** visit your quiz by clicking on the link to the quiz from your labtest start page.  **IMPORTANT** If students try to access "https://eclass.yorku.ca" in their web browser during your labtest, **they will be blocked**.  Students can **only** visit your quiz by clicking on the link to the quiz from your labtest start page. 
  
-===== 3. Restrict IP Addresses Which Can Access Your Quiz From Within eClass =====+===== 5. Restrict IP Addresses Which Can Access Your eClass Quiz From Within eClass =====
  
 Login to eClass.  Restrict access to your eClass quiz to the IP addresses of the lab machines where the students will be writing the quiz.  If you don't do this, even though your in-lab students will be limited in the proper way, students who are outside of the lab would also be able to write your quiz.  Go to: Activities >> Quizzes >> Settings >> Extra restriction on attempts >> Show more... >> Require network address.  Please copy and paste the specific address list below: Login to eClass.  Restrict access to your eClass quiz to the IP addresses of the lab machines where the students will be writing the quiz.  If you don't do this, even though your in-lab students will be limited in the proper way, students who are outside of the lab would also be able to write your quiz.  Go to: Activities >> Quizzes >> Settings >> Extra restriction on attempts >> Show more... >> Require network address.  Please copy and paste the specific address list below:
Line 1088: Line 1183:
   * If your test is being conducted in several labs, you can join two IP ranges with a comma in between them.  Note though that if the number of IP ranges separated by commas exceeds 18, the IP restrictions will not function correctly due to an eClass bug.  Please consult with tech to test your IP range prior to your test.   * If your test is being conducted in several labs, you can join two IP ranges with a comma in between them.  Note though that if the number of IP ranges separated by commas exceeds 18, the IP restrictions will not function correctly due to an eClass bug.  Please consult with tech to test your IP range prior to your test.
  
-===== 4. Limit the Start and End Time of Your Quiz in eClass =====+===== 6. Limit the Start and End Time of Your Quiz in eClass =====
  
 You will need to limit the start and end time of your quiz in eClass.  If you don't do this, then students on the lab machines will be able to access your quiz **before** your labtest!  Go to: Activities >> Quizzes >> Settings >> Timing and configure the "Open the quiz" and "Close the quiz" times.  Note that if students try to access the quiz before the open time, they will be denied because eclass will try to redirect them back to the course eclass page which has been blocked.  They should try again at the start time of your test. You will need to limit the start and end time of your quiz in eClass.  If you don't do this, then students on the lab machines will be able to access your quiz **before** your labtest!  Go to: Activities >> Quizzes >> Settings >> Timing and configure the "Open the quiz" and "Close the quiz" times.  Note that if students try to access the quiz before the open time, they will be denied because eclass will try to redirect them back to the course eclass page which has been blocked.  They should try again at the start time of your test.
Line 1095: Line 1190:
  
   * Some faculty would like to use eClass "assignment" in labtest. Note that eClass assignments do not permit IP address restriction.  A quiz with 1 question can replace an "assignment".   * Some faculty would like to use eClass "assignment" in labtest. Note that eClass assignments do not permit IP address restriction.  A quiz with 1 question can replace an "assignment".
 +  * If you're using VPL, you'll need to allow access to the following URL fragments with either "restrict add" in Labtest Assistant, or manually in your labtest.allow file:
 +    * eclass.yorku.ca/mod/vpl/view.php?id=ID
 +    * vpl1.eecs.yorku.ca
   * **Always test your eClass quiz using ltcloud!  Don't assume that just because it works fine from your unrestricted PC that it will work fine in labtest. Ensuring that your quiz works in ltcloud will guarantee an improved experience in your test session. **   * **Always test your eClass quiz using ltcloud!  Don't assume that just because it works fine from your unrestricted PC that it will work fine in labtest. Ensuring that your quiz works in ltcloud will guarantee an improved experience in your test session. **
  
Line 1484: Line 1582:
 Access the Labtest Cloud URL here: Access the Labtest Cloud URL here:
  
-  * https://webapp.eecs.yorku.ca/ltcloud?id=<your labtest ID>+  * https://webapp.eecs.yorku.ca/ltcloud 
 + 
 +The best way to access ltcloud is directly from a web browser when you are connected to [[https://remotelab.eecs.yorku.ca|EECS Remotelab]]. 
 +If you want to access LTCloud directly from your home PC, you can use [[https://www.yorku.ca/uit/faculty-and-staff-services/internet-access/#vpn|York VPN]].
  
-Note that if you are accessing this URL from a non-EECS IP address (such as from home), you must be connected to [[https://staff.computing.yorku.ca/internet-access/secure-remote-access/|York VPN]] in order to to use the service. 
-  
 After connecting to the Labtest Cloud URL, you will be required to authenticate with your EECS username and password.  After you successfully authenticate, the system will take about 10 seconds to setup your Labtest Cloud instance.  Click on the "Connect to Labtest Cloud" button, and, right from your web browser, you'll be connected to a virtual system running labtest!  You will be logged in as "ltstu" (labtest student) which is a ugrad account.  Testing as a student is the best way to test your labtest. After connecting to the Labtest Cloud URL, you will be required to authenticate with your EECS username and password.  After you successfully authenticate, the system will take about 10 seconds to setup your Labtest Cloud instance.  Click on the "Connect to Labtest Cloud" button, and, right from your web browser, you'll be connected to a virtual system running labtest!  You will be logged in as "ltstu" (labtest student) which is a ugrad account.  Testing as a student is the best way to test your labtest.
  
services/labtest/start.1737996888.txt.gz · Last modified: 2025/01/27 11:54 by jas

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki