<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ycheng15</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ycheng15"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Ycheng15"/>
	<updated>2026-10-15T16:08:27Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105470</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105470"/>
		<updated>2016-11-12T19:33:52Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a newly developed browser by Mozilla and the source code of Servo is written in the Rust programming language&amp;lt;ref&amp;gt;https://doc.rust-lang.org/book/&amp;lt;/ref&amp;gt;, which is a system level programming language. The advantages of Rust language are preventing segfaults and thread safety. This project implements form validation feature to the Servo using Rust language.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The [https://github.com/servo/servo/wiki/Form-validation-student-project issue] we are working on is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Form-validation-student-project&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Example'''===&lt;br /&gt;
It is important to take security seriously when building the web application, especially trying to collect data from users. For example, in an email input field, the user might enter the wrong email address or incorrect email format, there should be certain notifications to remind user to change the input accordingly. The same mechanism should also be applied to radio button, multi choice button, text input, etc. In this project, we will implement such validation steps for the HTML5 “validatable” elements.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;email&amp;quot; value=&amp;quot;&amp;quot; placeholder=&amp;quot;name@email.com&amp;quot; required /&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Submit&amp;quot; /&amp;gt; &lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following pictures show different kinds of errors when input email address is not the correct form.&lt;br /&gt;
&lt;br /&gt;
1. Wrong position of '.'&lt;br /&gt;
&lt;br /&gt;
[[File:1error.png]]&lt;br /&gt;
&lt;br /&gt;
2. Missing @&lt;br /&gt;
&lt;br /&gt;
[[File:2error.png]]&lt;br /&gt;
&lt;br /&gt;
3. Missing part after @&lt;br /&gt;
&lt;br /&gt;
[[File:3error.png]]&lt;br /&gt;
&lt;br /&gt;
4. Null input&lt;br /&gt;
&lt;br /&gt;
[[File:4error.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
&lt;br /&gt;
[[File:5.png]]&lt;br /&gt;
&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
&lt;br /&gt;
===Validation Workflow===&lt;br /&gt;
&lt;br /&gt;
The following is a flow chart that depicts the flow of code once the form is submitted and the validation begins - &lt;br /&gt;
&lt;br /&gt;
[[File:OSSimg.png]]&lt;br /&gt;
&lt;br /&gt;
===UML Class Diagram===&lt;br /&gt;
Following is the class diagram of the class which are involved in this project. For readability purpose few details are omitted. Only relevant information is captured in this diagram&lt;br /&gt;
[[File:Servo_Class.png]]&lt;br /&gt;
&amp;lt;ref&amp;gt;http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2016_M1601_Implement_HTML5_form_validation&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
*servo/components/script/dom/validitystate.rs&lt;br /&gt;
*servo/components/script/dom/validitation.rs&lt;br /&gt;
*servo/components/script/dom/htmlformelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlinputelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlbuttonelements.rs&lt;br /&gt;
*servo/components/script/dom/htmltextareaelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlselectelements.rs&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
At this stage, the project can't be tested from UI. There are still some subsequent steps to be implemented after this.&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
  ./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:5.png&amp;diff=105469</id>
		<title>File:5.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:5.png&amp;diff=105469"/>
		<updated>2016-11-12T19:32:59Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: uploaded a new version of &amp;amp;quot;File:5.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105468</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105468"/>
		<updated>2016-11-12T19:11:52Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a newly developed browser by Mozilla and the source code of Servo is written in the Rust programming language&amp;lt;ref&amp;gt;https://doc.rust-lang.org/book/&amp;lt;/ref&amp;gt;, which is a system level programming language. The advantages of Rust language are preventing segfaults and thread safety. This project implements form validation feature to the Servo using Rust language.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The [https://github.com/servo/servo/wiki/Form-validation-student-project issue] we are working on is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Form-validation-student-project&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Example'''===&lt;br /&gt;
It is important to take security seriously when building the web application, especially trying to collect data from users. For example, in an email input field, the user might enter the wrong email address or incorrect email format, there should be certain notifications to remind user to change the input accordingly. The same mechanism should also be applied to radio button, multi choice button, text input, etc. In this project, we will implement such validation steps for the HTML5 “validatable” elements.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;email&amp;quot; value=&amp;quot;&amp;quot; placeholder=&amp;quot;name@email.com&amp;quot; required /&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Submit&amp;quot; /&amp;gt; &lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following pictures show different kinds of errors when input email address is not the correct form.&lt;br /&gt;
&lt;br /&gt;
1. Wrong position of '.'&lt;br /&gt;
&lt;br /&gt;
[[File:1error.png]]&lt;br /&gt;
&lt;br /&gt;
2. Missing @&lt;br /&gt;
&lt;br /&gt;
[[File:2error.png]]&lt;br /&gt;
&lt;br /&gt;
3. Missing part after @&lt;br /&gt;
&lt;br /&gt;
[[File:3error.png]]&lt;br /&gt;
&lt;br /&gt;
4. Null input&lt;br /&gt;
&lt;br /&gt;
[[File:4error.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
&lt;br /&gt;
===Validation Workflow===&lt;br /&gt;
&lt;br /&gt;
The following is a flow chart that depicts the flow of code once the form is submitted and the validation begins - &lt;br /&gt;
&lt;br /&gt;
[[File:OSSimg.png]]&lt;br /&gt;
&lt;br /&gt;
===UML Class Diagram===&lt;br /&gt;
Following is the class diagram of the class which are involved in this project. For readability purpose few details are omitted. Only relevant information is captured in this diagram&lt;br /&gt;
[[File:Servo_Class.png]]&lt;br /&gt;
&amp;lt;ref&amp;gt;http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2016_M1601_Implement_HTML5_form_validation&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
*servo/components/script/dom/validitystate.rs&lt;br /&gt;
*servo/components/script/dom/validitation.rs&lt;br /&gt;
*servo/components/script/dom/htmlformelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlinputelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlbuttonelements.rs&lt;br /&gt;
*servo/components/script/dom/htmltextareaelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlselectelements.rs&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
At this stage, the project can't be tested from UI. There are still some subsequent steps to be implemented after this.&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
  ./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105467</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105467"/>
		<updated>2016-11-12T19:09:51Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a newly developed browser by Mozilla and the source code of Servo is written in the Rust programming language&amp;lt;ref&amp;gt;https://doc.rust-lang.org/book/&amp;lt;/ref&amp;gt;, which is a system level programming language. The advantages of Rust language are preventing segfaults and thread safety. This project implements form validation feature to the Servo using Rust language.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The [https://github.com/servo/servo/wiki/Form-validation-student-project issue] we are working on is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Form-validation-student-project&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Example'''===&lt;br /&gt;
It is important to take security seriously when building the web application, especially trying to collect data from users. For example, in an email input field, the user might enter the wrong email address or incorrect email format, there should be certain notifications to remind user to change the input accordingly. The same mechanism should also be applied to radio button, multi choice button, text input, etc. In this project, we will implement such validation steps for the HTML5 “validatable” elements.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;email&amp;quot; value=&amp;quot;&amp;quot; placeholder=&amp;quot;name@email.com&amp;quot; required /&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Submit&amp;quot; /&amp;gt; &lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following pictures show different kinds of errors when input email address is not the correct form.&lt;br /&gt;
[[File:1error.png]]&lt;br /&gt;
[[File:2error.png]]&lt;br /&gt;
[[File:3error.png]]&lt;br /&gt;
[[File:4error.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
&lt;br /&gt;
===Validation Workflow===&lt;br /&gt;
&lt;br /&gt;
The following is a flow chart that depicts the flow of code once the form is submitted and the validation begins - &lt;br /&gt;
&lt;br /&gt;
[[File:OSSimg.png]]&lt;br /&gt;
&lt;br /&gt;
===UML Class Diagram===&lt;br /&gt;
Following is the class diagram of the class which are involved in this project. For readability purpose few details are omitted. Only relevant information is captured in this diagram&lt;br /&gt;
[[File:Servo_Class.png]]&lt;br /&gt;
&amp;lt;ref&amp;gt;http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2016_M1601_Implement_HTML5_form_validation&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
*servo/components/script/dom/validitystate.rs&lt;br /&gt;
*servo/components/script/dom/validitation.rs&lt;br /&gt;
*servo/components/script/dom/htmlformelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlinputelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlbuttonelements.rs&lt;br /&gt;
*servo/components/script/dom/htmltextareaelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlselectelements.rs&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
At this stage, the project can't be tested from UI. There are still some subsequent steps to be implemented after this.&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
  ./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:4error.png&amp;diff=105466</id>
		<title>File:4error.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:4error.png&amp;diff=105466"/>
		<updated>2016-11-12T19:06:40Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:3error.png&amp;diff=105465</id>
		<title>File:3error.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:3error.png&amp;diff=105465"/>
		<updated>2016-11-12T19:05:37Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:2error.png&amp;diff=105464</id>
		<title>File:2error.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:2error.png&amp;diff=105464"/>
		<updated>2016-11-12T19:05:25Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:1error.png&amp;diff=105463</id>
		<title>File:1error.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:1error.png&amp;diff=105463"/>
		<updated>2016-11-12T19:05:11Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105448</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105448"/>
		<updated>2016-11-11T22:28:32Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a newly developed browser by Mozilla and the source code of Servo is written in the Rust programming language&amp;lt;ref&amp;gt;https://doc.rust-lang.org/book/&amp;lt;/ref&amp;gt;, which is a system level programming language. The advantages of Rust language are preventing segfaults and thread safety. This project implements form validation feature to the Servo using Rust language.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The [https://github.com/servo/servo/wiki/Form-validation-student-project issue] we are working on is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Form-validation-student-project&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Example'''===&lt;br /&gt;
It is important to take security seriously when building the web application, especially trying to collect data from users. For example, in an email input field, the user might enter the wrong email address or incorrect email format, there should be certain notifications to remind user to change the input accordingly. The same mechanism should also be applied to radio button, multi choice button, text input, etc. In this project, we will implement such validation steps for the HTML5 “validatable” elements.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;email&amp;quot; value=&amp;quot;&amp;quot; placeholder=&amp;quot;name@email.com&amp;quot; required /&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Submit&amp;quot; /&amp;gt; &lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following pictures show different kinds of errors when input email address is not the correct form.&lt;br /&gt;
[[File:1.png]]&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
&lt;br /&gt;
===Validation Workflow===&lt;br /&gt;
&lt;br /&gt;
The following is a flow chart that depicts the flow of code once the form is submitted and the validation begins - &lt;br /&gt;
&lt;br /&gt;
[[File:OSSimg.png]]&lt;br /&gt;
&lt;br /&gt;
===UML Class Diagram===&lt;br /&gt;
Following is the class diagram of the class which are involved in this project. For readability purpose few details are omitted. Only relevant information is captured in this diagram&lt;br /&gt;
[[File:Servo_Class.png]]&lt;br /&gt;
&amp;lt;ref&amp;gt;http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2016_M1601_Implement_HTML5_form_validation&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
*servo/components/script/dom/validitystate.rs&lt;br /&gt;
*servo/components/script/dom/validitation.rs&lt;br /&gt;
*servo/components/script/dom/htmlformelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlinputelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlbuttonelements.rs&lt;br /&gt;
*servo/components/script/dom/htmltextareaelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlselectelements.rs&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
At this stage, the project can't be tested from UI. There are still some subsequent steps to be implemented after this.&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
  ./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105447</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105447"/>
		<updated>2016-11-11T22:27:09Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a newly developed browser by Mozilla and the source code of Servo is written in the Rust programming language&amp;lt;ref&amp;gt;https://doc.rust-lang.org/book/&amp;lt;/ref&amp;gt;, which is a system level programming language. The advantages of Rust language are preventing segfaults and thread safety. This project implements form validation feature to the Servo using Rust language.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The [https://github.com/servo/servo/wiki/Form-validation-student-project issue] we are working on is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Form-validation-student-project&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Example'''===&lt;br /&gt;
It is important to take security seriously when building the web application, especially trying to collect data from users. For example, in an email input field, the user might enter the wrong email address or incorrect email format, there should be certain notifications to remind user to change the input accordingly. The same mechanism should also be applied to radio button, multi choice button, text input, etc. In this project, we will implement such validation steps for the HTML5 “validatable” elements.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;email&amp;quot; value=&amp;quot;&amp;quot; placeholder=&amp;quot;name@email.com&amp;quot; required /&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Submit&amp;quot; /&amp;gt; &lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following pictures show different kinds of errors when input email address is not the correct form.&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
&lt;br /&gt;
===Validation Workflow===&lt;br /&gt;
&lt;br /&gt;
The following is a flow chart that depicts the flow of code once the form is submitted and the validation begins - &lt;br /&gt;
&lt;br /&gt;
[[File:OSSimg.png]]&lt;br /&gt;
&lt;br /&gt;
===UML Class Diagram===&lt;br /&gt;
Following is the class diagram of the class which are involved in this project. For readability purpose few details are omitted. Only relevant information is captured in this diagram&lt;br /&gt;
[[File:Servo_Class.png]]&lt;br /&gt;
&amp;lt;ref&amp;gt;http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2016_M1601_Implement_HTML5_form_validation&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
*servo/components/script/dom/validitystate.rs&lt;br /&gt;
*servo/components/script/dom/validitation.rs&lt;br /&gt;
*servo/components/script/dom/htmlformelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlinputelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlbuttonelements.rs&lt;br /&gt;
*servo/components/script/dom/htmltextareaelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlselectelements.rs&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
At this stage, the project can't be tested from UI. There are still some subsequent steps to be implemented after this.&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
  ./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105446</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105446"/>
		<updated>2016-11-11T22:26:59Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a newly developed browser by Mozilla and the source code of Servo is written in the Rust programming language&amp;lt;ref&amp;gt;https://doc.rust-lang.org/book/&amp;lt;/ref&amp;gt;, which is a system level programming language. The advantages of Rust language are preventing segfaults and thread safety. This project implements form validation feature to the Servo using Rust language.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The [https://github.com/servo/servo/wiki/Form-validation-student-project issue] we are working on is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Form-validation-student-project&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Example'''===&lt;br /&gt;
It is important to take security seriously when building the web application, especially trying to collect data from users. For example, in an email input field, the user might enter the wrong email address or incorrect email format, there should be certain notifications to remind user to change the input accordingly. The same mechanism should also be applied to radio button, multi choice button, text input, etc. In this project, we will implement such validation steps for the HTML5 “validatable” elements.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;email&amp;quot; value=&amp;quot;&amp;quot; placeholder=&amp;quot;name@email.com&amp;quot; required /&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Submit&amp;quot; /&amp;gt; &lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following pictures show different kinds of errors when input email address is not the correct form.&lt;br /&gt;
[[File:1.jpg]]&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
&lt;br /&gt;
===Validation Workflow===&lt;br /&gt;
&lt;br /&gt;
The following is a flow chart that depicts the flow of code once the form is submitted and the validation begins - &lt;br /&gt;
&lt;br /&gt;
[[File:OSSimg.png]]&lt;br /&gt;
&lt;br /&gt;
===UML Class Diagram===&lt;br /&gt;
Following is the class diagram of the class which are involved in this project. For readability purpose few details are omitted. Only relevant information is captured in this diagram&lt;br /&gt;
[[File:Servo_Class.png]]&lt;br /&gt;
&amp;lt;ref&amp;gt;http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2016_M1601_Implement_HTML5_form_validation&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
*servo/components/script/dom/validitystate.rs&lt;br /&gt;
*servo/components/script/dom/validitation.rs&lt;br /&gt;
*servo/components/script/dom/htmlformelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlinputelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlbuttonelements.rs&lt;br /&gt;
*servo/components/script/dom/htmltextareaelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlselectelements.rs&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
At this stage, the project can't be tested from UI. There are still some subsequent steps to be implemented after this.&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
  ./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105445</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105445"/>
		<updated>2016-11-11T22:24:12Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a newly developed browser by Mozilla and the source code of Servo is written in the Rust programming language&amp;lt;ref&amp;gt;https://doc.rust-lang.org/book/&amp;lt;/ref&amp;gt;, which is a system level programming language. The advantages of Rust language are preventing segfaults and thread safety. This project implements form validation feature to the Servo using Rust language.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The [https://github.com/servo/servo/wiki/Form-validation-student-project issue] we are working on is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Form-validation-student-project&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Example'''===&lt;br /&gt;
It is important to take security seriously when building the web application, especially trying to collect data from users. For example, in an email input field, the user might enter the wrong email address or incorrect email format, there should be certain notifications to remind user to change the input accordingly. The same mechanism should also be applied to radio button, multi choice button, text input, etc. In this project, we will implement such validation steps for the HTML5 “validatable” elements.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;email&amp;quot; value=&amp;quot;&amp;quot; placeholder=&amp;quot;name@email.com&amp;quot; required /&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Submit&amp;quot; /&amp;gt; &lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following pictures show different kinds of errors when input email address is not the correct form.&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
&lt;br /&gt;
===Validation Workflow===&lt;br /&gt;
&lt;br /&gt;
The following is a flow chart that depicts the flow of code once the form is submitted and the validation begins - &lt;br /&gt;
&lt;br /&gt;
[[File:OSSimg.png]]&lt;br /&gt;
&lt;br /&gt;
===UML Class Diagram===&lt;br /&gt;
Following is the class diagram of the class which are involved in this project. For readability purpose few details are omitted. Only relevant information is captured in this diagram&lt;br /&gt;
[[File:Servo_Class.png]]&lt;br /&gt;
&amp;lt;ref&amp;gt;http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2016_M1601_Implement_HTML5_form_validation&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
*servo/components/script/dom/validitystate.rs&lt;br /&gt;
*servo/components/script/dom/validitation.rs&lt;br /&gt;
*servo/components/script/dom/htmlformelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlinputelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlbuttonelements.rs&lt;br /&gt;
*servo/components/script/dom/htmltextareaelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlselectelements.rs&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
At this stage, the project can't be tested from UI. There are still some subsequent steps to be implemented after this.&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
  ./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:4.png&amp;diff=105444</id>
		<title>File:4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:4.png&amp;diff=105444"/>
		<updated>2016-11-11T22:21:14Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: uploaded a new version of &amp;amp;quot;File:4.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:3.png&amp;diff=105443</id>
		<title>File:3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:3.png&amp;diff=105443"/>
		<updated>2016-11-11T22:21:02Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: uploaded a new version of &amp;amp;quot;File:3.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;IS-A and HAS-A Rules of Inheritance&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:2.png&amp;diff=105442</id>
		<title>File:2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:2.png&amp;diff=105442"/>
		<updated>2016-11-11T22:20:52Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: uploaded a new version of &amp;amp;quot;File:2.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Double diamond problem&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:1.png&amp;diff=105441</id>
		<title>File:1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:1.png&amp;diff=105441"/>
		<updated>2016-11-11T22:20:35Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: uploaded a new version of &amp;amp;quot;File:1.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Distributed Version Control System&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105438</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105438"/>
		<updated>2016-11-11T21:59:37Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a newly developed browser by Mozilla and the source code of Servo is written in the Rust programming language&amp;lt;ref&amp;gt;https://doc.rust-lang.org/book/&amp;lt;/ref&amp;gt;, which is a system level programming language. The advantages of Rust language are preventing segfaults and thread safety. This project implements form validation feature to the Servo using Rust language.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The [https://github.com/servo/servo/wiki/Form-validation-student-project issue] we are working on is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Form-validation-student-project&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Example'''===&lt;br /&gt;
It is important to take security seriously when building the web application, especially trying to collect data from users. For example, in an email input field, the user might enter the wrong email address or incorrect email format, there should be certain notifications to remind user to change the input accordingly. The same mechanism should also be applied to radio button, multi choice button, text input, etc. In this project, we will implement such validation steps for the HTML5 “validatable” elements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following is a flow chart that depicts the flow of code once the form is submitted and the validation begins - &lt;br /&gt;
&lt;br /&gt;
[[File:OSSimg.png]]&lt;br /&gt;
&lt;br /&gt;
===UML Class Diagram===&lt;br /&gt;
Following is the class diagram of the class which are involved in this project. For readability purpose few details are omitted. Only relevant information is captured in this diagram&lt;br /&gt;
[[File:Servo_Class.png]]&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
*servo/components/script/dom/validitystate.rs&lt;br /&gt;
*servo/components/script/dom/validitation.rs&lt;br /&gt;
*servo/components/script/dom/htmlformelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlinputelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlbuttonelements.rs&lt;br /&gt;
*servo/components/script/dom/htmltextareaelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlselectelements.rs&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
At this stage, the project can't be tested from UI. There are still some subsequent steps to be implemented after this.&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
  ./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105434</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105434"/>
		<updated>2016-11-11T21:24:06Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a newly developed browser by Mozilla and the source code of Servo is written in the Rust programming language&amp;lt;ref&amp;gt;https://doc.rust-lang.org/book/&amp;lt;/ref&amp;gt;, which is a system level programming language. The advantages of Rust language are preventing segfaults and thread safety. This project implements form validation feature to the Servo using Rust language.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The [https://github.com/servo/servo/wiki/Form-validation-student-project issue] we are working on is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Form-validation-student-project&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
&lt;br /&gt;
Since this project is a continuing project from OSS M1653, and we are taking over from the previous group, we are not going to modify the design pattern from previous project. So we will still keep the enum to bit flag change proposed last time. We will also follow servo project work flow as well as DRY principle in OO design.&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
*servo/components/script/dom/validitystate.rs&lt;br /&gt;
*servo/components/script/dom/validitation.rs&lt;br /&gt;
*servo/components/script/dom/htmlformelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlinputelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlbuttonelements.rs&lt;br /&gt;
*servo/components/script/dom/htmltextareaelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlselectelements.rs&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
At this stage, the project can't be tested from UI. There are still some subsequent steps to be implemented after this.&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
  ./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105433</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105433"/>
		<updated>2016-11-11T21:22:53Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Servo is a newly developed browser by Mozilla and the source code of Servo is written in the Rust programming language, which is a system level programming language. The advantages of Rust language are preventing segfaults and thread safety. This project implements form validation feature to the Servo using Rust language.&lt;br /&gt;
&lt;br /&gt;
=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The [https://github.com/servo/servo/wiki/Form-validation-student-project issue] we are working on is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&amp;lt;ref&amp;gt;https://github.com/servo/servo/wiki/Form-validation-student-project&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
&lt;br /&gt;
Since this project is a continuing project from OSS M1653, and we are taking over from the previous group, we are not going to modify the design pattern from previous project. So we will still keep the enum to bit flag change proposed last time. We will also follow servo project work flow as well as DRY principle in OO design.&lt;br /&gt;
&lt;br /&gt;
==Files to be modified==&lt;br /&gt;
*servo/components/script/dom/validitystate.rs&lt;br /&gt;
*servo/components/script/dom/validitation.rs&lt;br /&gt;
*servo/components/script/dom/htmlformelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlinputelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlbuttonelements.rs&lt;br /&gt;
*servo/components/script/dom/htmltextareaelements.rs&lt;br /&gt;
*servo/components/script/dom/htmlselectelements.rs&lt;br /&gt;
&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
At this stage, the project can't be tested from UI. There are still some subsequent steps to be implemented after this.&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
  ./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105206</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105206"/>
		<updated>2016-11-10T02:30:55Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The [https://github.com/servo/servo/wiki/Form-validation-student-project issue] we are working on is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
At this stage, the project can't be tested from UI. There are still some subsequent steps to be implemented after this.&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105205</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105205"/>
		<updated>2016-11-10T02:30:01Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The issue we are working on is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
At this stage, the project can't be tested from UI. There are still some subsequent steps to be implemented after this.&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105204</id>
		<title>CSC/ECE 517 Fall 2016/ M1653 Implement HTML form validation</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/_M1653_Implement_HTML_form_validation&amp;diff=105204"/>
		<updated>2016-11-10T02:29:22Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
The browser Servo currently can not validate different kinds of form elements before submitting, and might lead to errors such as null input or wrong length of input. The project is intended to implement the validation process which is extendable to validate other elements that support such mechanism. This is a long-term project and the last two groups finished initial steps, including basic configuration, structure building, trait implementation. In our project, we will continue to complete validation methods and focus on defining the “validatable” elements across the whole webpage.&lt;br /&gt;
&lt;br /&gt;
==='''Servo'''===&lt;br /&gt;
[https://en.wikipedia.org/wiki/Servo_(layout_engine) Servo] is an open source prototype web browser layout engine that is being developed by Mozilla Research. Its source code can be found [https://github.com/servo/servo here]. Current browser engines are mostly based on the single-thread model. The motivation behind building servo web browser is to build a highly parallel and reliable environment, where different components (such as rendering, layout, HTML parsing, image decoding, etc.) can be handled by fine-grained, isolated tasks.&lt;br /&gt;
&lt;br /&gt;
==='''Rust'''===&lt;br /&gt;
[http://doc.rust-lang.org/book/README.html Rust] is an open source system programming language developed by Mozilla. Rust is a language suited for creating a highly concurrent and safe system. In performance and syntax, rust is similar to C++ but semantically it is very different. Rust emphasis is on speed, safety and control of memory layout&amp;lt;ref&amp;gt;https://en.wikipedia.org/wiki/Rust_(programming_language)&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''Project description'''==&lt;br /&gt;
==='''Initial steps'''===&lt;br /&gt;
*compile Servo and ensure that it runs on tests/html/about-mozilla.html&lt;br /&gt;
*email the mozilla.dev.servo mailing list (be sure to subscribe first!) introducing your group and asking any necessary questions&lt;br /&gt;
*uncomment the attributes in ValidityState.webidl and fix the resulting build errors by implementing appropriate stub methods in validitystate.rs&lt;br /&gt;
*make the ValidityState constructor take an &amp;amp;Element argument and store it as a JS&amp;lt;Element&amp;gt; member in ValidityState&lt;br /&gt;
*add a new enum that represents each possible validity check in ValidityState&lt;br /&gt;
*define a Validatable trait that contains a method which accepts this enum as an argument (see the Activatable trait for inspiration)&lt;br /&gt;
*implement this trait for the form element types (HTMLInputElement, HTMLSelectElement, HTMLButtonElement, etc.), and define an as_maybe_validatable *method on Element which returns an &amp;amp;Validatable value if the element implements the trait (see as_maybe_activatable for inspiration)&lt;br /&gt;
*Use the newly-added JS&amp;lt;Element&amp;gt; member to call these new methods as appropriate in each of the stub methods in ValidityState&lt;br /&gt;
==='''Subsequent steps'''===&lt;br /&gt;
*a method to HTMLFormElement that implements the steps to interactively validate the constraints of a form element&lt;br /&gt;
*Implement the checkValidity API for HTMLFormElement&lt;br /&gt;
*Implement the reportValidity API for HTMLFormElement&lt;br /&gt;
*Implement each validity state defined in the spec as applicable. This can include implementing support for attributes such as min, max, minlength, etc.&lt;br /&gt;
*Modify the implementation of the form submission algorithm to include constraint validation&lt;br /&gt;
=='''Design Patterns &amp;amp; OO Practices'''==&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
===Test with tidy===&lt;br /&gt;
Servo has its own code standard. We managed to meet its code standard by using the following command to run code style check.&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach test-tidy&lt;br /&gt;
&lt;br /&gt;
When we ran tidy we got 20 code style errors and we fixed all the errors.&lt;br /&gt;
&lt;br /&gt;
===Compile test===&lt;br /&gt;
After adding code, we compiled the servo by the following command&lt;br /&gt;
&lt;br /&gt;
    cd servo&lt;br /&gt;
    ./mach build -d&lt;br /&gt;
&lt;br /&gt;
No error showed up, servo worked as expected with the new code.&lt;br /&gt;
===Test from UI===&lt;br /&gt;
At this stage, the project can't be tested from UI. There are still some subsequent steps to be implemented after this.&lt;br /&gt;
The default way to test web page tests/html/form_html5_validations.html following command will be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
./mach run tests/html/form_html5_validations.html&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===For reviewers===&lt;br /&gt;
In addition to the reasons mentioned above, the servo is a web browser and not a web application. Therefore it can't be deployed on the cloud server. All these would make it hard for reviewers to test the correctness of code at this time.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1660._Review_requirements_and_thresholds&amp;diff=104171</id>
		<title>CSC/ECE 517 Fall 2016/E1660. Review requirements and thresholds</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1660._Review_requirements_and_thresholds&amp;diff=104171"/>
		<updated>2016-11-01T04:17:43Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;4&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1660. Review requirements and thresholds&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In Expertiza, there are two ways of assigning reviews to reviewers: either the instructor decides who reviews whom (“instructor-selected”), or “auto-selected,” in which case reviews are not assigned until a student seeks to choose something to review.  &lt;br /&gt;
To allow reviewers a larger set of topics to choose from, the instructor can set the threshold (on the Review Strategy tab of assignment creation/editing) to some integer k &amp;gt; 0.  Then any submission that has within k reviews of the fewest number can be chosen by a new reviewer.  Let’s say that all submissions have at least 1 review.  If k = 3, then the reviewer can choose any topic where there is a submission that has 4 or fewer reviews so far.&lt;br /&gt;
Suppose that the minimum number of reviews for any submission is 2, but that I have reviewed all the submissions that have only 2 reviews.  Then I’m not allowed to review at all (unless k &amp;gt; 0).  That’s wrong; I should always be allowed to review the work with the least reviews that I have not already reviewed.  And that should generalize to situations in which k &amp;gt; 0.&lt;br /&gt;
Another issue is that there is no way for Expertiza to tell a reviewer how many reviews are required.  In the case of instructor-selected reviewing, that’s not a problem, but for auto-selected reviewing, there is no way to specify how many reviews are required (or even how many are allowed, in case students are allowed to do extra reviews). &lt;br /&gt;
&lt;br /&gt;
== Purpose ==&lt;br /&gt;
The purpose of this task is to solve the above mentioned issues collaboratively.&lt;br /&gt;
The assignments table now contains the Max reviews required and allowed field which can be set from Review strategy tab. This allows the admin to set the threshold value for required number of reviews for the assignment.&lt;br /&gt;
Another feature implemented is, now students can check how many reviews he/she needs to write which helps students determine how many reviews to write and also how many reviews he/she has already written.&lt;br /&gt;
Another issue resolved was the reviewer who finished reviewing all submissions with least number of reviews, should be able to review the next set of submissions with greater number of reviews. That is, the threshold rule was more relaxed.&lt;br /&gt;
Implemented the necessary test cases for the new features implemented.&lt;br /&gt;
&lt;br /&gt;
== Modified File == &lt;br /&gt;
* app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
* Added two new unit tests in RSpec file in spec/models/assignment_form_spec.rb&lt;br /&gt;
* Added two new columns in Assignment table as shown below&lt;br /&gt;
* app/models/review_assignment.rb&lt;br /&gt;
* app/controllers/review_mapping_controller.rb&lt;br /&gt;
* added new file review_assignment_spec.rb in spec for testing the above functionality.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALTER TABLE assignments ADD COLUMN num_reviews_required INT DEFAULT 3;&lt;br /&gt;
ALTER TABLE assignments ADD COLUMN num_reviews_allowed INT DEFAULT 3;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* add new RSpec tests in assignment_spec.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe &amp;quot;can not review own work&amp;quot;, type: :feature do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
        create(:assignment, name: &amp;quot;TestTeam&amp;quot;, directory_path: 'test_team')&lt;br /&gt;
        create_list(:participant, 3)&lt;br /&gt;
        create(:assignment_node)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;submission&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;review&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;metareview&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;drop_topic&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;signup&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;team_formation&amp;quot;)&lt;br /&gt;
        create(:deadline_right)&lt;br /&gt;
        create(:deadline_right, name: 'Late')&lt;br /&gt;
        create(:deadline_right, name: 'OK')&lt;br /&gt;
        create(:assignment_due_date, deadline_type: DeadlineType.where(name: 'review').first, due_at: Time.now + (100 * 24 * 60 * 60))&lt;br /&gt;
        #create(:topic)&lt;br /&gt;
        create(:topic, topic_name: &amp;quot;work1&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    it &amp;quot;case1&amp;quot; do&lt;br /&gt;
        &lt;br /&gt;
        #test log in as a student&lt;br /&gt;
        &lt;br /&gt;
        user = User.find_by_name('student2064')&lt;br /&gt;
        msg = user.to_yaml&lt;br /&gt;
        File.open('log/diagnostic.txt', 'a') {|f| f.write msg }&lt;br /&gt;
        &lt;br /&gt;
        visit root_path&lt;br /&gt;
        fill_in 'login_name', with: 'student2064'&lt;br /&gt;
        fill_in 'login_password', with: 'password'&lt;br /&gt;
        click_button 'SIGN IN'&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        #expect(page).to have_content &amp;quot;Welcome!&amp;quot;&lt;br /&gt;
        #expect(page).to have_content &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        #click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        expect(page).to have_content &amp;quot;User: student2064&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;Your team&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #test if the topic can be seen and chosen by a student&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;work1&amp;quot;&lt;br /&gt;
        my_link = find(:xpath, &amp;quot;//a[contains(@href,'sign_up_sheet/sign_up?assignment_id=#{Assignment.last.id}&amp;amp;id=1')]&amp;quot;)&lt;br /&gt;
        my_link.click&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        #test after selecting a topic, a team formed&lt;br /&gt;
        click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        click_link &amp;quot;Your work&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        fill_in 'submission', with: 'www.google.com'&lt;br /&gt;
        click_button 'Upload link'&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        click_link &amp;quot;Others' work&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        click_button &amp;quot;Request a new submission to review&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #If no link of view is on the page, then it means that no review is allowed for this user.&lt;br /&gt;
        expect(page).to have_no_link &amp;quot;view&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #save_and_open_page&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec testing ===&lt;br /&gt;
The new RSpec test added to the assignment_spec.rb is used to verify that the reviewer who submits their assignment should not be allowed to review their own work. The test mainly simulates mouse click on the webpage and tries to find certain content. One student account is created to submit the assignment which is stored by the system. Since this submission is the only one for the existed topic, the system is supposed to not to assign reviewer anything, which is equivalent to have the correct output for code, expect(page).to have_no_link &amp;quot;view&amp;quot;. The test file shows desired result and the issue resolved. &lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
[https://github.com/rnambis/expertiza Link for forked repository]&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1660._Review_requirements_and_thresholds&amp;diff=104170</id>
		<title>CSC/ECE 517 Fall 2016/E1660. Review requirements and thresholds</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1660._Review_requirements_and_thresholds&amp;diff=104170"/>
		<updated>2016-11-01T04:17:20Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;4&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1660. Review requirements and thresholds&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In Expertiza, there are two ways of assigning reviews to reviewers: either the instructor decides who reviews whom (“instructor-selected”), or “auto-selected,” in which case reviews are not assigned until a student seeks to choose something to review.  &lt;br /&gt;
To allow reviewers a larger set of topics to choose from, the instructor can set the threshold (on the Review Strategy tab of assignment creation/editing) to some integer k &amp;gt; 0.  Then any submission that has within k reviews of the fewest number can be chosen by a new reviewer.  Let’s say that all submissions have at least 1 review.  If k = 3, then the reviewer can choose any topic where there is a submission that has 4 or fewer reviews so far.&lt;br /&gt;
Suppose that the minimum number of reviews for any submission is 2, but that I have reviewed all the submissions that have only 2 reviews.  Then I’m not allowed to review at all (unless k &amp;gt; 0).  That’s wrong; I should always be allowed to review the work with the least reviews that I have not already reviewed.  And that should generalize to situations in which k &amp;gt; 0.&lt;br /&gt;
Another issue is that there is no way for Expertiza to tell a reviewer how many reviews are required.  In the case of instructor-selected reviewing, that’s not a problem, but for auto-selected reviewing, there is no way to specify how many reviews are required (or even how many are allowed, in case students are allowed to do extra reviews). &lt;br /&gt;
&lt;br /&gt;
== Purpose ==&lt;br /&gt;
The purpose of this task is to solve the above mentioned issues collaboratively.&lt;br /&gt;
The assignments table now contains the Max reviews required and allowed field which can be set from Review strategy tab. This allows the admin to set the threshold value for required number of reviews for the assignment.&lt;br /&gt;
Another feature implemented is, now students can check how many reviews he/she needs to write which helps students determine how many reviews to write and also how many reviews he/she has already written.&lt;br /&gt;
Another issue resolved was the reviewer who finished reviewing all submissions with least number of reviews, should be able to review the next set of submissions with greater number of reviews. That is, the threshold rule was more relaxed.&lt;br /&gt;
Implemented the necessary test cases for the new features implemented.&lt;br /&gt;
&lt;br /&gt;
== Modified File == &lt;br /&gt;
* app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
* Added two new unit tests in RSpec file in spec/models/assignment_form_spec.rb&lt;br /&gt;
* Added two new columns in Assignment table as shown below&lt;br /&gt;
* app/models/review_assignment.rb&lt;br /&gt;
* app/controllers/review_mapping_controller.rb&lt;br /&gt;
* added new file review_assignment_spec.rb in spec for testing the above functionality.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALTER TABLE assignments ADD COLUMN num_reviews_required INT DEFAULT 3;&lt;br /&gt;
ALTER TABLE assignments ADD COLUMN num_reviews_allowed INT DEFAULT 3;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* add new RSpec tests in assignment_spec.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe &amp;quot;can not review own work&amp;quot;, type: :feature do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
        create(:assignment, name: &amp;quot;TestTeam&amp;quot;, directory_path: 'test_team')&lt;br /&gt;
        create_list(:participant, 3)&lt;br /&gt;
        create(:assignment_node)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;submission&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;review&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;metareview&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;drop_topic&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;signup&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;team_formation&amp;quot;)&lt;br /&gt;
        create(:deadline_right)&lt;br /&gt;
        create(:deadline_right, name: 'Late')&lt;br /&gt;
        create(:deadline_right, name: 'OK')&lt;br /&gt;
        create(:assignment_due_date, deadline_type: DeadlineType.where(name: 'review').first, due_at: Time.now + (100 * 24 * 60 * 60))&lt;br /&gt;
        #create(:topic)&lt;br /&gt;
        create(:topic, topic_name: &amp;quot;work1&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    it &amp;quot;case1&amp;quot; do&lt;br /&gt;
        &lt;br /&gt;
        #test log in as a student&lt;br /&gt;
        &lt;br /&gt;
        user = User.find_by_name('student2064')&lt;br /&gt;
        msg = user.to_yaml&lt;br /&gt;
        File.open('log/diagnostic.txt', 'a') {|f| f.write msg }&lt;br /&gt;
        &lt;br /&gt;
        visit root_path&lt;br /&gt;
        fill_in 'login_name', with: 'student2064'&lt;br /&gt;
        fill_in 'login_password', with: 'password'&lt;br /&gt;
        click_button 'SIGN IN'&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        #expect(page).to have_content &amp;quot;Welcome!&amp;quot;&lt;br /&gt;
        #expect(page).to have_content &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        #click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        expect(page).to have_content &amp;quot;User: student2064&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;Your team&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #test if the topic can be seen and chosen by a student&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;work1&amp;quot;&lt;br /&gt;
        my_link = find(:xpath, &amp;quot;//a[contains(@href,'sign_up_sheet/sign_up?assignment_id=#{Assignment.last.id}&amp;amp;id=1')]&amp;quot;)&lt;br /&gt;
        my_link.click&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        #test after selecting a topic, a team formed&lt;br /&gt;
        click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        click_link &amp;quot;Your work&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        fill_in 'submission', with: 'www.google.com'&lt;br /&gt;
        click_button 'Upload link'&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        click_link &amp;quot;Others' work&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        click_button &amp;quot;Request a new submission to review&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #If no link of view is on the page, then it means that no review is allowed for this user.&lt;br /&gt;
        expect(page).to have_no_link &amp;quot;view&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #save_and_open_page&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec testing ===&lt;br /&gt;
The new RSpec test added to the assignment_spec.rb is used to verify that the reviewer who submits their assignment should not be allowed to review their own work. The test mainly simulates mouse click on the webpage and tries to find certain content. One student account is created to submit the assignment which is stored by the system. Since this submission is the only one for the existed topic, the system is supposed to not to assign reviewer anything, which is equivalent to have the correct output for code, expect(page).to have_no_link &amp;quot;view&amp;quot;. The test file shows desired result and the issue resolved. &lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# link for forked repository [https://github.com/rnambis/expertiza Link for forked repository]&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1660._Review_requirements_and_thresholds&amp;diff=104169</id>
		<title>CSC/ECE 517 Fall 2016/E1660. Review requirements and thresholds</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1660._Review_requirements_and_thresholds&amp;diff=104169"/>
		<updated>2016-11-01T04:16:19Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;4&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1660. Review requirements and thresholds&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In Expertiza, there are two ways of assigning reviews to reviewers: either the instructor decides who reviews whom (“instructor-selected”), or “auto-selected,” in which case reviews are not assigned until a student seeks to choose something to review.  &lt;br /&gt;
To allow reviewers a larger set of topics to choose from, the instructor can set the threshold (on the Review Strategy tab of assignment creation/editing) to some integer k &amp;gt; 0.  Then any submission that has within k reviews of the fewest number can be chosen by a new reviewer.  Let’s say that all submissions have at least 1 review.  If k = 3, then the reviewer can choose any topic where there is a submission that has 4 or fewer reviews so far.&lt;br /&gt;
Suppose that the minimum number of reviews for any submission is 2, but that I have reviewed all the submissions that have only 2 reviews.  Then I’m not allowed to review at all (unless k &amp;gt; 0).  That’s wrong; I should always be allowed to review the work with the least reviews that I have not already reviewed.  And that should generalize to situations in which k &amp;gt; 0.&lt;br /&gt;
Another issue is that there is no way for Expertiza to tell a reviewer how many reviews are required.  In the case of instructor-selected reviewing, that’s not a problem, but for auto-selected reviewing, there is no way to specify how many reviews are required (or even how many are allowed, in case students are allowed to do extra reviews). &lt;br /&gt;
&lt;br /&gt;
== Purpose ==&lt;br /&gt;
The purpose of this task is to solve the above mentioned issues collaboratively.&lt;br /&gt;
The assignments table now contains the Max reviews required and allowed field which can be set from Review strategy tab. This allows the admin to set the threshold value for required number of reviews for the assignment.&lt;br /&gt;
Another feature implemented is, now students can check how many reviews he/she needs to write which helps students determine how many reviews to write and also how many reviews he/she has already written.&lt;br /&gt;
Another issue resolved was the reviewer who finished reviewing all submissions with least number of reviews, should be able to review the next set of submissions with greater number of reviews. That is, the threshold rule was more relaxed.&lt;br /&gt;
Implemented the necessary test cases for the new features implemented.&lt;br /&gt;
&lt;br /&gt;
== Modified File == &lt;br /&gt;
* app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
* Added two new unit tests in RSpec file in spec/models/assignment_form_spec.rb&lt;br /&gt;
* Added two new columns in Assignment table as shown below&lt;br /&gt;
* app/models/review_assignment.rb&lt;br /&gt;
* app/controllers/review_mapping_controller.rb&lt;br /&gt;
* added new file review_assignment_spec.rb in spec for testing the above functionality.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALTER TABLE assignments ADD COLUMN num_reviews_required INT DEFAULT 3;&lt;br /&gt;
ALTER TABLE assignments ADD COLUMN num_reviews_allowed INT DEFAULT 3;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* add new RSpec tests in assignment_spec.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe &amp;quot;can not review own work&amp;quot;, type: :feature do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
        create(:assignment, name: &amp;quot;TestTeam&amp;quot;, directory_path: 'test_team')&lt;br /&gt;
        create_list(:participant, 3)&lt;br /&gt;
        create(:assignment_node)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;submission&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;review&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;metareview&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;drop_topic&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;signup&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;team_formation&amp;quot;)&lt;br /&gt;
        create(:deadline_right)&lt;br /&gt;
        create(:deadline_right, name: 'Late')&lt;br /&gt;
        create(:deadline_right, name: 'OK')&lt;br /&gt;
        create(:assignment_due_date, deadline_type: DeadlineType.where(name: 'review').first, due_at: Time.now + (100 * 24 * 60 * 60))&lt;br /&gt;
        #create(:topic)&lt;br /&gt;
        create(:topic, topic_name: &amp;quot;work1&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    it &amp;quot;case1&amp;quot; do&lt;br /&gt;
        &lt;br /&gt;
        #test log in as a student&lt;br /&gt;
        &lt;br /&gt;
        user = User.find_by_name('student2064')&lt;br /&gt;
        msg = user.to_yaml&lt;br /&gt;
        File.open('log/diagnostic.txt', 'a') {|f| f.write msg }&lt;br /&gt;
        &lt;br /&gt;
        visit root_path&lt;br /&gt;
        fill_in 'login_name', with: 'student2064'&lt;br /&gt;
        fill_in 'login_password', with: 'password'&lt;br /&gt;
        click_button 'SIGN IN'&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        #expect(page).to have_content &amp;quot;Welcome!&amp;quot;&lt;br /&gt;
        #expect(page).to have_content &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        #click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        expect(page).to have_content &amp;quot;User: student2064&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;Your team&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #test if the topic can be seen and chosen by a student&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;work1&amp;quot;&lt;br /&gt;
        my_link = find(:xpath, &amp;quot;//a[contains(@href,'sign_up_sheet/sign_up?assignment_id=#{Assignment.last.id}&amp;amp;id=1')]&amp;quot;)&lt;br /&gt;
        my_link.click&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        #test after selecting a topic, a team formed&lt;br /&gt;
        click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        click_link &amp;quot;Your work&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        fill_in 'submission', with: 'www.google.com'&lt;br /&gt;
        click_button 'Upload link'&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        click_link &amp;quot;Others' work&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        click_button &amp;quot;Request a new submission to review&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #If no link of view is on the page, then it means that no review is allowed for this user.&lt;br /&gt;
        expect(page).to have_no_link &amp;quot;view&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #save_and_open_page&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec testing ===&lt;br /&gt;
The new RSpec test added to the assignment_spec.rb is used to verify that the reviewer who submits their assignment should not be allowed to review their own work. The test mainly simulates mouse click on the webpage and tries to find certain content. One student account is created to submit the assignment which is stored by the system. Since this submission is the only one for the existed topic, the system is supposed to not to assign reviewer anything, which is equivalent to have the correct output for code, expect(page).to have_no_link &amp;quot;view&amp;quot;. The test file shows desired result and the issue resolved. &lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# link for forked repository &amp;lt;ref&amp;gt;https://github.com/rnambis/expertiza&amp;lt;/ref&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1660._Review_requirements_and_thresholds&amp;diff=104168</id>
		<title>CSC/ECE 517 Fall 2016/E1660. Review requirements and thresholds</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1660._Review_requirements_and_thresholds&amp;diff=104168"/>
		<updated>2016-11-01T04:12:37Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;4&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1660. Review requirements and thresholds&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
In Expertiza, there are two ways of assigning reviews to reviewers: either the instructor decides who reviews whom (“instructor-selected”), or “auto-selected,” in which case reviews are not assigned until a student seeks to choose something to review.  &lt;br /&gt;
To allow reviewers a larger set of topics to choose from, the instructor can set the threshold (on the Review Strategy tab of assignment creation/editing) to some integer k &amp;gt; 0.  Then any submission that has within k reviews of the fewest number can be chosen by a new reviewer.  Let’s say that all submissions have at least 1 review.  If k = 3, then the reviewer can choose any topic where there is a submission that has 4 or fewer reviews so far.&lt;br /&gt;
Suppose that the minimum number of reviews for any submission is 2, but that I have reviewed all the submissions that have only 2 reviews.  Then I’m not allowed to review at all (unless k &amp;gt; 0).  That’s wrong; I should always be allowed to review the work with the least reviews that I have not already reviewed.  And that should generalize to situations in which k &amp;gt; 0.&lt;br /&gt;
Another issue is that there is no way for Expertiza to tell a reviewer how many reviews are required.  In the case of instructor-selected reviewing, that’s not a problem, but for auto-selected reviewing, there is no way to specify how many reviews are required (or even how many are allowed, in case students are allowed to do extra reviews). &lt;br /&gt;
&lt;br /&gt;
== Purpose ==&lt;br /&gt;
The purpose of this task is to solve the above mentioned issues collaboratively.&lt;br /&gt;
The assignments table now contains the Max reviews required and allowed field which can be set from Review strategy tab. This allows the admin to set the threshold value for required number of reviews for the assignment.&lt;br /&gt;
Another feature implemented is, now students can check how many reviews he/she needs to write which helps students determine how many reviews to write and also how many reviews he/she has already written.&lt;br /&gt;
Another issue resolved was the reviewer who finished reviewing all submissions with least number of reviews, should be able to review the next set of submissions with greater number of reviews. That is, the threshold rule was more relaxed.&lt;br /&gt;
Implemented the necessary test cases for the new features implemented.&lt;br /&gt;
&lt;br /&gt;
== Modified File == &lt;br /&gt;
* app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
* Added two new unit tests in RSpec file in spec/models/assignment_form_spec.rb&lt;br /&gt;
* Added two new columns in Assignment table as shown below&lt;br /&gt;
* app/models/review_assignment.rb&lt;br /&gt;
* app/controllers/review_mapping_controller.rb&lt;br /&gt;
* added new file review_assignment_spec.rb in spec for testing the above functionality.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALTER TABLE assignments ADD COLUMN num_reviews_required INT DEFAULT 3;&lt;br /&gt;
ALTER TABLE assignments ADD COLUMN num_reviews_allowed INT DEFAULT 3;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* add new RSpec tests in assignment_spec.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe &amp;quot;can not review own work&amp;quot;, type: :feature do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
        create(:assignment, name: &amp;quot;TestTeam&amp;quot;, directory_path: 'test_team')&lt;br /&gt;
        create_list(:participant, 3)&lt;br /&gt;
        create(:assignment_node)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;submission&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;review&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;metareview&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;drop_topic&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;signup&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;team_formation&amp;quot;)&lt;br /&gt;
        create(:deadline_right)&lt;br /&gt;
        create(:deadline_right, name: 'Late')&lt;br /&gt;
        create(:deadline_right, name: 'OK')&lt;br /&gt;
        create(:assignment_due_date, deadline_type: DeadlineType.where(name: 'review').first, due_at: Time.now + (100 * 24 * 60 * 60))&lt;br /&gt;
        #create(:topic)&lt;br /&gt;
        create(:topic, topic_name: &amp;quot;work1&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    it &amp;quot;case1&amp;quot; do&lt;br /&gt;
        &lt;br /&gt;
        #test log in as a student&lt;br /&gt;
        &lt;br /&gt;
        user = User.find_by_name('student2064')&lt;br /&gt;
        msg = user.to_yaml&lt;br /&gt;
        File.open('log/diagnostic.txt', 'a') {|f| f.write msg }&lt;br /&gt;
        &lt;br /&gt;
        visit root_path&lt;br /&gt;
        fill_in 'login_name', with: 'student2064'&lt;br /&gt;
        fill_in 'login_password', with: 'password'&lt;br /&gt;
        click_button 'SIGN IN'&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        #expect(page).to have_content &amp;quot;Welcome!&amp;quot;&lt;br /&gt;
        #expect(page).to have_content &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        #click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        expect(page).to have_content &amp;quot;User: student2064&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;Your team&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #test if the topic can be seen and chosen by a student&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;work1&amp;quot;&lt;br /&gt;
        my_link = find(:xpath, &amp;quot;//a[contains(@href,'sign_up_sheet/sign_up?assignment_id=#{Assignment.last.id}&amp;amp;id=1')]&amp;quot;)&lt;br /&gt;
        my_link.click&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        #test after selecting a topic, a team formed&lt;br /&gt;
        click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        click_link &amp;quot;Your work&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        fill_in 'submission', with: 'www.google.com'&lt;br /&gt;
        click_button 'Upload link'&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        click_link &amp;quot;Others' work&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        click_button &amp;quot;Request a new submission to review&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #If no link of view is on the page, then it means that no review is allowed for this user.&lt;br /&gt;
        expect(page).to have_no_link &amp;quot;view&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #save_and_open_page&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec testing ===&lt;br /&gt;
The new RSpec test added to the assignment_spec.rb is used to verify that the reviewer who submits their assignment should not be allowed to review their own work. The test mainly simulates mouse click on the webpage and tries to find certain content. One student account is created to submit the assignment which is stored by the system. Since this submission is the only one for the existed topic, the system is supposed to not to assign reviewer anything, which is equivalent to have the correct output for code, expect(page).to have_no_link &amp;quot;view&amp;quot;. The test file shows desired result and the issue resolved. &lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
# link for forked repository&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1660._Review_requirements_and_thresholds&amp;diff=104167</id>
		<title>CSC/ECE 517 Fall 2016/E1660. Review requirements and thresholds</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1660._Review_requirements_and_thresholds&amp;diff=104167"/>
		<updated>2016-11-01T03:47:20Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: /* Modified File */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Review requirements and thresholds =&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
In Expertiza, there are two ways of assigning reviews to reviewers: either the instructor decides who reviews whom (“instructor-selected”), or “auto-selected,” in which case reviews are not assigned until a student seeks to choose something to review.  &lt;br /&gt;
To allow reviewers a larger set of topics to choose from, the instructor can set the threshold (on the Review Strategy tab of assignment creation/editing) to some integer k &amp;gt; 0.  Then any submission that has within k reviews of the fewest number can be chosen by a new reviewer.  Let’s say that all submissions have at least 1 review.  If k = 3, then the reviewer can choose any topic where there is a submission that has 4 or fewer reviews so far.&lt;br /&gt;
Suppose that the minimum number of reviews for any submission is 2, but that I have reviewed all the submissions that have only 2 reviews.  Then I’m not allowed to review at all (unless k &amp;gt; 0).  That’s wrong; I should always be allowed to review the work with the least reviews that I have not already reviewed.  And that should generalize to situations in which k &amp;gt; 0.&lt;br /&gt;
Another issue is that there is no way for Expertiza to tell a reviewer how many reviews are required.  In the case of instructor-selected reviewing, that’s not a problem, but for auto-selected reviewing, there is no way to specify how many reviews are required (or even how many are allowed, in case students are allowed to do extra reviews). &lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
The purpose of this task is to solve the above mentioned issues collaboratively.&lt;br /&gt;
The assignments table now contains the Max reviews required and allowed field which can be set from Review strategy tab. This allows the admin to set the threshold value for required number of reviews for the assignment.&lt;br /&gt;
Another feature implemented is, now students can check how many reviews he/she needs to write which helps students determine how many reviews to write and also how many reviews he/she has already written.&lt;br /&gt;
Another issue resolved was the reviewer who finished reviewing all submissions with least number of reviews, should be able to review the next set of submissions with greater number of reviews. That is, the threshold rule was more relaxed.&lt;br /&gt;
Implemented the necessary test cases for the new features implemented.&lt;br /&gt;
&lt;br /&gt;
== Modified File == &lt;br /&gt;
* app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
* Added two new unit tests in RSpec file in spec/models/assignment_form_spec.rb&lt;br /&gt;
* Added two new columns in Assignment table as shown below&lt;br /&gt;
* app/models/review_assignment.rb&lt;br /&gt;
* app/controllers/review_mapping_controller.rb&lt;br /&gt;
* added new file review_assignment_spec.rb in spec for testing the above functionality.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALTER TABLE assignments ADD COLUMN num_reviews_required INT DEFAULT 3;&lt;br /&gt;
ALTER TABLE assignments ADD COLUMN num_reviews_allowed INT DEFAULT 3;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* add new RSpec tests in assignment_spec.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe &amp;quot;can not review own work&amp;quot;, type: :feature do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
        create(:assignment, name: &amp;quot;TestTeam&amp;quot;, directory_path: 'test_team')&lt;br /&gt;
        create_list(:participant, 3)&lt;br /&gt;
        create(:assignment_node)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;submission&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;review&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;metareview&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;drop_topic&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;signup&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;team_formation&amp;quot;)&lt;br /&gt;
        create(:deadline_right)&lt;br /&gt;
        create(:deadline_right, name: 'Late')&lt;br /&gt;
        create(:deadline_right, name: 'OK')&lt;br /&gt;
        create(:assignment_due_date, deadline_type: DeadlineType.where(name: 'review').first, due_at: Time.now + (100 * 24 * 60 * 60))&lt;br /&gt;
        #create(:topic)&lt;br /&gt;
        create(:topic, topic_name: &amp;quot;work1&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    it &amp;quot;case1&amp;quot; do&lt;br /&gt;
        &lt;br /&gt;
        #test log in as a student&lt;br /&gt;
        &lt;br /&gt;
        user = User.find_by_name('student2064')&lt;br /&gt;
        msg = user.to_yaml&lt;br /&gt;
        File.open('log/diagnostic.txt', 'a') {|f| f.write msg }&lt;br /&gt;
        &lt;br /&gt;
        visit root_path&lt;br /&gt;
        fill_in 'login_name', with: 'student2064'&lt;br /&gt;
        fill_in 'login_password', with: 'password'&lt;br /&gt;
        click_button 'SIGN IN'&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        #expect(page).to have_content &amp;quot;Welcome!&amp;quot;&lt;br /&gt;
        #expect(page).to have_content &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        #click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        expect(page).to have_content &amp;quot;User: student2064&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;Your team&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #test if the topic can be seen and chosen by a student&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;work1&amp;quot;&lt;br /&gt;
        my_link = find(:xpath, &amp;quot;//a[contains(@href,'sign_up_sheet/sign_up?assignment_id=#{Assignment.last.id}&amp;amp;id=1')]&amp;quot;)&lt;br /&gt;
        my_link.click&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        #test after selecting a topic, a team formed&lt;br /&gt;
        click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        click_link &amp;quot;Your work&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        fill_in 'submission', with: 'www.google.com'&lt;br /&gt;
        click_button 'Upload link'&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        click_link &amp;quot;Others' work&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        click_button &amp;quot;Request a new submission to review&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #If no link of view is on the page, then it means that no review is allowed for this user.&lt;br /&gt;
        expect(page).to have_no_link &amp;quot;view&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #save_and_open_page&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== External Links ===&lt;br /&gt;
# link for forked repository&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1660._Review_requirements_and_thresholds&amp;diff=104166</id>
		<title>CSC/ECE 517 Fall 2016/E1660. Review requirements and thresholds</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1660._Review_requirements_and_thresholds&amp;diff=104166"/>
		<updated>2016-11-01T03:47:04Z</updated>

		<summary type="html">&lt;p&gt;Ycheng15: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Review requirements and thresholds =&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
In Expertiza, there are two ways of assigning reviews to reviewers: either the instructor decides who reviews whom (“instructor-selected”), or “auto-selected,” in which case reviews are not assigned until a student seeks to choose something to review.  &lt;br /&gt;
To allow reviewers a larger set of topics to choose from, the instructor can set the threshold (on the Review Strategy tab of assignment creation/editing) to some integer k &amp;gt; 0.  Then any submission that has within k reviews of the fewest number can be chosen by a new reviewer.  Let’s say that all submissions have at least 1 review.  If k = 3, then the reviewer can choose any topic where there is a submission that has 4 or fewer reviews so far.&lt;br /&gt;
Suppose that the minimum number of reviews for any submission is 2, but that I have reviewed all the submissions that have only 2 reviews.  Then I’m not allowed to review at all (unless k &amp;gt; 0).  That’s wrong; I should always be allowed to review the work with the least reviews that I have not already reviewed.  And that should generalize to situations in which k &amp;gt; 0.&lt;br /&gt;
Another issue is that there is no way for Expertiza to tell a reviewer how many reviews are required.  In the case of instructor-selected reviewing, that’s not a problem, but for auto-selected reviewing, there is no way to specify how many reviews are required (or even how many are allowed, in case students are allowed to do extra reviews). &lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
The purpose of this task is to solve the above mentioned issues collaboratively.&lt;br /&gt;
The assignments table now contains the Max reviews required and allowed field which can be set from Review strategy tab. This allows the admin to set the threshold value for required number of reviews for the assignment.&lt;br /&gt;
Another feature implemented is, now students can check how many reviews he/she needs to write which helps students determine how many reviews to write and also how many reviews he/she has already written.&lt;br /&gt;
Another issue resolved was the reviewer who finished reviewing all submissions with least number of reviews, should be able to review the next set of submissions with greater number of reviews. That is, the threshold rule was more relaxed.&lt;br /&gt;
Implemented the necessary test cases for the new features implemented.&lt;br /&gt;
&lt;br /&gt;
== Modified File == &lt;br /&gt;
* app/views/assignments/edit/_review_strategy.html.erb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
* Added two new unit tests in RSpec file in spec/models/assignment_form_spec.rb&lt;br /&gt;
* Added two new columns in Assignment table as shown below&lt;br /&gt;
* app/models/review_assignment.rb&lt;br /&gt;
* app/controllers/review_mapping_controller.rb&lt;br /&gt;
* added new file review_assignment_spec.rb in spec for testing the above functionality.&lt;br /&gt;
* add new RSpec tests in assignment_spec.rb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ALTER TABLE assignments ADD COLUMN num_reviews_required INT DEFAULT 3;&lt;br /&gt;
ALTER TABLE assignments ADD COLUMN num_reviews_allowed INT DEFAULT 3;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe &amp;quot;can not review own work&amp;quot;, type: :feature do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
        create(:assignment, name: &amp;quot;TestTeam&amp;quot;, directory_path: 'test_team')&lt;br /&gt;
        create_list(:participant, 3)&lt;br /&gt;
        create(:assignment_node)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;submission&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;review&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;metareview&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;drop_topic&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;signup&amp;quot;)&lt;br /&gt;
        create(:deadline_type, name: &amp;quot;team_formation&amp;quot;)&lt;br /&gt;
        create(:deadline_right)&lt;br /&gt;
        create(:deadline_right, name: 'Late')&lt;br /&gt;
        create(:deadline_right, name: 'OK')&lt;br /&gt;
        create(:assignment_due_date, deadline_type: DeadlineType.where(name: 'review').first, due_at: Time.now + (100 * 24 * 60 * 60))&lt;br /&gt;
        #create(:topic)&lt;br /&gt;
        create(:topic, topic_name: &amp;quot;work1&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    it &amp;quot;case1&amp;quot; do&lt;br /&gt;
        &lt;br /&gt;
        #test log in as a student&lt;br /&gt;
        &lt;br /&gt;
        user = User.find_by_name('student2064')&lt;br /&gt;
        msg = user.to_yaml&lt;br /&gt;
        File.open('log/diagnostic.txt', 'a') {|f| f.write msg }&lt;br /&gt;
        &lt;br /&gt;
        visit root_path&lt;br /&gt;
        fill_in 'login_name', with: 'student2064'&lt;br /&gt;
        fill_in 'login_password', with: 'password'&lt;br /&gt;
        click_button 'SIGN IN'&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        #expect(page).to have_content &amp;quot;Welcome!&amp;quot;&lt;br /&gt;
        #expect(page).to have_content &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        #click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        expect(page).to have_content &amp;quot;User: student2064&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;Your team&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #test if the topic can be seen and chosen by a student&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;Signup sheet&amp;quot;&lt;br /&gt;
        expect(page).to have_content &amp;quot;work1&amp;quot;&lt;br /&gt;
        my_link = find(:xpath, &amp;quot;//a[contains(@href,'sign_up_sheet/sign_up?assignment_id=#{Assignment.last.id}&amp;amp;id=1')]&amp;quot;)&lt;br /&gt;
        my_link.click&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        #test after selecting a topic, a team formed&lt;br /&gt;
        click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        click_link &amp;quot;Your work&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        fill_in 'submission', with: 'www.google.com'&lt;br /&gt;
        click_button 'Upload link'&lt;br /&gt;
        &lt;br /&gt;
        click_link &amp;quot;Assignments&amp;quot;&lt;br /&gt;
        click_link &amp;quot;TestTeam&amp;quot;&lt;br /&gt;
        click_link &amp;quot;Others' work&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        click_button &amp;quot;Request a new submission to review&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #If no link of view is on the page, then it means that no review is allowed for this user.&lt;br /&gt;
        expect(page).to have_no_link &amp;quot;view&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        #save_and_open_page&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== External Links ===&lt;br /&gt;
# link for forked repository&lt;/div&gt;</summary>
		<author><name>Ycheng15</name></author>
	</entry>
</feed>