User Tools

Site Tools


services:labtest:laptop

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
Last revisionBoth sides next revision
services:labtest:laptop [2017/07/14 10:11] jasservices:labtest:laptop [2018/09/04 14:00] seela
Line 6: Line 6:
  
 In order to place laptops into labtest mode, faculty must provide various [[services:labtest:requesting|information]] to tech. In order to place laptops into labtest mode, faculty must provide various [[services:labtest:requesting|information]] to tech.
 +** Laptop labtest was only handled in William Small center
 +In order to place a laptop in labtest mode, they must be connnected to
 +the wired network** \\
 +**__As of September 2018__**, laptops are replaced by desktops with linux running 
 +on the native box. 
 +You will know when the desktop goes into labtest mode because you will have to click OK 
 +for labtest mode
 +Tech will create the schedule adding the desktops for 106/108 WSC
  
-View the current lab booking schedule [[http://www.eecs.yorku.ca/tdb/_doc.php/userg/c_labs/prism/pcmode-schedule.html|here]]. 
  
-Please contact tech as soon as possible to schedule your labtest sessions or if there is a discrepancy in your scheduled test.+ 
 + 
 +View the current lab booking schedule [[http://www.eecs.yorku.ca/schedule/pcmode/|here]]. 
 + 
 +Please contact tech as soon as possible to schedule your laptop labtest sessions or if there is a discrepancy in your scheduled test.
  
 ===== Setting Up Your Labtest ===== ===== Setting Up Your Labtest =====
  
 +Create a top level directory to host your web files:
 +  % mkdir /eecs/dept/www/course/<course number>
 +Make the permissions group and world readeable,executable
 +  % chmod 755 /eecs/dept/www/course/<course number>
 + 
 Create a "labtest" directory inside your course web directory: Create a "labtest" directory inside your course web directory:
   % mkdir /eecs/dept/www/course/9999/labtest   % mkdir /eecs/dept/www/course/9999/labtest
Line 19: Line 35:
   % chgrp labtest /eecs/dept/www/course/9999/labtest   % chgrp labtest /eecs/dept/www/course/9999/labtest
  
-Makes sure nobody can access your labtest folder while you work on preparing it:+Makes sure that nobody but you can access your labtest directory while you are preparing it:
   % chmod 700 /eecs/dept/www/course/9999/labtest   % chmod 700 /eecs/dept/www/course/9999/labtest
  
-Place files in your labtest folder which will be viewable by students in labtest mode. You can use HTML, CGI, PHP, and more.+Place files in your labtest directory which will be viewable by students in labtest mode. You can use HTML, CGI, PHP, and more.   
 + 
 +**WARNING:** Students will only be able to view your labtest page via the web when they are on a laptop that is in labtest mode.  However, if you don't secure the permission on the labtest web directory, students who have access to EECS infrastructure will still be able to view your page by visiting your course web directory from the command line.
  
 ===== Authentication in Labtest ===== ===== Authentication in Labtest =====
  
-Students will only be able to view your labtest web page from a laptop that is in labtest mode.  However, by default, students will not need to authenticate to view the page.  You may wish to require students to authenticate via Passport York or EECS login as follows:+Students will view your labtest page from a web browser on a laptop that is in labtest mode.  By default, students will not need to authenticate to view the test page.  You may wish to require students to authenticate via Passport York or EECS account as follows:
  
 == Passport York Authentication == == Passport York Authentication ==
  
-In order to authenticate students via Passport York login, Create a //.htaccess// file in the labtest web directory containing:<code>+In order to authenticate students via Passport York account, Create a //.htaccess// file in the labtest web directory containing:<code>
 AuthType Basic AuthType Basic
 AuthName "EECS Laptop Labtest" <- can be whatever you like AuthName "EECS Laptop Labtest" <- can be whatever you like
 AuthType PYork AuthType PYork
 Require valid-user Require valid-user
-PYorkAllowEveryone on 
 PYorkAppID "eecs-labtest" PYorkAppID "eecs-labtest"
 Require valid-user Require valid-user
Line 43: Line 60:
   % chmod 644 /eecs/dept/www/course/9999/labtest/.htaccess   % chmod 644 /eecs/dept/www/course/9999/labtest/.htaccess
  
-The Passport York module passes additional variables which can be used by custom scripts including: +If you authenticate students via their Passport York account, when they go to submit using web submit, they won't have to login again!
-  +
-  * HTTP_PYORK_VERSION - PassportYork version +
-  * HTTP_PYORK_USER - PassportYork username +
-  * HTTP_PYORK_SESSION_ID - PassportYork session ID +
-  * HTTP_PYORK_CYIN - student number/employee number +
-  * HTTP_PYORK_FIRSTNAME - first name +
-  * HTTP_PYORK_SURNAME - surname +
-  * HTTP_PYORK_EMAIL - email +
- +
-**NOTE:** If you authenticate students via their Passport York account, when they go to submit using web submit, they won't have to login again!+
  
 == EECS Authentication == == EECS Authentication ==
Line 64: Line 71:
 Require valid-user Require valid-user
 </code> </code>
- 
-**WARNING:** Students will only be able to view your labtest page via the web when they are on a laptop that is in labtest mode.  However, if you don't secure the permission on the labtest web folder, students who have access to EECS infrastructure will still be able to view your page by visiting /eecs/dept/www/course/XXXX/labtest directly. 
  
 ===== Securing Your Labtest ===== ===== Securing Your Labtest =====
Line 74: Line 79:
 To disable your labtest, run "ltdisable": To disable your labtest, run "ltdisable":
   % ltdisable /eecs/dept/www/course/9999/labtest   % ltdisable /eecs/dept/www/course/9999/labtest
 +
 +===== Submission During Labtest =====
 +
 +During labtest, students will be able to submit files using [[services:submit:websubmit]].  For additional configuration information on Web Submit, see [[services:submit:websubmit-setup|here]].  In short, you can include a link to your submission page from your labtest start page.  It will look something like this:
 +
 +  * https://webapp.eecs.yorku.ca?acadyear=2017-18&term=W&course=9999&assignment=a2
 +
 +(You can add "&ppy" to the end if you want Passport York authentication selected by default.)
  
 ===== Setting Up A Submit Directory ===== ===== Setting Up A Submit Directory =====
Line 83: Line 96:
   % chmod 755 /eecs/dept/course/9999/submit   % chmod 755 /eecs/dept/course/9999/submit
  
-Create a directory to accept permissions for your lab:+Create a directory to accept submissions for your labtest:
   % mkdir /eecs/dept/course/9999/submit/lab1   % mkdir /eecs/dept/course/9999/submit/lab1
  
Line 97: Line 110:
 For additional information on submit including options to enable/disable previews, logging, and custom IP address limits, please refer to [[services:submit:websubmit-setup|this]] page. For additional information on submit including options to enable/disable previews, logging, and custom IP address limits, please refer to [[services:submit:websubmit-setup|this]] page.
  
-===== Allowing Access to Previously Submitted Data In A Labtest =====+===== Access to Previously Submitted Data In A Labtest =====
  
-From time to time, you may wish to allow students in labtest mode to access previously submitted content from outside labtest mode.  In order to make this happen, all you need to do is change the group of the submit assignment directory from submit (non-labtest mode) to labtest, and remove write permission.  Now, during your labtest, students will be able to view the contents of their previous submission.+From time to time, you may wish to allow students in labtest mode to access previously submitted content from outside labtest mode.  In order to make this happen, all you need to do is change the group of the submit assignment directory from submit to labtest, and remove write permission.  Now, during your labtest, students will be able to view the content of their previous submission.
  
 For example: For example:
-  % chgrp -R labtest /eecs/course/9999/submit/A +  % chgrp -R labtest /eecs/course/9999/submit/a1 
-  % chmod 750 /eecs/course/9999/submit/A+  % chmod 750 /eecs/course/9999/submit/a1
  
 ===== Labtest Account Customization ===== ===== Labtest Account Customization =====
  
-Sometimes, your labtest may require students to download and unarchive files, or run a set of commands prior to your test.  This introduces avenues for trouble if the students don't follow your instructions properly.  Laptop labtest allows you to provide a folder of files that will be copied down to the laptop.  In addition, it allows you to specify a shell script that can run on the laptop to process the files (eg. unzip an archive into the right folder), or to run additional commands.+Your labtest may require students to download and unarchive files, or run a set of commands before they can start working.  This may introduce problems in your test if students don't follow your instructions carefully.  You can provide a directory of files in your labtest directory that will be copied to the laptop.  In addition, you can optionally write a shell script that will run on the laptop which can do various initialization including unarchiving files to the proper directory, or running additional setup commands. This simplifies the labtest initialization process for students, making sure that everyone starts off with exactly the same environment.
  
-Create a folder for labtest initialization in your course web folder:+Create a directory for labtest initialization in your course web directory:
   % mkdir /eecs/dept/www/course/9999/labtest/ltinit   % mkdir /eecs/dept/www/course/9999/labtest/ltinit
  
-Copy files into this folder.  Your files must be readable by group labtest.+Since your labtest directory should already restrict access to group labtest only, the ltinit directory can be completely open: 
 +  % chmod 755 /eecs/dept/www/course/9999/labtest/ltinit
  
-Create a custom shell script called "labtest.sh" in this folder.  This file will be downloaded by the laptop, and executed on the account.+Copy files into the ltinit directory:  
 +  % cp ~/l1/ltinit/* /eecs/dept/www/course/9999/labtest/ltinit 
 +  % chmod 644 /eecs/dept/www/course/9999/labtest/ltinit/*
  
-You **must** include //.htaccess// file in the ltinit folder as follows:+You can optionally create a custom shell script called "labtest.sh" in the ltinit directory.  This file will be downloaded by the laptop, and executed.  For example, labtest.sh might contain:<code> 
 +#!/bin/sh 
 + 
 +mkdir ~/a1 
 +cp ~/ltinit/a1/a1.java ~ltinit/a1  
 +</code> 
 + 
 +Makes sure that labtest.sh is readable. When the file is downloaded, it will be automatically made executable before it is run: 
 + 
 +  % chmod 644 /eecs/dept/www/course/9999/labtest/ltinit/labtest.sh 
 + 
 + 
 +You **must** include an //.htaccess// file in the ltinit directory as follows, or the laptop will not be able to download the files:
   % echo "Require all granted" > /eecs/dept/www/course/9999/labtest/ltinit/.htaccess   % echo "Require all granted" > /eecs/dept/www/course/9999/labtest/ltinit/.htaccess
   % chmod 644 /eecs/dept/www/course/9999/labtest/ltinit/.htaccess   % chmod 644 /eecs/dept/www/course/9999/labtest/ltinit/.htaccess
Line 126: Line 154:
 ===== On The Day of Your Labtest ===== ===== On The Day of Your Labtest =====
  
-At the time of your labtest, a system process will enable te laptops that you've booked to go into labtest mode.  Unlike desktop labtest mode, the laptops will **not** go into labtest mode automatically.  Instead, you or your TA will need to **manually** boot the laptops.  As part of securing the laptop into labtest mode, in the middle of the boot sequence, the laptop will reboot again.  After booting, it will display a message: "Labtest mode is now active" Only then can you be assured  that the machine is in labtest mode.  At this time, there is no other indication that a laptop is in labtest mode.  **In between tests, the machines will also need to be rebooted to return them to a clear state.**+At the time of your labtest, a system process will enable the laptops that you've booked to go into labtest mode.  Unlike desktop labtest mode, the laptops will **not** go into labtest mode automatically.  Instead, you or your TA will need to **manually** boot the laptops.  As part of securing the laptop into labtest mode, in the middle of the boot sequence, the laptop will reboot a second time.  After booting, it will display a message: "Labtest mode is now active" Only then can you be assured that the machine is in labtest mode.  At this time, there is no other indication that a laptop is in labtest mode.  **In between tests, the laptops will need to be rebooted manually to return them to a clear state.**
  
-Since EECS laptops don't mount /eecs from our file server, the student laptop does not have direct access to /eecs/dept/www to display the labtest question. As a result, a web server, labtest.eecs.yorku.ca serves your labtest page to the student.+Since EECS laptops don't mount /eecs from our file server, the laptop does not have access to /eecs/dept/www or /eecs/course As a result, a web server, labtest.eecs.yorku.ca serves your labtest page to the student.
  
-Students should start the eecs-vbox-common-lab virtual machine, and then start Firefox to get the test question.  The labtest start page will be displayed - https://labtest.eecs.yorku.ca where the student can read a standard Labtest disclaimer, then click on a "Start Lab Test" link which directs the student to the content from your labtest This link will look like: https://labtest.eecs.yorku.ca/host/<hostname>student on one laptop can't view the host link from a different laptop.  When the student is directed to your test, they will be prompted for authentication if you've enabled that feature.  If you try to view the labtest web page from a machine that is not in labtest mode, an error will be displayed: "Please visit this site when your computer is in labtest mode.".+Students should start the eecs-vbox-common-lab virtual machine, and then start Firefox which will display the labtest start page - https://labtest.eecs.yorku.ca.  The start page includes the standard Labtest disclaimer, then has link at the bottom: "Start Lab Test". This link will look like: https://labtest.eecs.yorku.ca/host/<hostname> The student clicks on the link, and is directed to your labtest page.  If the student tries to visit the labtest page from a machine not in labtest mode, the following message will be displayed:  "Please visit this site when your computer is in labtest mode.".  Note that if the student tries to visit the labtest start page for another host, access will be denied.
  
 In order to submit files, the student should visit: https://labtest.eecs.yorku.ca/submit In order to submit files, the student should visit: https://labtest.eecs.yorku.ca/submit
-Please make sure that your submit folder is writable by group labtest, or students will be unable to submit.+Please make sure that your submit directory is writable by group labtest, or students will be unable to submit.
  
-During labtest mode, the laptops networking is severely restricted.  Access to any web resources will be redirected back to the labtest start page.+During labtest mode, the laptop networking is severely restricted.  Access to any web resources will be redirected back to the labtest start page.
  
-At the end of your labtest, a system process will disable the laptops from entering labtest mode, but you or your TA must reboot the laptops connected to the wired network in order to make the laptop go back to labtest mode.  If a laptop is returned to the lab monitor without being set back to linux mode, then a student will not be able to use that laptop again until it is connected to the wired network, and booted one time.+At the end of your labtest, a system process will disable the laptops from entering labtest mode, but you or your TA must reboot the laptops connected to the wired network in order to make them go back to standard Linux mode.  If a laptop is returned to the lab monitor without being set back to linux mode, then the laptop will remain in labtest mode until it is connected to a **wired** network drop on a VLAN managed by EECS.
  
 ===== Application Notes ===== ===== Application Notes =====
Line 143: Line 171:
 This section will include notes on user experiences using different applications in labtest mode. This section will include notes on user experiences using different applications in labtest mode.
  
-  * Android Studio was not happy about working in offline/labtest mode. However, Android Studio does have an “offline” mode. To enable it, you have to start Android Studio, choose “configure”, then settings, then search for “gradle” (or go to “Build, Execution, Deployment” and choose “Build Tools”, then “gradle”). Then check off “Offline work”. You have to create a new project, and built it one time. You then have to capture the complete .AndroidStudio2.1, .gradle, and AndroidStudioProjects/<project> directory, and give that to the students during the test.  If  they write a main method or use junit, Android Studio does not build it and hence they cannot test their code.  You may want to include a simple test (main method of junit) and build the project before creating the archive.+  * Android Studio was not happy about working in offline/labtest mode. However, Android Studio does have an “offline” mode. To enable it, you have to start Android Studio, choose “configure”, then settings, then search for “gradle” (or go to “Build, Execution, Deployment” and choose “Build Tools”, then “gradle”). Then check off “Offline work”. You have to create a new project, and built it one time. You then have to capture the complete .AndroidStudio2.1, .gradle, and AndroidStudioProjects/<project> directory, and give that to the students during the test. If  they write a main method or use junit, Android Studio does not build it and hence they cannot test their code.  You may want to include a simple test (main method of junit) and build the project before creating the archive.
            
 ===== Other Information ===== ===== Other Information =====
Line 150: Line 178:
   * Students must save and submit files **frequently** throughout the test to avoid loss in the event of machine failure or human error.  Should a machine lock up during the test, and the machine needs to be rebooted, the student will lose their files.   * Students must save and submit files **frequently** throughout the test to avoid loss in the event of machine failure or human error.  Should a machine lock up during the test, and the machine needs to be rebooted, the student will lose their files.
   * At the end of the test, close the permission on the submit directory so that it is no longer readable and writable by group labtest.   * At the end of the test, close the permission on the submit directory so that it is no longer readable and writable by group labtest.
-  * If a student visits the labtest start page from the host O/S, and not the VM, then, when they go to submit their files, they won't see any of the files that they've worked on. Instead, they'll see the empty home directory from the host O/S. +  * If a student visits the labtest start page from the host O/S, and not the VM, then, when they go to submit their files, they won't see any of the files that they've worked on. Instead, they'll see the empty home directory from the host O/S.  Simply ask the student to close Firefox on the host O/S, and open it in the VM
-Since pcmode does not communicate with machines, it will not reboot them at the end of the test or inform that the test is coming to close. However, you can inform the students verbally, and close the submit directory+  * Items in regular labtest that do NOT appear in laptop labtest: automatic rebooting of laptops, automatic warnings at the end of the test, SecureQ (it's available and does work, but is impossible if the laptops are laid out randomly), and labtest file synchronization 
-  * Items in regular labtest that do NOT appear in laptop labtest: automatic rebooting of laptops, automatic warnings at the end of the test, SecureQ (it's available, but is impossible if the laptops are laid out randomly), and labtest file synchronization +  * In your test page, a web link to "/common" will point to the equivalent of https://www.eecs.yorku.ca/teaching/common.  These resources will be accessible during labtest. 
-    + 
 +====== Laptop Labtest FAQ ====== 
 + 
 +== How can I test my labtest? == 
 + 
 +  - Borrow a laptop from the PRISM Lab (LAS1006).   
 +  - Let tech know the name of the laptop that you've borrowed, and where you will be running the test.  The laptop will need an IP address on the subnet where you will be doing the testing, and will need to be placed into labtest mode by tech. 
 +  - Connect the laptop to the network with an Ethernet cable, and turn it on.  The laptop should report that it's in labtest mode. 
 + 
 +== How can students access additional resources like Java API, etc. during labtest mode? == 
 + 
 +The same set of resources that is available outside labtest mode here: https://www.eecs.yorku.ca/teaching/common is available in labtest mode if you include a link in your web page to "/common"