<?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=Kyao</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=Kyao"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Kyao"/>
	<updated>2026-08-20T16:49:57Z</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_2021_-_E2158._Grading_audit_trail&amp;diff=142338</id>
		<title>CSC/ECE 517 Fall 2021 - E2158. Grading audit trail</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2158._Grading_audit_trail&amp;diff=142338"/>
		<updated>2021-11-30T04:40:33Z</updated>

		<summary type="html">&lt;p&gt;Kyao: /* Important Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Problem Definition ==&lt;br /&gt;
After an instructor gave a grade to an assignment, there is no way to track who gave the grade. Any instructor can assign/edit a grade freely. There is no way of tracking who did it.&lt;br /&gt;
&lt;br /&gt;
A grading audit trail must be created and the following information needs to be stored: &lt;br /&gt;
:1. When a grade is assigned by an instructor, there needs to be an indication of who did it and when it was done. &lt;br /&gt;
:2. Comments previously provided by other instructors must also be preserved.&lt;br /&gt;
&lt;br /&gt;
This information needs to be stored every time an instructor edits a grade/comment and clicks the save button.&lt;br /&gt;
&lt;br /&gt;
Currently, there are two places need to add grading audit trail: &lt;br /&gt;
:1. '''Review grade''': Log in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View Review Report&lt;br /&gt;
:2. '''Submission grade''': Log in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View submissions&lt;br /&gt;
&lt;br /&gt;
The grading audit trail can probably be implemented as the submission records history on Expertiza.&lt;br /&gt;
The required page can be reached by logging in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View Submissions -&amp;gt; History&lt;br /&gt;
&lt;br /&gt;
At the minimum, a grading log entry must include the '''instructor id''', '''assignment id''', '''student id''', '''grade''', '''comment''' and '''timestamp'''.&lt;br /&gt;
&lt;br /&gt;
== Previous Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/E1934_-_Grading_Audit_Trail Previous Wiki Page]&lt;br /&gt;
&lt;br /&gt;
[https://youtu.be/yyxX_kRYxLc Screencast]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Review ===&lt;br /&gt;
&lt;br /&gt;
:1. '''Review grade''' part in the previous implementation served well, we only need to fix some UI issues in the current implementation; &lt;br /&gt;
:2. But for '''Submission grade''' part, we need to add a table in order to save submission history including the instructor id, assignment id, student id, grade, comment, and timestamp.&lt;br /&gt;
&lt;br /&gt;
=== Issues with Previous Work ===&lt;br /&gt;
:1. For review grades, the “Grading History” link must not be in a separate column. It should be in smaller text below in the “Save” button.&lt;br /&gt;
&lt;br /&gt;
:2. In the view grading record page, remove the receiver column and add it to the title.&lt;br /&gt;
&lt;br /&gt;
:3. Restrict the column width on the grading record page.&lt;br /&gt;
&lt;br /&gt;
:4. Add comments on list_submissions.html.erb to indicate that the alignment was changed to fix code climate issues.&lt;br /&gt;
&lt;br /&gt;
:5. Revert changes made to list_review_mapping.html.erb.&lt;br /&gt;
 &lt;br /&gt;
:6. Remove the review_report-html.erb file.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
=== Expected View ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:E2158_Proposed_Solution_1.png|1100px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:E2158_Proposed_Solution_2.png|1100px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:E2158_Proposed_Solution_3.png|1100px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== History of Comment and Grade for Reviews ===&lt;br /&gt;
&lt;br /&gt;
In this part, we will modify the current view of review page, to add the link &amp;quot;history&amp;quot; to a proper place as the expected design picture shows.&lt;br /&gt;
&lt;br /&gt;
The related table from databases is [https://expertiza.csc.ncsu.edu/index.php/Review_scores review_scores]. The ER table of review_scores is shown as below.&lt;br /&gt;
&lt;br /&gt;
[[File:Review scores imported.png]]&lt;br /&gt;
==== Review History Flow====&lt;br /&gt;
[[File:reviewhistory.png]]&lt;br /&gt;
&lt;br /&gt;
=== History of Comment and Grade for Submissions===&lt;br /&gt;
&lt;br /&gt;
In Expertiza, we find the fields related to grade and comment are located in the model '''team''', which is only able to be overwritten. Since there is no table to store the history of the comment and score given by instructors and TAs, we need to do:&lt;br /&gt;
&lt;br /&gt;
:1. Review the related implementation of previous work in order to evaluate and understand the process of adding new models.&lt;br /&gt;
&lt;br /&gt;
:2. Implement the related Model, View and Controller:&lt;br /&gt;
&lt;br /&gt;
:* Model: grading_history.rb &lt;br /&gt;
&lt;br /&gt;
:* Controller:  grading_history_controller.rb&lt;br /&gt;
&lt;br /&gt;
:* View: related pages.&lt;br /&gt;
&lt;br /&gt;
Because in Expertiza the team ID will be generated for each given assignment, so the original design of grade / comment of team's submission are the field belongs to '''team'''. So our model uses the foreign key to only the team but not the related assignments or submissions.&lt;br /&gt;
&lt;br /&gt;
The expected class of grading history could be shown as:&lt;br /&gt;
&lt;br /&gt;
[[File:GradingHistory.png]]&lt;br /&gt;
&lt;br /&gt;
==== Team History Flow====&lt;br /&gt;
[[File:teamhistory.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== Rspec Unit Tests ===&lt;br /&gt;
==== For History of the Grade of Reviews ====&lt;br /&gt;
The history of the grade and comments are related to this controller app/controllers/review_mapping_controller.rb and this view app/views/reports/_review_report.html.erb. &lt;br /&gt;
&lt;br /&gt;
So the related RSpec tests are planned to be executed:&lt;br /&gt;
&lt;br /&gt;
    spec/controllers/review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
==== For History of the Grade of Team Submissions ====&lt;br /&gt;
The history of the grade and comments are related to the new model grading_history.rb and the new controller grading_history_controller.rb.&lt;br /&gt;
&lt;br /&gt;
So the related RSpec tests are planned to be executed:&lt;br /&gt;
&lt;br /&gt;
    spec/models/grading_history.rb&lt;br /&gt;
    spec/controllers/grading_history_controller.rb&lt;br /&gt;
&lt;br /&gt;
For the feature part, test if the grading history and instructor can be shown in chronological order:&lt;br /&gt;
&lt;br /&gt;
    spec/features/grade_histories_spec.rb&lt;br /&gt;
    spec/features/helpers/grade_histories_helper.rb&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Tests ===&lt;br /&gt;
To start the test, we need to log in as instructor or TA first. These accounts should have access to the assignment. For example: we can use '''intructor6/password''' or '''teaching_assistant8631/password''';&lt;br /&gt;
&lt;br /&gt;
==== Scenario 1: Grading histories of submissions ====&lt;br /&gt;
Step 1. Log in as instructor/TA -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View submissions&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:E2158_view_submisson.png|1100px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Step 2. The instructor/TA can assign grades to a team by clicking 'Assign Grade' in the 'Team name' column:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:E2158_grading_history_submisson1.png|1100px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Step 3. The instructor/TA can view the grading audit trail by clicking 'Grading History' in the 'History' column, here is the record page:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:E2158_grading_history_submisson2.png|1100px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Scenario 2: Grading histories of reviews ====&lt;br /&gt;
Step 1. Log in as instructor/TA -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View Reports&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:E2158_view_report.png|1100px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Step 2. Select 'Review Report' then click 'View', here is the Review Report page. The instructor/TA can assign grades to a review by inputing 'Grade' and 'Comment' then clicking 'Save' button:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:E2158_grading_history_report1.png|1100px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Step 3. The instructor/TA can view the grading audit trail by clicking 'Grading History' as Step 2 figure shows, here is the record page:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:E2158_grading_history_report2.png|1100px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Important Links ==&lt;br /&gt;
#[https://github.com/duliwencynthia/expertiza/tree/beta Git Repo]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2130 Pull Request]&lt;br /&gt;
#[https://www.youtube.com/watch?v=ad4wF6--5dQ Test1]&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor:''' Xiao, Kai (yxiao28)&lt;br /&gt;
&lt;br /&gt;
Yao, Kaiyong (kyao)&lt;br /&gt;
&lt;br /&gt;
Hou, Guanyu (ghou3)&lt;br /&gt;
&lt;br /&gt;
Du, Haoze (hdu5)&lt;br /&gt;
&lt;br /&gt;
Du, Liwen (ldu2)&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2158._Grading_audit_trail&amp;diff=141479</id>
		<title>CSC/ECE 517 Fall 2021 - E2158. Grading audit trail</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2158._Grading_audit_trail&amp;diff=141479"/>
		<updated>2021-11-09T05:00:49Z</updated>

		<summary type="html">&lt;p&gt;Kyao: /* History of Comment and Grade for Reviews */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Problem Definition ==&lt;br /&gt;
After an instructor gave a grade to an assignment, there is no way to track who gave the grade. Any instructor can assign/edit a grade freely. There is no way of tracking who did it.&lt;br /&gt;
&lt;br /&gt;
A grading audit trail must be created and the following information needs to be stored: &lt;br /&gt;
:1. When a grade is assigned by an instructor, there needs to be an indication of who did it and when it was done. &lt;br /&gt;
:2. Comments previously provided by other instructors must also be preserved.&lt;br /&gt;
&lt;br /&gt;
This information needs to be stored every time an instructor edits a grade/comment and clicks the save button.&lt;br /&gt;
&lt;br /&gt;
Currently, there are two places need to add grading audit trail: &lt;br /&gt;
:1. '''Review grade''': Log in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View Review Report&lt;br /&gt;
:2. '''Submission grade''': Log in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View submissions&lt;br /&gt;
&lt;br /&gt;
The grading audit trail can probably be implemented as the submission records history on Expertiza.&lt;br /&gt;
The required page can be reached by logging in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View Submissions -&amp;gt; History&lt;br /&gt;
&lt;br /&gt;
At the minimum, a grading log entry must include the '''instructor id''', '''assignment id''', '''student id''', '''grade''', '''comment''' and '''timestamp'''.&lt;br /&gt;
&lt;br /&gt;
== Previous Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/E1934_-_Grading_Audit_Trail Previous Wiki Page]&lt;br /&gt;
&lt;br /&gt;
[https://youtu.be/yyxX_kRYxLc Screencast]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Review ===&lt;br /&gt;
&lt;br /&gt;
:1. '''Review grade''' part in the previous implementation served well, we only need to fix some UI issues in the current implementation; &lt;br /&gt;
:2. But for '''Submission grade''' part, we need to add a table in order to save submission history including the instructor id, assignment id, student id, grade, comment, and timestamp.&lt;br /&gt;
&lt;br /&gt;
=== Issues with Previous Work ===&lt;br /&gt;
:1. For review grades, the “Grading History” link must not be in a separate column. It should be in smaller text below in the “Save” button.&lt;br /&gt;
&lt;br /&gt;
:2. In the view grading record page, remove the receiver column and add it to the title.&lt;br /&gt;
&lt;br /&gt;
:3. Restrict the column width on the grading record page.&lt;br /&gt;
&lt;br /&gt;
:4. Add comments on list_submissions.html.erb to indicate that the alignment was changed to fix code climate issues.&lt;br /&gt;
&lt;br /&gt;
:5. Revert changes made to list_review_mapping.html.erb.&lt;br /&gt;
 &lt;br /&gt;
:6. Remove the review_report-html.erb file.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
=== Expected View ===&lt;br /&gt;
&lt;br /&gt;
[[File:E2158_Proposed_Solution_1.png|1100px|center]]&lt;br /&gt;
[[File:E2158_Proposed_Solution_2.png|1100px|center]]&lt;br /&gt;
[[File:E2158_Proposed_Solution_3.png|1100px|center]]&lt;br /&gt;
&lt;br /&gt;
=== History of Comment and Grade for Reviews ===&lt;br /&gt;
&lt;br /&gt;
In this part, we will modify the current view of review page, to add the link &amp;quot;history&amp;quot; to a proper place as the expected design picture shows.&lt;br /&gt;
&lt;br /&gt;
The related table from databases is [https://expertiza.csc.ncsu.edu/index.php/Review_scores review_scores]. The ER table of review_scores is shown as below.&lt;br /&gt;
&lt;br /&gt;
[[File:Review scores imported.png]]&lt;br /&gt;
==== Review History Flow====&lt;br /&gt;
[[File:reviewhistory.png]]&lt;br /&gt;
&lt;br /&gt;
=== History of Comment and Grade for Submissions===&lt;br /&gt;
&lt;br /&gt;
In Expertiza, we find the fields related to grade and comment are located in the model '''team''', which is only able to be overwritten. Since there is no table to store the history of the comment and score given by instructors and TAs, we need to do:&lt;br /&gt;
&lt;br /&gt;
:1. Review the related implementation of previous work in order to evaluate and understand the process of adding new models.&lt;br /&gt;
&lt;br /&gt;
:2. Implement the related Model, View and Controller:&lt;br /&gt;
&lt;br /&gt;
:* Model: grading_history.rb &lt;br /&gt;
&lt;br /&gt;
:* Controller:  grading_history_controller.rb&lt;br /&gt;
&lt;br /&gt;
:* View: related pages.&lt;br /&gt;
&lt;br /&gt;
Because in Expertiza the team ID will be generated for each given assignment, so the original design of grade / comment of team's submission are the field belongs to '''team'''. So our model uses the foreign key to only the team but not the related assignments or submissions.&lt;br /&gt;
&lt;br /&gt;
The expected class of grading history could be shown as:&lt;br /&gt;
&lt;br /&gt;
[[File:GradingHistory.png]]&lt;br /&gt;
&lt;br /&gt;
==== Team History Flow====&lt;br /&gt;
[[File:teamhistory.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== Rspec Unit Tests ===&lt;br /&gt;
==== For History of the Grade of Reviews ====&lt;br /&gt;
The history of the grade and comments are related to this controller app/controllers/review_mapping_controller.rb and this view app/views/reports/_review_report.html.erb. &lt;br /&gt;
&lt;br /&gt;
So the related RSpec tests are planned to be executed:&lt;br /&gt;
&lt;br /&gt;
    spec/controllers/review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
==== For History of the Grade of Team Submissions ====&lt;br /&gt;
The history of the grade and comments are related to the new model grading_history.rb and the new controller grading_history_controller.rb.&lt;br /&gt;
&lt;br /&gt;
So the related RSpec tests are planned to be executed:&lt;br /&gt;
&lt;br /&gt;
    spec/models/grading_history.rb&lt;br /&gt;
    spec/controllers/grading_history_controller.rb&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Tests ===&lt;br /&gt;
The new features of recording and showing the history of grades and comments of reviews and submissions will be manually tested after we finished the implementation of those functions.&lt;br /&gt;
&lt;br /&gt;
:1. An assignment and a team will be generated, and at most 3 instructors / TAs will give grades for these situations:&lt;br /&gt;
    1. 1 submission, 1 review, 1 grade and comment for submission, 1 grade and comment for review.&lt;br /&gt;
    2. 1 submission, 2 review, 2 grade and comment for submission from different graders, 2 grade and comment for review from different graders.&lt;br /&gt;
:2. An assignment and 3 teams will be generated, and at most 3 instructors / TAs will give grades for these situations:&lt;br /&gt;
    1. For each team: 1 submission, 1 review, 1 grade and comment for submission, 1 grade and comment for review.&lt;br /&gt;
    2. For each team: 1 submission, 2 review, 2 grade and comment for submission from different graders, 2 grade and comment for review from different graders.&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
We will generate some edge cases to test the robustness of our work.&lt;br /&gt;
&lt;br /&gt;
== Important Links ==&lt;br /&gt;
#[https://github.com/duliwencynthia/expertiza/tree/beta Git path]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2130 Pull Request]&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor:''' Xiao, Kai (yxiao28)&lt;br /&gt;
&lt;br /&gt;
Yao, Kaiyong (kyao)&lt;br /&gt;
&lt;br /&gt;
Hou, Guanyu (ghou3)&lt;br /&gt;
&lt;br /&gt;
Du, Haoze (hdu5)&lt;br /&gt;
&lt;br /&gt;
Du, Liwen (ldu2)&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2158._Grading_audit_trail&amp;diff=141478</id>
		<title>CSC/ECE 517 Fall 2021 - E2158. Grading audit trail</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2158._Grading_audit_trail&amp;diff=141478"/>
		<updated>2021-11-09T05:00:22Z</updated>

		<summary type="html">&lt;p&gt;Kyao: /* History of Comment and Grade for Submissions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Problem Definition ==&lt;br /&gt;
After an instructor gave a grade to an assignment, there is no way to track who gave the grade. Any instructor can assign/edit a grade freely. There is no way of tracking who did it.&lt;br /&gt;
&lt;br /&gt;
A grading audit trail must be created and the following information needs to be stored: &lt;br /&gt;
:1. When a grade is assigned by an instructor, there needs to be an indication of who did it and when it was done. &lt;br /&gt;
:2. Comments previously provided by other instructors must also be preserved.&lt;br /&gt;
&lt;br /&gt;
This information needs to be stored every time an instructor edits a grade/comment and clicks the save button.&lt;br /&gt;
&lt;br /&gt;
Currently, there are two places need to add grading audit trail: &lt;br /&gt;
:1. '''Review grade''': Log in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View Review Report&lt;br /&gt;
:2. '''Submission grade''': Log in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View submissions&lt;br /&gt;
&lt;br /&gt;
The grading audit trail can probably be implemented as the submission records history on Expertiza.&lt;br /&gt;
The required page can be reached by logging in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View Submissions -&amp;gt; History&lt;br /&gt;
&lt;br /&gt;
At the minimum, a grading log entry must include the '''instructor id''', '''assignment id''', '''student id''', '''grade''', '''comment''' and '''timestamp'''.&lt;br /&gt;
&lt;br /&gt;
== Previous Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/E1934_-_Grading_Audit_Trail Previous Wiki Page]&lt;br /&gt;
&lt;br /&gt;
[https://youtu.be/yyxX_kRYxLc Screencast]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Review ===&lt;br /&gt;
&lt;br /&gt;
:1. '''Review grade''' part in the previous implementation served well, we only need to fix some UI issues in the current implementation; &lt;br /&gt;
:2. But for '''Submission grade''' part, we need to add a table in order to save submission history including the instructor id, assignment id, student id, grade, comment, and timestamp.&lt;br /&gt;
&lt;br /&gt;
=== Issues with Previous Work ===&lt;br /&gt;
:1. For review grades, the “Grading History” link must not be in a separate column. It should be in smaller text below in the “Save” button.&lt;br /&gt;
&lt;br /&gt;
:2. In the view grading record page, remove the receiver column and add it to the title.&lt;br /&gt;
&lt;br /&gt;
:3. Restrict the column width on the grading record page.&lt;br /&gt;
&lt;br /&gt;
:4. Add comments on list_submissions.html.erb to indicate that the alignment was changed to fix code climate issues.&lt;br /&gt;
&lt;br /&gt;
:5. Revert changes made to list_review_mapping.html.erb.&lt;br /&gt;
 &lt;br /&gt;
:6. Remove the review_report-html.erb file.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
=== Expected View ===&lt;br /&gt;
&lt;br /&gt;
[[File:E2158_Proposed_Solution_1.png|1100px|center]]&lt;br /&gt;
[[File:E2158_Proposed_Solution_2.png|1100px|center]]&lt;br /&gt;
[[File:E2158_Proposed_Solution_3.png|1100px|center]]&lt;br /&gt;
&lt;br /&gt;
=== History of Comment and Grade for Reviews ===&lt;br /&gt;
&lt;br /&gt;
In this part, we will modify the current view of review page, to add the link &amp;quot;history&amp;quot; to a proper place as the expected design picture shows.&lt;br /&gt;
&lt;br /&gt;
The related table from databases is [https://expertiza.csc.ncsu.edu/index.php/Review_scores review_scores]. The ER table of review_scores is shown as below.&lt;br /&gt;
&lt;br /&gt;
[[File:Review scores imported.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:reviewhistory.png]]&lt;br /&gt;
&lt;br /&gt;
=== History of Comment and Grade for Submissions===&lt;br /&gt;
&lt;br /&gt;
In Expertiza, we find the fields related to grade and comment are located in the model '''team''', which is only able to be overwritten. Since there is no table to store the history of the comment and score given by instructors and TAs, we need to do:&lt;br /&gt;
&lt;br /&gt;
:1. Review the related implementation of previous work in order to evaluate and understand the process of adding new models.&lt;br /&gt;
&lt;br /&gt;
:2. Implement the related Model, View and Controller:&lt;br /&gt;
&lt;br /&gt;
:* Model: grading_history.rb &lt;br /&gt;
&lt;br /&gt;
:* Controller:  grading_history_controller.rb&lt;br /&gt;
&lt;br /&gt;
:* View: related pages.&lt;br /&gt;
&lt;br /&gt;
Because in Expertiza the team ID will be generated for each given assignment, so the original design of grade / comment of team's submission are the field belongs to '''team'''. So our model uses the foreign key to only the team but not the related assignments or submissions.&lt;br /&gt;
&lt;br /&gt;
The expected class of grading history could be shown as:&lt;br /&gt;
&lt;br /&gt;
[[File:GradingHistory.png]]&lt;br /&gt;
&lt;br /&gt;
==== Team History Flow====&lt;br /&gt;
[[File:teamhistory.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== Rspec Unit Tests ===&lt;br /&gt;
==== For History of the Grade of Reviews ====&lt;br /&gt;
The history of the grade and comments are related to this controller app/controllers/review_mapping_controller.rb and this view app/views/reports/_review_report.html.erb. &lt;br /&gt;
&lt;br /&gt;
So the related RSpec tests are planned to be executed:&lt;br /&gt;
&lt;br /&gt;
    spec/controllers/review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
==== For History of the Grade of Team Submissions ====&lt;br /&gt;
The history of the grade and comments are related to the new model grading_history.rb and the new controller grading_history_controller.rb.&lt;br /&gt;
&lt;br /&gt;
So the related RSpec tests are planned to be executed:&lt;br /&gt;
&lt;br /&gt;
    spec/models/grading_history.rb&lt;br /&gt;
    spec/controllers/grading_history_controller.rb&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Tests ===&lt;br /&gt;
The new features of recording and showing the history of grades and comments of reviews and submissions will be manually tested after we finished the implementation of those functions.&lt;br /&gt;
&lt;br /&gt;
:1. An assignment and a team will be generated, and at most 3 instructors / TAs will give grades for these situations:&lt;br /&gt;
    1. 1 submission, 1 review, 1 grade and comment for submission, 1 grade and comment for review.&lt;br /&gt;
    2. 1 submission, 2 review, 2 grade and comment for submission from different graders, 2 grade and comment for review from different graders.&lt;br /&gt;
:2. An assignment and 3 teams will be generated, and at most 3 instructors / TAs will give grades for these situations:&lt;br /&gt;
    1. For each team: 1 submission, 1 review, 1 grade and comment for submission, 1 grade and comment for review.&lt;br /&gt;
    2. For each team: 1 submission, 2 review, 2 grade and comment for submission from different graders, 2 grade and comment for review from different graders.&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
We will generate some edge cases to test the robustness of our work.&lt;br /&gt;
&lt;br /&gt;
== Important Links ==&lt;br /&gt;
#[https://github.com/duliwencynthia/expertiza/tree/beta Git path]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2130 Pull Request]&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor:''' Xiao, Kai (yxiao28)&lt;br /&gt;
&lt;br /&gt;
Yao, Kaiyong (kyao)&lt;br /&gt;
&lt;br /&gt;
Hou, Guanyu (ghou3)&lt;br /&gt;
&lt;br /&gt;
Du, Haoze (hdu5)&lt;br /&gt;
&lt;br /&gt;
Du, Liwen (ldu2)&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2158._Grading_audit_trail&amp;diff=141474</id>
		<title>CSC/ECE 517 Fall 2021 - E2158. Grading audit trail</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2158._Grading_audit_trail&amp;diff=141474"/>
		<updated>2021-11-09T04:57:46Z</updated>

		<summary type="html">&lt;p&gt;Kyao: /* History of Comment and Grade for Submissions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Problem Definition ==&lt;br /&gt;
After an instructor gave a grade to an assignment, there is no way to track who gave the grade. Any instructor can assign/edit a grade freely. There is no way of tracking who did it.&lt;br /&gt;
&lt;br /&gt;
A grading audit trail must be created and the following information needs to be stored: &lt;br /&gt;
:1. When a grade is assigned by an instructor, there needs to be an indication of who did it and when it was done. &lt;br /&gt;
:2. Comments previously provided by other instructors must also be preserved.&lt;br /&gt;
&lt;br /&gt;
This information needs to be stored every time an instructor edits a grade/comment and clicks the save button.&lt;br /&gt;
&lt;br /&gt;
Currently, there are two places need to add grading audit trail: &lt;br /&gt;
:1. '''Review grade''': Log in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View Review Report&lt;br /&gt;
:2. '''Submission grade''': Log in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View submissions&lt;br /&gt;
&lt;br /&gt;
The grading audit trail can probably be implemented as the submission records history on Expertiza.&lt;br /&gt;
The required page can be reached by logging in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View Submissions -&amp;gt; History&lt;br /&gt;
&lt;br /&gt;
At the minimum, a grading log entry must include the '''instructor id''', '''assignment id''', '''student id''', '''grade''', '''comment''' and '''timestamp'''.&lt;br /&gt;
&lt;br /&gt;
== Previous Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/E1934_-_Grading_Audit_Trail Previous Wiki Page]&lt;br /&gt;
&lt;br /&gt;
[https://youtu.be/yyxX_kRYxLc Screencast]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Review ===&lt;br /&gt;
&lt;br /&gt;
:1. '''Review grade''' part in the previous implementation served well, we only need to fix some UI issues in the current implementation; &lt;br /&gt;
:2. But for '''Submission grade''' part, we need to add a table in order to save submission history including the instructor id, assignment id, student id, grade, comment, and timestamp.&lt;br /&gt;
&lt;br /&gt;
=== Issues with Previous Work ===&lt;br /&gt;
:1. For review grades, the “Grading History” link must not be in a separate column. It should be in smaller text below in the “Save” button.&lt;br /&gt;
&lt;br /&gt;
:2. In the view grading record page, remove the receiver column and add it to the title.&lt;br /&gt;
&lt;br /&gt;
:3. Restrict the column width on the grading record page.&lt;br /&gt;
&lt;br /&gt;
:4. Add comments on list_submissions.html.erb to indicate that the alignment was changed to fix code climate issues.&lt;br /&gt;
&lt;br /&gt;
:5. Revert changes made to list_review_mapping.html.erb.&lt;br /&gt;
 &lt;br /&gt;
:6. Remove the review_report-html.erb file.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
=== Expected View ===&lt;br /&gt;
&lt;br /&gt;
[[File:E2158_Proposed_Solution_1.png|1100px|center]]&lt;br /&gt;
[[File:E2158_Proposed_Solution_2.png|1100px|center]]&lt;br /&gt;
[[File:E2158_Proposed_Solution_3.png|1100px|center]]&lt;br /&gt;
&lt;br /&gt;
=== History of Comment and Grade for Reviews ===&lt;br /&gt;
&lt;br /&gt;
In this part, we will modify the current view of review page, to add the link &amp;quot;history&amp;quot; to a proper place as the expected design picture shows.&lt;br /&gt;
&lt;br /&gt;
The related table from databases is [https://expertiza.csc.ncsu.edu/index.php/Review_scores review_scores]. The ER table of review_scores is shown as below.&lt;br /&gt;
&lt;br /&gt;
[[File:Review scores imported.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:reviewhistory.png]]&lt;br /&gt;
&lt;br /&gt;
=== History of Comment and Grade for Submissions===&lt;br /&gt;
&lt;br /&gt;
In Expertiza, we find the fields related to grade and comment are located in the model '''team''', which is only able to be overwritten. Since there is no table to store the history of the comment and score given by instructors and TAs, we need to do:&lt;br /&gt;
&lt;br /&gt;
:1. Review the related implementation of previous work in order to evaluate and understand the process of adding new models.&lt;br /&gt;
&lt;br /&gt;
:2. Implement the related Model, View and Controller:&lt;br /&gt;
&lt;br /&gt;
:* Model: grading_history.rb &lt;br /&gt;
&lt;br /&gt;
:* Controller:  grading_history_controller.rb&lt;br /&gt;
&lt;br /&gt;
:* View: related pages.&lt;br /&gt;
&lt;br /&gt;
Because in Expertiza the team ID will be generated for each given assignment, so the original design of grade / comment of team's submission are the field belongs to '''team'''. So our model uses the foreign key to only the team but not the related assignments or submissions.&lt;br /&gt;
&lt;br /&gt;
The expected class of grading history could be shown as:&lt;br /&gt;
&lt;br /&gt;
[[File:GradingHistory.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:teamhistory.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== Rspec Unit Tests ===&lt;br /&gt;
==== For History of the Grade of Reviews ====&lt;br /&gt;
The history of the grade and comments are related to this controller app/controllers/review_mapping_controller.rb and this view app/views/reports/_review_report.html.erb. &lt;br /&gt;
&lt;br /&gt;
So the related RSpec tests are planned to be executed:&lt;br /&gt;
&lt;br /&gt;
    spec/controllers/review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
==== For History of the Grade of Team Submissions ====&lt;br /&gt;
The history of the grade and comments are related to the new model grading_history.rb and the new controller grading_history_controller.rb.&lt;br /&gt;
&lt;br /&gt;
So the related RSpec tests are planned to be executed:&lt;br /&gt;
&lt;br /&gt;
    spec/models/grading_history.rb&lt;br /&gt;
    spec/controllers/grading_history_controller.rb&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Tests ===&lt;br /&gt;
The new features of recording and showing the history of grades and comments of reviews and submissions will be manually tested after we finished the implementation of those functions.&lt;br /&gt;
&lt;br /&gt;
:1. An assignment and a team will be generated, and at most 3 instructors / TAs will give grades for these situations:&lt;br /&gt;
    1. 1 submission, 1 review, 1 grade and comment for submission, 1 grade and comment for review.&lt;br /&gt;
    2. 1 submission, 2 review, 2 grade and comment for submission from different graders, 2 grade and comment for review from different graders.&lt;br /&gt;
:2. An assignment and 3 teams will be generated, and at most 3 instructors / TAs will give grades for these situations:&lt;br /&gt;
    1. For each team: 1 submission, 1 review, 1 grade and comment for submission, 1 grade and comment for review.&lt;br /&gt;
    2. For each team: 1 submission, 2 review, 2 grade and comment for submission from different graders, 2 grade and comment for review from different graders.&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
We will generate some edge cases to test the robustness of our work.&lt;br /&gt;
&lt;br /&gt;
== Important Links ==&lt;br /&gt;
#[https://github.com/duliwencynthia/expertiza/tree/beta Git path]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2130 Pull Request]&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor:''' Xiao, Kai (yxiao28)&lt;br /&gt;
&lt;br /&gt;
Yao, Kaiyong (kyao)&lt;br /&gt;
&lt;br /&gt;
Hou, Guanyu (ghou3)&lt;br /&gt;
&lt;br /&gt;
Du, Haoze (hdu5)&lt;br /&gt;
&lt;br /&gt;
Du, Liwen (ldu2)&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2158._Grading_audit_trail&amp;diff=141473</id>
		<title>CSC/ECE 517 Fall 2021 - E2158. Grading audit trail</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2158._Grading_audit_trail&amp;diff=141473"/>
		<updated>2021-11-09T04:57:33Z</updated>

		<summary type="html">&lt;p&gt;Kyao: /* History of Comment and Grade for Submissions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Problem Definition ==&lt;br /&gt;
After an instructor gave a grade to an assignment, there is no way to track who gave the grade. Any instructor can assign/edit a grade freely. There is no way of tracking who did it.&lt;br /&gt;
&lt;br /&gt;
A grading audit trail must be created and the following information needs to be stored: &lt;br /&gt;
:1. When a grade is assigned by an instructor, there needs to be an indication of who did it and when it was done. &lt;br /&gt;
:2. Comments previously provided by other instructors must also be preserved.&lt;br /&gt;
&lt;br /&gt;
This information needs to be stored every time an instructor edits a grade/comment and clicks the save button.&lt;br /&gt;
&lt;br /&gt;
Currently, there are two places need to add grading audit trail: &lt;br /&gt;
:1. '''Review grade''': Log in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View Review Report&lt;br /&gt;
:2. '''Submission grade''': Log in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View submissions&lt;br /&gt;
&lt;br /&gt;
The grading audit trail can probably be implemented as the submission records history on Expertiza.&lt;br /&gt;
The required page can be reached by logging in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View Submissions -&amp;gt; History&lt;br /&gt;
&lt;br /&gt;
At the minimum, a grading log entry must include the '''instructor id''', '''assignment id''', '''student id''', '''grade''', '''comment''' and '''timestamp'''.&lt;br /&gt;
&lt;br /&gt;
== Previous Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/E1934_-_Grading_Audit_Trail Previous Wiki Page]&lt;br /&gt;
&lt;br /&gt;
[https://youtu.be/yyxX_kRYxLc Screencast]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Review ===&lt;br /&gt;
&lt;br /&gt;
:1. '''Review grade''' part in the previous implementation served well, we only need to fix some UI issues in the current implementation; &lt;br /&gt;
:2. But for '''Submission grade''' part, we need to add a table in order to save submission history including the instructor id, assignment id, student id, grade, comment, and timestamp.&lt;br /&gt;
&lt;br /&gt;
=== Issues with Previous Work ===&lt;br /&gt;
:1. For review grades, the “Grading History” link must not be in a separate column. It should be in smaller text below in the “Save” button.&lt;br /&gt;
&lt;br /&gt;
:2. In the view grading record page, remove the receiver column and add it to the title.&lt;br /&gt;
&lt;br /&gt;
:3. Restrict the column width on the grading record page.&lt;br /&gt;
&lt;br /&gt;
:4. Add comments on list_submissions.html.erb to indicate that the alignment was changed to fix code climate issues.&lt;br /&gt;
&lt;br /&gt;
:5. Revert changes made to list_review_mapping.html.erb.&lt;br /&gt;
 &lt;br /&gt;
:6. Remove the review_report-html.erb file.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
=== Expected View ===&lt;br /&gt;
&lt;br /&gt;
[[File:E2158_Proposed_Solution_1.png|1100px|center]]&lt;br /&gt;
[[File:E2158_Proposed_Solution_2.png|1100px|center]]&lt;br /&gt;
[[File:E2158_Proposed_Solution_3.png|1100px|center]]&lt;br /&gt;
&lt;br /&gt;
=== History of Comment and Grade for Reviews ===&lt;br /&gt;
&lt;br /&gt;
In this part, we will modify the current view of review page, to add the link &amp;quot;history&amp;quot; to a proper place as the expected design picture shows.&lt;br /&gt;
&lt;br /&gt;
The related table from databases is [https://expertiza.csc.ncsu.edu/index.php/Review_scores review_scores]. The ER table of review_scores is shown as below.&lt;br /&gt;
&lt;br /&gt;
[[File:Review scores imported.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:reviewhistory.png]]&lt;br /&gt;
&lt;br /&gt;
=== History of Comment and Grade for Submissions===&lt;br /&gt;
&lt;br /&gt;
In Expertiza, we find the fields related to grade and comment are located in the model '''team''', which is only able to be overwritten. Since there is no table to store the history of the comment and score given by instructors and TAs, we need to do:&lt;br /&gt;
&lt;br /&gt;
:1. Review the related implementation of previous work in order to evaluate and understand the process of adding new models.&lt;br /&gt;
&lt;br /&gt;
:2. Implement the related Model, View and Controller:&lt;br /&gt;
&lt;br /&gt;
:* Model: grading_history.rb &lt;br /&gt;
&lt;br /&gt;
:* Controller:  grading_history_controller.rb&lt;br /&gt;
&lt;br /&gt;
:* View: related pages.&lt;br /&gt;
&lt;br /&gt;
Because in Expertiza the team ID will be generated for each given assignment, so the original design of grade / comment of team's submission are the field belongs to '''team'''. So our model uses the foreign key to only the team but not the related assignments or submissions.&lt;br /&gt;
&lt;br /&gt;
The expected class of grading history could be shown as:&lt;br /&gt;
&lt;br /&gt;
[[File:GradingHistory.png]]&lt;br /&gt;
[[File:teamhistory.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== Rspec Unit Tests ===&lt;br /&gt;
==== For History of the Grade of Reviews ====&lt;br /&gt;
The history of the grade and comments are related to this controller app/controllers/review_mapping_controller.rb and this view app/views/reports/_review_report.html.erb. &lt;br /&gt;
&lt;br /&gt;
So the related RSpec tests are planned to be executed:&lt;br /&gt;
&lt;br /&gt;
    spec/controllers/review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
==== For History of the Grade of Team Submissions ====&lt;br /&gt;
The history of the grade and comments are related to the new model grading_history.rb and the new controller grading_history_controller.rb.&lt;br /&gt;
&lt;br /&gt;
So the related RSpec tests are planned to be executed:&lt;br /&gt;
&lt;br /&gt;
    spec/models/grading_history.rb&lt;br /&gt;
    spec/controllers/grading_history_controller.rb&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Tests ===&lt;br /&gt;
The new features of recording and showing the history of grades and comments of reviews and submissions will be manually tested after we finished the implementation of those functions.&lt;br /&gt;
&lt;br /&gt;
:1. An assignment and a team will be generated, and at most 3 instructors / TAs will give grades for these situations:&lt;br /&gt;
    1. 1 submission, 1 review, 1 grade and comment for submission, 1 grade and comment for review.&lt;br /&gt;
    2. 1 submission, 2 review, 2 grade and comment for submission from different graders, 2 grade and comment for review from different graders.&lt;br /&gt;
:2. An assignment and 3 teams will be generated, and at most 3 instructors / TAs will give grades for these situations:&lt;br /&gt;
    1. For each team: 1 submission, 1 review, 1 grade and comment for submission, 1 grade and comment for review.&lt;br /&gt;
    2. For each team: 1 submission, 2 review, 2 grade and comment for submission from different graders, 2 grade and comment for review from different graders.&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
We will generate some edge cases to test the robustness of our work.&lt;br /&gt;
&lt;br /&gt;
== Important Links ==&lt;br /&gt;
#[https://github.com/duliwencynthia/expertiza/tree/beta Git path]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2130 Pull Request]&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor:''' Xiao, Kai (yxiao28)&lt;br /&gt;
&lt;br /&gt;
Yao, Kaiyong (kyao)&lt;br /&gt;
&lt;br /&gt;
Hou, Guanyu (ghou3)&lt;br /&gt;
&lt;br /&gt;
Du, Haoze (hdu5)&lt;br /&gt;
&lt;br /&gt;
Du, Liwen (ldu2)&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2158._Grading_audit_trail&amp;diff=141472</id>
		<title>CSC/ECE 517 Fall 2021 - E2158. Grading audit trail</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2158._Grading_audit_trail&amp;diff=141472"/>
		<updated>2021-11-09T04:57:05Z</updated>

		<summary type="html">&lt;p&gt;Kyao: /* History of Comment and Grade for Reviews */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Problem Definition ==&lt;br /&gt;
After an instructor gave a grade to an assignment, there is no way to track who gave the grade. Any instructor can assign/edit a grade freely. There is no way of tracking who did it.&lt;br /&gt;
&lt;br /&gt;
A grading audit trail must be created and the following information needs to be stored: &lt;br /&gt;
:1. When a grade is assigned by an instructor, there needs to be an indication of who did it and when it was done. &lt;br /&gt;
:2. Comments previously provided by other instructors must also be preserved.&lt;br /&gt;
&lt;br /&gt;
This information needs to be stored every time an instructor edits a grade/comment and clicks the save button.&lt;br /&gt;
&lt;br /&gt;
Currently, there are two places need to add grading audit trail: &lt;br /&gt;
:1. '''Review grade''': Log in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View Review Report&lt;br /&gt;
:2. '''Submission grade''': Log in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View submissions&lt;br /&gt;
&lt;br /&gt;
The grading audit trail can probably be implemented as the submission records history on Expertiza.&lt;br /&gt;
The required page can be reached by logging in as instructor -&amp;gt; Manage -&amp;gt; Assignments -&amp;gt; View Submissions -&amp;gt; History&lt;br /&gt;
&lt;br /&gt;
At the minimum, a grading log entry must include the '''instructor id''', '''assignment id''', '''student id''', '''grade''', '''comment''' and '''timestamp'''.&lt;br /&gt;
&lt;br /&gt;
== Previous Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/E1934_-_Grading_Audit_Trail Previous Wiki Page]&lt;br /&gt;
&lt;br /&gt;
[https://youtu.be/yyxX_kRYxLc Screencast]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Review ===&lt;br /&gt;
&lt;br /&gt;
:1. '''Review grade''' part in the previous implementation served well, we only need to fix some UI issues in the current implementation; &lt;br /&gt;
:2. But for '''Submission grade''' part, we need to add a table in order to save submission history including the instructor id, assignment id, student id, grade, comment, and timestamp.&lt;br /&gt;
&lt;br /&gt;
=== Issues with Previous Work ===&lt;br /&gt;
:1. For review grades, the “Grading History” link must not be in a separate column. It should be in smaller text below in the “Save” button.&lt;br /&gt;
&lt;br /&gt;
:2. In the view grading record page, remove the receiver column and add it to the title.&lt;br /&gt;
&lt;br /&gt;
:3. Restrict the column width on the grading record page.&lt;br /&gt;
&lt;br /&gt;
:4. Add comments on list_submissions.html.erb to indicate that the alignment was changed to fix code climate issues.&lt;br /&gt;
&lt;br /&gt;
:5. Revert changes made to list_review_mapping.html.erb.&lt;br /&gt;
 &lt;br /&gt;
:6. Remove the review_report-html.erb file.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
=== Expected View ===&lt;br /&gt;
&lt;br /&gt;
[[File:E2158_Proposed_Solution_1.png|1100px|center]]&lt;br /&gt;
[[File:E2158_Proposed_Solution_2.png|1100px|center]]&lt;br /&gt;
[[File:E2158_Proposed_Solution_3.png|1100px|center]]&lt;br /&gt;
&lt;br /&gt;
=== History of Comment and Grade for Reviews ===&lt;br /&gt;
&lt;br /&gt;
In this part, we will modify the current view of review page, to add the link &amp;quot;history&amp;quot; to a proper place as the expected design picture shows.&lt;br /&gt;
&lt;br /&gt;
The related table from databases is [https://expertiza.csc.ncsu.edu/index.php/Review_scores review_scores]. The ER table of review_scores is shown as below.&lt;br /&gt;
&lt;br /&gt;
[[File:Review scores imported.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:reviewhistory.png]]&lt;br /&gt;
&lt;br /&gt;
=== History of Comment and Grade for Submissions===&lt;br /&gt;
&lt;br /&gt;
In Expertiza, we find the fields related to grade and comment are located in the model '''team''', which is only able to be overwritten. Since there is no table to store the history of the comment and score given by instructors and TAs, we need to do:&lt;br /&gt;
&lt;br /&gt;
:1. Review the related implementation of previous work in order to evaluate and understand the process of adding new models.&lt;br /&gt;
&lt;br /&gt;
:2. Implement the related Model, View and Controller:&lt;br /&gt;
&lt;br /&gt;
:* Model: grading_history.rb &lt;br /&gt;
&lt;br /&gt;
:* Controller:  grading_history_controller.rb&lt;br /&gt;
&lt;br /&gt;
:* View: related pages.&lt;br /&gt;
&lt;br /&gt;
Because in Expertiza the team ID will be generated for each given assignment, so the original design of grade / comment of team's submission are the field belongs to '''team'''. So our model uses the foreign key to only the team but not the related assignments or submissions.&lt;br /&gt;
&lt;br /&gt;
The expected class of grading history could be shown as:&lt;br /&gt;
&lt;br /&gt;
[[File:GradingHistory.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== Rspec Unit Tests ===&lt;br /&gt;
==== For History of the Grade of Reviews ====&lt;br /&gt;
The history of the grade and comments are related to this controller app/controllers/review_mapping_controller.rb and this view app/views/reports/_review_report.html.erb. &lt;br /&gt;
&lt;br /&gt;
So the related RSpec tests are planned to be executed:&lt;br /&gt;
&lt;br /&gt;
    spec/controllers/review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
==== For History of the Grade of Team Submissions ====&lt;br /&gt;
The history of the grade and comments are related to the new model grading_history.rb and the new controller grading_history_controller.rb.&lt;br /&gt;
&lt;br /&gt;
So the related RSpec tests are planned to be executed:&lt;br /&gt;
&lt;br /&gt;
    spec/models/grading_history.rb&lt;br /&gt;
    spec/controllers/grading_history_controller.rb&lt;br /&gt;
&lt;br /&gt;
=== Manual UI Tests ===&lt;br /&gt;
The new features of recording and showing the history of grades and comments of reviews and submissions will be manually tested after we finished the implementation of those functions.&lt;br /&gt;
&lt;br /&gt;
:1. An assignment and a team will be generated, and at most 3 instructors / TAs will give grades for these situations:&lt;br /&gt;
    1. 1 submission, 1 review, 1 grade and comment for submission, 1 grade and comment for review.&lt;br /&gt;
    2. 1 submission, 2 review, 2 grade and comment for submission from different graders, 2 grade and comment for review from different graders.&lt;br /&gt;
:2. An assignment and 3 teams will be generated, and at most 3 instructors / TAs will give grades for these situations:&lt;br /&gt;
    1. For each team: 1 submission, 1 review, 1 grade and comment for submission, 1 grade and comment for review.&lt;br /&gt;
    2. For each team: 1 submission, 2 review, 2 grade and comment for submission from different graders, 2 grade and comment for review from different graders.&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
We will generate some edge cases to test the robustness of our work.&lt;br /&gt;
&lt;br /&gt;
== Important Links ==&lt;br /&gt;
#[https://github.com/duliwencynthia/expertiza/tree/beta Git path]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2130 Pull Request]&lt;br /&gt;
&lt;br /&gt;
== Team ==&lt;br /&gt;
'''Mentor:''' Xiao, Kai (yxiao28)&lt;br /&gt;
&lt;br /&gt;
Yao, Kaiyong (kyao)&lt;br /&gt;
&lt;br /&gt;
Hou, Guanyu (ghou3)&lt;br /&gt;
&lt;br /&gt;
Du, Haoze (hdu5)&lt;br /&gt;
&lt;br /&gt;
Du, Liwen (ldu2)&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Teamhistory.png&amp;diff=141471</id>
		<title>File:Teamhistory.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Teamhistory.png&amp;diff=141471"/>
		<updated>2021-11-09T04:55:30Z</updated>

		<summary type="html">&lt;p&gt;Kyao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Reviewhistory.png&amp;diff=141470</id>
		<title>File:Reviewhistory.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Reviewhistory.png&amp;diff=141470"/>
		<updated>2021-11-09T04:55:06Z</updated>

		<summary type="html">&lt;p&gt;Kyao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2141._OSS_project_Finklestein:_Instructors_%26_Institutions&amp;diff=139454</id>
		<title>CSC/ECE 517 Fall 2021 - E2141. OSS project Finklestein: Instructors &amp; Institutions</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2141._OSS_project_Finklestein:_Instructors_%26_Institutions&amp;diff=139454"/>
		<updated>2021-10-20T18:59:56Z</updated>

		<summary type="html">&lt;p&gt;Kyao: /* Task3 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== E2141. OSS project Finklestein: Instructors &amp;amp; Institutions ==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows instructors to manager courses and assignments for students. Students can form up teams in Expertiza to work on different projects and assignments and do peer review about other students' submissions. &lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
 &lt;br /&gt;
* E2141 Project aims to fix the associations problems between the Institution and Instructor class.&lt;br /&gt;
&lt;br /&gt;
* The forked git repository for this project can be found [https://github.com/psengo7/expertiza.git]&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
The following tasks were accomplished in E2141 project:&lt;br /&gt;
&lt;br /&gt;
* Task1: The institution list should be sorted alphabetically.&lt;br /&gt;
** Details: When creating a course, the drop-down list for selecting the institution does not show in alphabetical order.&lt;br /&gt;
  [[File:Origin1.png]]&lt;br /&gt;
&lt;br /&gt;
* Task2: Adding a new institution during creation of an instructor profile.&lt;br /&gt;
** Details: The admin can attempt to create a new institution when creating a new instructor. But, after one types in the name of the institution &amp;amp; clicks create, it crashes.&lt;br /&gt;
  [[File:Origin2.png]]&lt;br /&gt;
&lt;br /&gt;
* Task3: Listing of instructors should show their institutions on the same line as their new feature.&lt;br /&gt;
** Details: When listing users, there is currently no column to display the user’s associated institution.&lt;br /&gt;
  [[File:Origin3.png]]&lt;br /&gt;
&lt;br /&gt;
====Task1====&lt;br /&gt;
As the issue is the Institution drop-down list is not alphabetically sorted. We simply added a step of sort when the Institution list was retrieved from the Database.&lt;br /&gt;
 '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;_course.html.erb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''line3'''''&amp;lt;/font&amp;gt; &amp;lt;%= select(&amp;quot;course&amp;quot;, &amp;quot;institutions_id&amp;quot;, Institution.all&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;.order(:name)&amp;lt;/font&amp;gt;.collect{ |c| [ c.name, c.id] }) %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task2====&lt;br /&gt;
The original issue was that when an admin tries to create a new instructor with a new institution a &amp;quot;No method error in Users#Create&amp;quot; occurs. However when running the program a different issue was seen below...&lt;br /&gt;
&lt;br /&gt;
    [[File:task2_issue.png]]&lt;br /&gt;
&lt;br /&gt;
To resolve this the following lines were commented out in the following files : &lt;br /&gt;
&lt;br /&gt;
 '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;app/controllers/users_controller.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''122'''''&amp;lt;/font&amp;gt;  if @user.save&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''123'''''&amp;lt;/font&amp;gt;    password = @user.reset_password &lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''124'''''   #  prepared_mail = MailerHelper.send_mail_to_user(@user, &amp;quot;Your Expertiza account and password have been created.&amp;quot;, &amp;quot;user_welcome&amp;quot;, password)&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''125'''''    # prepared_mail.deliver&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''126'''''&amp;lt;/font&amp;gt;    flash[:success] = &amp;quot;A new password has been sent to new user's e-mail address.&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;app/models/user.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''149'''''&amp;lt;/font&amp;gt;  # Function which has a MailerHelper which sends the mail welcome email to the user after signing up&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''150'''''&amp;lt;/font&amp;gt;  def email_welcome &lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''151'''''&amp;lt;/font&amp;gt;    # #this will send an account creation notification to user via email.&lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''152'''''    # MailerHelper.send_mail_to_user(self, &amp;quot;Your Expertiza account and password has been created&amp;quot;, &amp;quot;user_welcome&amp;quot;, password).deliver_now prepared_mail.deliver&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''153'''''&amp;lt;/font&amp;gt;  end&lt;br /&gt;
&lt;br /&gt;
This resolved the issues of being able to add an instructor with a newly created institution as seen in the images below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    [[File:Success_task2_part1.png]]&lt;br /&gt;
&lt;br /&gt;
    [[File:Success_task2_part2.png]]&lt;br /&gt;
&lt;br /&gt;
However due to the fact that commenting out the MailHelper could result in cascading issues in other parts of the project we decided that the best action would be to not make changes and notify the mentors of this issue until a proper resolution could be made.&lt;br /&gt;
&lt;br /&gt;
====Task3====&lt;br /&gt;
The issue is that the user page is not displaying the user's associated institution. To fix this issue, we added an 'institution' column in the HTML file retrieving the institution names of each user.&lt;br /&gt;
 '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;app/models/user.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''111'''''  def institution(ip_address = nil)&lt;br /&gt;
 '''''112'''''    if User.anonymized_view?(ip_address)&lt;br /&gt;
 '''''113'''''      self.role.name + ', ' + self.id.to_s&lt;br /&gt;
 '''''114'''''    else&lt;br /&gt;
 '''''115'''''      if self[:role_id] == 2&lt;br /&gt;
 '''''116'''''        self[:institution_id].nil? ? &amp;quot;&amp;quot; : Institution.find(self[:institution_id]).name&lt;br /&gt;
 '''''117'''''      end&lt;br /&gt;
 '''''118'''''    end&lt;br /&gt;
 '''''119'''''  end&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;app/views/users/list.html.erb&amp;lt;/font&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''20'''''&amp;lt;/font&amp;gt;  &amp;lt;tr&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''21'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Name&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''22'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Full Name&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''23'''''      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Institution&amp;lt;/th&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''24'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Email Address&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''25'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Role&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''26'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Parent&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''27'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Review&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''28'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Submission&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''29'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Metareview&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''30'''''&amp;lt;/font&amp;gt;  &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''31'''''&amp;lt;/font&amp;gt;  &amp;lt;% for user in @users %&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''32'''''&amp;lt;/font&amp;gt;    &amp;lt;% if ((params[:show] != 'true' &amp;amp;&amp;amp; !user.name(session[:ip]).include?(&amp;quot;_hidden&amp;quot;)) || params[:show] == 'true')%&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''33'''''&amp;lt;/font&amp;gt;      &amp;lt;tr class=&amp;quot;exp&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''34'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= link_to user.name(session[:ip]), impersonate_impersonate_path(:user =&amp;gt; {:name =&amp;gt; user.name(session[:ip])}), :method =&amp;gt; :post %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''35'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= link_to user.fullname(session[:ip]), :controller=&amp;gt; 'users', :action =&amp;gt; 'show', :id =&amp;gt; user.id %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''36'''''        &amp;lt;td&amp;gt;&amp;lt;%= user.institution(session[:ip]) %&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''37'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= user.email(session[:ip]) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''38'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= link_to user.role.name, :controller =&amp;gt; 'roles', :action =&amp;gt; 'show', :id =&amp;gt; user.role.id %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''39'''''&amp;lt;/font&amp;gt;        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= user.parent.try :name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''40'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= User.yesorno(user.email_on_review) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''41'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= User.yesorno(user.email_on_submission) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''42'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= User.yesorno(user.email_on_review_of_review) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''43'''''&amp;lt;/font&amp;gt;      &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''44'''''&amp;lt;/font&amp;gt;    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''45'''''&amp;lt;/font&amp;gt;  &amp;lt;% end -%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Task Demonstration==&lt;br /&gt;
====Task1====&lt;br /&gt;
 [[File:Task1-1.png]]&lt;br /&gt;
&lt;br /&gt;
====Task2====&lt;br /&gt;
 [[File:Task2-new.png]]&lt;br /&gt;
 [[File:Task2-2-new.png]]&lt;br /&gt;
&lt;br /&gt;
====Task3====&lt;br /&gt;
 [[File:Task3-1.png]]&lt;br /&gt;
&lt;br /&gt;
==Test==&lt;br /&gt;
====Test for Task1====&lt;br /&gt;
We created 4 institutions and check if they are alphabetically sorted in the selection box&lt;br /&gt;
  '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;spec/features/course_creation_spec.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''13'''''  it &amp;quot;check if the courses are sorted alphabetically&amp;quot; do&lt;br /&gt;
  '''''14'''''    create(:superadmin, name: 'super_administrator2')&lt;br /&gt;
  '''''15'''''    login_as('super_administrator2')&lt;br /&gt;
  '''''16'''''    visit &amp;quot;/course/new?private=1&amp;quot;&lt;br /&gt;
  '''''17'''''    expect(page.find(:xpath, &amp;quot;//*[@id=\&amp;quot;course_institutions_id\&amp;quot;]/option[1]&amp;quot;).text).to eq(&amp;quot;A&amp;quot;)&lt;br /&gt;
  '''''18'''''    expect(page.find(:xpath, &amp;quot;//*[@id=\&amp;quot;course_institutions_id\&amp;quot;]/option[2]&amp;quot;).text).to eq(&amp;quot;B&amp;quot;)&lt;br /&gt;
  '''''19'''''    expect(page.find(:xpath, &amp;quot;//*[@id=\&amp;quot;course_institutions_id\&amp;quot;]/option[3]&amp;quot;).text).to eq(&amp;quot;C&amp;quot;)&lt;br /&gt;
  '''''20'''''    expect(page.find(:xpath, &amp;quot;//*[@id=\&amp;quot;course_institutions_id\&amp;quot;]/option[4]&amp;quot;).text).to eq(&amp;quot;D&amp;quot;)&lt;br /&gt;
  '''''21'''''  end&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test for Task2====&lt;br /&gt;
 We tried to create a new instructor6 with a new institution name&lt;br /&gt;
  '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;spec/controllers/users_controller_spec.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''233'''''  it 'save successfully with a new institution' do&lt;br /&gt;
  '''''234'''''    session = {user: admin}&lt;br /&gt;
  '''''235'''''    params = {&lt;br /&gt;
  '''''236'''''      user: {name: 'instructor6',&lt;br /&gt;
  '''''237'''''             crypted_password: 'password',&lt;br /&gt;
  '''''238'''''             role_id: 2,&lt;br /&gt;
  '''''239'''''             password_salt: 1,&lt;br /&gt;
  '''''240'''''             fullname: '6, instructor',&lt;br /&gt;
  '''''241'''''             email: 'yzhu48@ncsu.edu',&lt;br /&gt;
  '''''242'''''             parent_id: 1,&lt;br /&gt;
  '''''243'''''             private_by_default: false,&lt;br /&gt;
  '''''244'''''             mru_directory_path: nil,&lt;br /&gt;
  '''''245'''''             email_on_review: true,&lt;br /&gt;
  '''''246'''''             email_on_submission: true,&lt;br /&gt;
  '''''247'''''             email_on_review_of_review: true,&lt;br /&gt;
  '''''248'''''             is_new_user: false,&lt;br /&gt;
  '''''249'''''             master_permission_granted: 0,&lt;br /&gt;
  '''''250'''''             handle: 'handle',&lt;br /&gt;
  '''''251'''''             digital_certificate: nil,&lt;br /&gt;
  '''''252'''''             timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
  '''''253'''''             public_key: nil,&lt;br /&gt;
  '''''254'''''             copy_of_emails: nil,&lt;br /&gt;
  '''''255'''''             institution_id: 666,&lt;br /&gt;
  '''''256'''''             institution: {&lt;br /&gt;
  '''''257'''''                 name: 'yzhu48'&lt;br /&gt;
  '''''258'''''             }&lt;br /&gt;
  '''''259'''''       }&lt;br /&gt;
  '''''260'''''    }  &lt;br /&gt;
  '''''261'''''    post :create, params, session&lt;br /&gt;
  '''''262'''''    allow_any_instance_of(User).to receive(:undo_link).with('The user &amp;quot;instructor6&amp;quot; has been successfully created. ').and_return(true)&lt;br /&gt;
  '''''263'''''    expect(flash[:success]).to eq &amp;quot;A new password has been sent to new user's e-mail address.&amp;quot;&lt;br /&gt;
  '''''264'''''    expect(response).to redirect_to('http://test.host/users/list')&lt;br /&gt;
  '''''265'''''  end&lt;br /&gt;
&lt;br /&gt;
====Test for Task3====&lt;br /&gt;
 We tested if the Institution column was on the page&lt;br /&gt;
  '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;spec/controllers/users_controller_spec.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''18'''''  it &amp;quot;check if instructors show their institutions on the same line as their new feature&amp;quot; do&lt;br /&gt;
  '''''19'''''    create(:superadmin, name: 'super_administrator2')&lt;br /&gt;
  '''''20'''''    login_as('super_administrator2')&lt;br /&gt;
  '''''21'''''    visit &amp;quot;/users/list&amp;quot;&lt;br /&gt;
  '''''22'''''    expect(page.has_content?(&amp;quot;Institution&amp;quot;)).to eq(true)&lt;br /&gt;
  '''''23'''''  end&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Process Video==&lt;br /&gt;
 Video Demonstration for Testing Task1: [https://youtu.be/FXQu1fcbM20 Task1-Video]&lt;br /&gt;
 Video Demonstration for Testing Task2: [https://youtu.be/3BIsI2UpNRo Task2-Video]&lt;br /&gt;
 Video Demonstration for Testing Task3: [https://youtu.be/ZmLfvYLmLTo Task3-Video]&lt;br /&gt;
&lt;br /&gt;
==Project Deployment==&lt;br /&gt;
[http://152.46.17.133:8080/ Expertiza_Team_4430]&lt;br /&gt;
&lt;br /&gt;
==Team Information==&lt;br /&gt;
  '''Team:'''&lt;br /&gt;
  Kai Gao (kgao2@ncsu.edu)&lt;br /&gt;
  psengo (psengo@ncsu.edu)&lt;br /&gt;
  kyao (kyao@ncsu.edu)&lt;br /&gt;
  '''Mentor:''' Yunkai Xiao (yxiao28@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza website]&lt;br /&gt;
&lt;br /&gt;
[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/YongjianZhu/expertiza GitHub Project Repository Fork]&lt;br /&gt;
&lt;br /&gt;
[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2141._OSS_project_Finklestein:_Instructors_%26_Institutions&amp;diff=139450</id>
		<title>CSC/ECE 517 Fall 2021 - E2141. OSS project Finklestein: Instructors &amp; Institutions</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2141._OSS_project_Finklestein:_Instructors_%26_Institutions&amp;diff=139450"/>
		<updated>2021-10-20T18:52:54Z</updated>

		<summary type="html">&lt;p&gt;Kyao: /* Task1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== E2141. OSS project Finklestein: Instructors &amp;amp; Institutions ==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows instructors to manager courses and assignments for students. Students can form up teams in Expertiza to work on different projects and assignments and do peer review about other students' submissions. &lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
 &lt;br /&gt;
* E2141 Project aims to fix the associations problems between the Institution and Instructor class.&lt;br /&gt;
&lt;br /&gt;
* The forked git repository for this project can be found [https://github.com/psengo7/expertiza.git]&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
The following tasks were accomplished in E2141 project:&lt;br /&gt;
&lt;br /&gt;
* Task1: The institution list should be sorted alphabetically.&lt;br /&gt;
** Details: When creating a course, the drop-down list for selecting the institution does not show in alphabetical order.&lt;br /&gt;
  [[File:Origin1.png]]&lt;br /&gt;
&lt;br /&gt;
* Task2: Adding a new institution during creation of an instructor profile.&lt;br /&gt;
** Details: The admin can attempt to create a new institution when creating a new instructor. But, after one types in the name of the institution &amp;amp; clicks create, it crashes.&lt;br /&gt;
  [[File:Origin2.png]]&lt;br /&gt;
&lt;br /&gt;
* Task3: Listing of instructors should show their institutions on the same line as their new feature.&lt;br /&gt;
** Details: When listing users, there is currently no column to display the user’s associated institution.&lt;br /&gt;
  [[File:Origin3.png]]&lt;br /&gt;
&lt;br /&gt;
====Task1====&lt;br /&gt;
As the issue is the Institution drop-down list is not alphabetically sorted. We simply added a step of sort when the Institution list was retrieved from the Database.&lt;br /&gt;
 '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;_course.html.erb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''line3'''''&amp;lt;/font&amp;gt; &amp;lt;%= select(&amp;quot;course&amp;quot;, &amp;quot;institutions_id&amp;quot;, Institution.all&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;.order(:name)&amp;lt;/font&amp;gt;.collect{ |c| [ c.name, c.id] }) %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task2====&lt;br /&gt;
The original issue was that when an admin tries to create a new instructor with a new institution a &amp;quot;No method error in Users#Create&amp;quot; occurs. However when running the program a different issue was seen below...&lt;br /&gt;
&lt;br /&gt;
    [[File:task2_issue.png]]&lt;br /&gt;
&lt;br /&gt;
To resolve this the following lines were commented out in the following files : &lt;br /&gt;
&lt;br /&gt;
 '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;app/controllers/users_controller.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''122'''''&amp;lt;/font&amp;gt;  if @user.save&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''123'''''&amp;lt;/font&amp;gt;    password = @user.reset_password &lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''124'''''   #  prepared_mail = MailerHelper.send_mail_to_user(@user, &amp;quot;Your Expertiza account and password have been created.&amp;quot;, &amp;quot;user_welcome&amp;quot;, password)&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''125'''''    # prepared_mail.deliver&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''126'''''&amp;lt;/font&amp;gt;    flash[:success] = &amp;quot;A new password has been sent to new user's e-mail address.&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;app/models/user.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''149'''''&amp;lt;/font&amp;gt;  # Function which has a MailerHelper which sends the mail welcome email to the user after signing up&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''150'''''&amp;lt;/font&amp;gt;  def email_welcome &lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''151'''''&amp;lt;/font&amp;gt;    # #this will send an account creation notification to user via email.&lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''152'''''    # MailerHelper.send_mail_to_user(self, &amp;quot;Your Expertiza account and password has been created&amp;quot;, &amp;quot;user_welcome&amp;quot;, password).deliver_now prepared_mail.deliver&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''153'''''&amp;lt;/font&amp;gt;  end&lt;br /&gt;
&lt;br /&gt;
This resolved the issues of being able to add an instructor with a newly created institution as seen in the images below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    [[File:Success_task2_part1.png]]&lt;br /&gt;
&lt;br /&gt;
    [[File:Success_task2_part2.png]]&lt;br /&gt;
&lt;br /&gt;
However due to the fact that commenting out the MailHelper could result in cascading issues in other parts of the project we decided that the best action would be to not make changes and notify the mentors of this issue until a proper resolution could be made.&lt;br /&gt;
&lt;br /&gt;
====Task3====&lt;br /&gt;
The issue is that the user page is not displaying the user's associated institution. To fix this issue, we added an 'institution' column in the HTML file retrieving the institution names of each user.&lt;br /&gt;
 '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;app/models/user.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''111'''''  def institution(ip_address = nil)&lt;br /&gt;
 '''''112'''''    if User.anonymized_view?(ip_address)&lt;br /&gt;
 '''''113'''''      self.role.name + ', ' + self.id.to_s&lt;br /&gt;
 '''''114'''''    else&lt;br /&gt;
 '''''115'''''      if self[:role_id] == 2&lt;br /&gt;
 '''''116'''''        self[:institution_id].nil? ? &amp;quot;&amp;quot; : Institution.find(self[:institution_id]).name&lt;br /&gt;
 '''''117'''''      end&lt;br /&gt;
 '''''118'''''    end&lt;br /&gt;
 '''''119'''''  end&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;app/views/users/list.html.erb&amp;lt;/font&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''20'''''&amp;lt;/font&amp;gt;  &amp;lt;tr&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''21'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Name&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''22'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Full Name&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''23'''''      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Institution&amp;lt;/th&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''24'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Email Address&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''25'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Role&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''26'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Parent&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''27'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Review&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''28'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Submission&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''29'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Metareview&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''30'''''&amp;lt;/font&amp;gt;  &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''31'''''&amp;lt;/font&amp;gt;  &amp;lt;% for user in @users %&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''32'''''&amp;lt;/font&amp;gt;    &amp;lt;% if ((params[:show] != 'true' &amp;amp;&amp;amp; !user.name(session[:ip]).include?(&amp;quot;_hidden&amp;quot;)) || params[:show] == 'true')%&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''33'''''&amp;lt;/font&amp;gt;      &amp;lt;tr class=&amp;quot;exp&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''34'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= link_to user.name(session[:ip]), impersonate_impersonate_path(:user =&amp;gt; {:name =&amp;gt; user.name(session[:ip])}), :method =&amp;gt; :post %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''35'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= link_to user.fullname(session[:ip]), :controller=&amp;gt; 'users', :action =&amp;gt; 'show', :id =&amp;gt; user.id %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''36'''''        &amp;lt;td&amp;gt;&amp;lt;%= user.institution(session[:ip]) %&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''37'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= user.email(session[:ip]) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''38'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= link_to user.role.name, :controller =&amp;gt; 'roles', :action =&amp;gt; 'show', :id =&amp;gt; user.role.id %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''39'''''&amp;lt;/font&amp;gt;        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= user.parent.try :name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''40'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= User.yesorno(user.email_on_review) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''41'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= User.yesorno(user.email_on_submission) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''42'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= User.yesorno(user.email_on_review_of_review) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''43'''''&amp;lt;/font&amp;gt;      &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''44'''''&amp;lt;/font&amp;gt;    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''45'''''&amp;lt;/font&amp;gt;  &amp;lt;% end -%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Task Demonstration==&lt;br /&gt;
====Task1====&lt;br /&gt;
 [[File:Task1-1.png]]&lt;br /&gt;
&lt;br /&gt;
====Task2====&lt;br /&gt;
 [[File:Task2-new.png]]&lt;br /&gt;
 [[File:Task2-2-new.png]]&lt;br /&gt;
&lt;br /&gt;
====Task3====&lt;br /&gt;
 [[File:Task2-2-new.png]]&lt;br /&gt;
&lt;br /&gt;
==Test==&lt;br /&gt;
====Test for Task1====&lt;br /&gt;
We created 4 institutions and check if they are alphabetically sorted in the selection box&lt;br /&gt;
  '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;spec/features/course_creation_spec.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''13'''''  it &amp;quot;check if the courses are sorted alphabetically&amp;quot; do&lt;br /&gt;
  '''''14'''''    create(:superadmin, name: 'super_administrator2')&lt;br /&gt;
  '''''15'''''    login_as('super_administrator2')&lt;br /&gt;
  '''''16'''''    visit &amp;quot;/course/new?private=1&amp;quot;&lt;br /&gt;
  '''''17'''''    expect(page.find(:xpath, &amp;quot;//*[@id=\&amp;quot;course_institutions_id\&amp;quot;]/option[1]&amp;quot;).text).to eq(&amp;quot;A&amp;quot;)&lt;br /&gt;
  '''''18'''''    expect(page.find(:xpath, &amp;quot;//*[@id=\&amp;quot;course_institutions_id\&amp;quot;]/option[2]&amp;quot;).text).to eq(&amp;quot;B&amp;quot;)&lt;br /&gt;
  '''''19'''''    expect(page.find(:xpath, &amp;quot;//*[@id=\&amp;quot;course_institutions_id\&amp;quot;]/option[3]&amp;quot;).text).to eq(&amp;quot;C&amp;quot;)&lt;br /&gt;
  '''''20'''''    expect(page.find(:xpath, &amp;quot;//*[@id=\&amp;quot;course_institutions_id\&amp;quot;]/option[4]&amp;quot;).text).to eq(&amp;quot;D&amp;quot;)&lt;br /&gt;
  '''''21'''''  end&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test for Task2====&lt;br /&gt;
 We tried to create a new instructor6 with a new institution name&lt;br /&gt;
  '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;spec/controllers/users_controller_spec.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''233'''''  it 'save successfully with a new institution' do&lt;br /&gt;
  '''''234'''''    session = {user: admin}&lt;br /&gt;
  '''''235'''''    params = {&lt;br /&gt;
  '''''236'''''      user: {name: 'instructor6',&lt;br /&gt;
  '''''237'''''             crypted_password: 'password',&lt;br /&gt;
  '''''238'''''             role_id: 2,&lt;br /&gt;
  '''''239'''''             password_salt: 1,&lt;br /&gt;
  '''''240'''''             fullname: '6, instructor',&lt;br /&gt;
  '''''241'''''             email: 'yzhu48@ncsu.edu',&lt;br /&gt;
  '''''242'''''             parent_id: 1,&lt;br /&gt;
  '''''243'''''             private_by_default: false,&lt;br /&gt;
  '''''244'''''             mru_directory_path: nil,&lt;br /&gt;
  '''''245'''''             email_on_review: true,&lt;br /&gt;
  '''''246'''''             email_on_submission: true,&lt;br /&gt;
  '''''247'''''             email_on_review_of_review: true,&lt;br /&gt;
  '''''248'''''             is_new_user: false,&lt;br /&gt;
  '''''249'''''             master_permission_granted: 0,&lt;br /&gt;
  '''''250'''''             handle: 'handle',&lt;br /&gt;
  '''''251'''''             digital_certificate: nil,&lt;br /&gt;
  '''''252'''''             timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
  '''''253'''''             public_key: nil,&lt;br /&gt;
  '''''254'''''             copy_of_emails: nil,&lt;br /&gt;
  '''''255'''''             institution_id: 666,&lt;br /&gt;
  '''''256'''''             institution: {&lt;br /&gt;
  '''''257'''''                 name: 'yzhu48'&lt;br /&gt;
  '''''258'''''             }&lt;br /&gt;
  '''''259'''''       }&lt;br /&gt;
  '''''260'''''    }  &lt;br /&gt;
  '''''261'''''    post :create, params, session&lt;br /&gt;
  '''''262'''''    allow_any_instance_of(User).to receive(:undo_link).with('The user &amp;quot;instructor6&amp;quot; has been successfully created. ').and_return(true)&lt;br /&gt;
  '''''263'''''    expect(flash[:success]).to eq &amp;quot;A new password has been sent to new user's e-mail address.&amp;quot;&lt;br /&gt;
  '''''264'''''    expect(response).to redirect_to('http://test.host/users/list')&lt;br /&gt;
  '''''265'''''  end&lt;br /&gt;
&lt;br /&gt;
====Test for Task3====&lt;br /&gt;
 We tested if the Institution column was on the page&lt;br /&gt;
  '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;spec/controllers/users_controller_spec.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''18'''''  it &amp;quot;check if instructors show their institutions on the same line as their new feature&amp;quot; do&lt;br /&gt;
  '''''19'''''    create(:superadmin, name: 'super_administrator2')&lt;br /&gt;
  '''''20'''''    login_as('super_administrator2')&lt;br /&gt;
  '''''21'''''    visit &amp;quot;/users/list&amp;quot;&lt;br /&gt;
  '''''22'''''    expect(page.has_content?(&amp;quot;Institution&amp;quot;)).to eq(true)&lt;br /&gt;
  '''''23'''''  end&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Process Video==&lt;br /&gt;
 Video Demonstration for Testing Task1: [https://youtu.be/FXQu1fcbM20 Task1-Video]&lt;br /&gt;
 Video Demonstration for Testing Task2: [https://youtu.be/3BIsI2UpNRo Task2-Video]&lt;br /&gt;
 Video Demonstration for Testing Task3: [https://youtu.be/ZmLfvYLmLTo Task3-Video]&lt;br /&gt;
&lt;br /&gt;
==Project Deployment==&lt;br /&gt;
[http://152.46.17.133:8080/ Expertiza_Team_4430]&lt;br /&gt;
&lt;br /&gt;
==Team Information==&lt;br /&gt;
  '''Team:'''&lt;br /&gt;
  Kai Gao (kgao2@ncsu.edu)&lt;br /&gt;
  psengo (psengo@ncsu.edu)&lt;br /&gt;
  kyao (kyao@ncsu.edu)&lt;br /&gt;
  '''Mentor:''' Yunkai Xiao (yxiao28@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza website]&lt;br /&gt;
&lt;br /&gt;
[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/YongjianZhu/expertiza GitHub Project Repository Fork]&lt;br /&gt;
&lt;br /&gt;
[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2141._OSS_project_Finklestein:_Instructors_%26_Institutions&amp;diff=139449</id>
		<title>CSC/ECE 517 Fall 2021 - E2141. OSS project Finklestein: Instructors &amp; Institutions</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2141._OSS_project_Finklestein:_Instructors_%26_Institutions&amp;diff=139449"/>
		<updated>2021-10-20T18:51:55Z</updated>

		<summary type="html">&lt;p&gt;Kyao: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== E2141. OSS project Finklestein: Instructors &amp;amp; Institutions ==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows instructors to manager courses and assignments for students. Students can form up teams in Expertiza to work on different projects and assignments and do peer review about other students' submissions. &lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
 &lt;br /&gt;
* E2141 Project aims to fix the associations problems between the Institution and Instructor class.&lt;br /&gt;
&lt;br /&gt;
* The forked git repository for this project can be found [https://github.com/psengo7/expertiza.git]&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
The following tasks were accomplished in E2141 project:&lt;br /&gt;
&lt;br /&gt;
* Task1: The institution list should be sorted alphabetically.&lt;br /&gt;
** Details: When creating a course, the drop-down list for selecting the institution does not show in alphabetical order.&lt;br /&gt;
  [[File:Origin1.png]]&lt;br /&gt;
&lt;br /&gt;
* Task2: Adding a new institution during creation of an instructor profile.&lt;br /&gt;
** Details: The admin can attempt to create a new institution when creating a new instructor. But, after one types in the name of the institution &amp;amp; clicks create, it crashes.&lt;br /&gt;
  [[File:Origin2.png]]&lt;br /&gt;
&lt;br /&gt;
* Task3: Listing of instructors should show their institutions on the same line as their new feature.&lt;br /&gt;
** Details: When listing users, there is currently no column to display the user’s associated institution.&lt;br /&gt;
  [[File:Origin3.png]]&lt;br /&gt;
&lt;br /&gt;
====Task1====&lt;br /&gt;
As the issue is the Institution drop-down list is not alphabetically sorted. We simply added a step of sort when the Institution list was retrieved from the Database.&lt;br /&gt;
 '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;_course.html.erb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''line3'''''&amp;lt;/font&amp;gt; &amp;lt;%= select(&amp;quot;course&amp;quot;, &amp;quot;institutions_id&amp;quot;, Institution.all&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;.order(:name)&amp;lt;/font&amp;gt;.collect{ |c| [ c.name, c.id] }) %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Task2====&lt;br /&gt;
The original issue was that when an admin tries to create a new instructor with a new institution a &amp;quot;No method error in Users#Create&amp;quot; occurs. However when running the program a different issue was seen below...&lt;br /&gt;
&lt;br /&gt;
    [[File:task2_issue.png]]&lt;br /&gt;
&lt;br /&gt;
To resolve this the following lines were commented out in the following files : &lt;br /&gt;
&lt;br /&gt;
 '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;app/controllers/users_controller.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''122'''''&amp;lt;/font&amp;gt;  if @user.save&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''123'''''&amp;lt;/font&amp;gt;    password = @user.reset_password &lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''124'''''   #  prepared_mail = MailerHelper.send_mail_to_user(@user, &amp;quot;Your Expertiza account and password have been created.&amp;quot;, &amp;quot;user_welcome&amp;quot;, password)&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''125'''''    # prepared_mail.deliver&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''126'''''&amp;lt;/font&amp;gt;    flash[:success] = &amp;quot;A new password has been sent to new user's e-mail address.&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;app/models/user.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''149'''''&amp;lt;/font&amp;gt;  # Function which has a MailerHelper which sends the mail welcome email to the user after signing up&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''150'''''&amp;lt;/font&amp;gt;  def email_welcome &lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''151'''''&amp;lt;/font&amp;gt;    # #this will send an account creation notification to user via email.&lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''152'''''    # MailerHelper.send_mail_to_user(self, &amp;quot;Your Expertiza account and password has been created&amp;quot;, &amp;quot;user_welcome&amp;quot;, password).deliver_now prepared_mail.deliver&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''153'''''&amp;lt;/font&amp;gt;  end&lt;br /&gt;
&lt;br /&gt;
This resolved the issues of being able to add an instructor with a newly created institution as seen in the images below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    [[File:Success_task2_part1.png]]&lt;br /&gt;
&lt;br /&gt;
    [[File:Success_task2_part2.png]]&lt;br /&gt;
&lt;br /&gt;
However due to the fact that commenting out the MailHelper could result in cascading issues in other parts of the project we decided that the best action would be to not make changes and notify the mentors of this issue until a proper resolution could be made.&lt;br /&gt;
&lt;br /&gt;
====Task3====&lt;br /&gt;
The issue is that the user page is not displaying the user's associated institution. To fix this issue, we added an 'institution' column in the HTML file retrieving the institution names of each user.&lt;br /&gt;
 '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;app/models/user.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''111'''''  def institution(ip_address = nil)&lt;br /&gt;
 '''''112'''''    if User.anonymized_view?(ip_address)&lt;br /&gt;
 '''''113'''''      self.role.name + ', ' + self.id.to_s&lt;br /&gt;
 '''''114'''''    else&lt;br /&gt;
 '''''115'''''      if self[:role_id] == 2&lt;br /&gt;
 '''''116'''''        self[:institution_id].nil? ? &amp;quot;&amp;quot; : Institution.find(self[:institution_id]).name&lt;br /&gt;
 '''''117'''''      end&lt;br /&gt;
 '''''118'''''    end&lt;br /&gt;
 '''''119'''''  end&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;app/views/users/list.html.erb&amp;lt;/font&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''20'''''&amp;lt;/font&amp;gt;  &amp;lt;tr&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''21'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Name&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''22'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Full Name&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''23'''''      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Institution&amp;lt;/th&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''24'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Email Address&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''25'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Role&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''26'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Parent&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''27'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Review&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''28'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Submission&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''29'''''&amp;lt;/font&amp;gt;      &amp;lt;th class=&amp;quot;head&amp;quot;&amp;gt;Metareview&amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''30'''''&amp;lt;/font&amp;gt;  &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''31'''''&amp;lt;/font&amp;gt;  &amp;lt;% for user in @users %&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''32'''''&amp;lt;/font&amp;gt;    &amp;lt;% if ((params[:show] != 'true' &amp;amp;&amp;amp; !user.name(session[:ip]).include?(&amp;quot;_hidden&amp;quot;)) || params[:show] == 'true')%&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''33'''''&amp;lt;/font&amp;gt;      &amp;lt;tr class=&amp;quot;exp&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''34'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= link_to user.name(session[:ip]), impersonate_impersonate_path(:user =&amp;gt; {:name =&amp;gt; user.name(session[:ip])}), :method =&amp;gt; :post %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''35'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= link_to user.fullname(session[:ip]), :controller=&amp;gt; 'users', :action =&amp;gt; 'show', :id =&amp;gt; user.id %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''36'''''        &amp;lt;td&amp;gt;&amp;lt;%= user.institution(session[:ip]) %&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''37'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= user.email(session[:ip]) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''38'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= link_to user.role.name, :controller =&amp;gt; 'roles', :action =&amp;gt; 'show', :id =&amp;gt; user.role.id %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''39'''''&amp;lt;/font&amp;gt;        &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%= user.parent.try :name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''40'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= User.yesorno(user.email_on_review) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''41'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= User.yesorno(user.email_on_submission) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''42'''''&amp;lt;/font&amp;gt;        &amp;lt;td&amp;gt;&amp;lt;%= User.yesorno(user.email_on_review_of_review) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''43'''''&amp;lt;/font&amp;gt;      &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''44'''''&amp;lt;/font&amp;gt;    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;grey&amp;quot;&amp;gt;'''''45'''''&amp;lt;/font&amp;gt;  &amp;lt;% end -%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Task Demonstration==&lt;br /&gt;
====Task1====&lt;br /&gt;
 [[File:Task1-new.png]]&lt;br /&gt;
====Task2====&lt;br /&gt;
 [[File:Task2-new.png]]&lt;br /&gt;
 [[File:Task2-2-new.png]]&lt;br /&gt;
&lt;br /&gt;
====Task3====&lt;br /&gt;
 [[File:Task2-2-new.png]]&lt;br /&gt;
&lt;br /&gt;
==Test==&lt;br /&gt;
====Test for Task1====&lt;br /&gt;
We created 4 institutions and check if they are alphabetically sorted in the selection box&lt;br /&gt;
  '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;spec/features/course_creation_spec.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''13'''''  it &amp;quot;check if the courses are sorted alphabetically&amp;quot; do&lt;br /&gt;
  '''''14'''''    create(:superadmin, name: 'super_administrator2')&lt;br /&gt;
  '''''15'''''    login_as('super_administrator2')&lt;br /&gt;
  '''''16'''''    visit &amp;quot;/course/new?private=1&amp;quot;&lt;br /&gt;
  '''''17'''''    expect(page.find(:xpath, &amp;quot;//*[@id=\&amp;quot;course_institutions_id\&amp;quot;]/option[1]&amp;quot;).text).to eq(&amp;quot;A&amp;quot;)&lt;br /&gt;
  '''''18'''''    expect(page.find(:xpath, &amp;quot;//*[@id=\&amp;quot;course_institutions_id\&amp;quot;]/option[2]&amp;quot;).text).to eq(&amp;quot;B&amp;quot;)&lt;br /&gt;
  '''''19'''''    expect(page.find(:xpath, &amp;quot;//*[@id=\&amp;quot;course_institutions_id\&amp;quot;]/option[3]&amp;quot;).text).to eq(&amp;quot;C&amp;quot;)&lt;br /&gt;
  '''''20'''''    expect(page.find(:xpath, &amp;quot;//*[@id=\&amp;quot;course_institutions_id\&amp;quot;]/option[4]&amp;quot;).text).to eq(&amp;quot;D&amp;quot;)&lt;br /&gt;
  '''''21'''''  end&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test for Task2====&lt;br /&gt;
 We tried to create a new instructor6 with a new institution name&lt;br /&gt;
  '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;spec/controllers/users_controller_spec.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''233'''''  it 'save successfully with a new institution' do&lt;br /&gt;
  '''''234'''''    session = {user: admin}&lt;br /&gt;
  '''''235'''''    params = {&lt;br /&gt;
  '''''236'''''      user: {name: 'instructor6',&lt;br /&gt;
  '''''237'''''             crypted_password: 'password',&lt;br /&gt;
  '''''238'''''             role_id: 2,&lt;br /&gt;
  '''''239'''''             password_salt: 1,&lt;br /&gt;
  '''''240'''''             fullname: '6, instructor',&lt;br /&gt;
  '''''241'''''             email: 'yzhu48@ncsu.edu',&lt;br /&gt;
  '''''242'''''             parent_id: 1,&lt;br /&gt;
  '''''243'''''             private_by_default: false,&lt;br /&gt;
  '''''244'''''             mru_directory_path: nil,&lt;br /&gt;
  '''''245'''''             email_on_review: true,&lt;br /&gt;
  '''''246'''''             email_on_submission: true,&lt;br /&gt;
  '''''247'''''             email_on_review_of_review: true,&lt;br /&gt;
  '''''248'''''             is_new_user: false,&lt;br /&gt;
  '''''249'''''             master_permission_granted: 0,&lt;br /&gt;
  '''''250'''''             handle: 'handle',&lt;br /&gt;
  '''''251'''''             digital_certificate: nil,&lt;br /&gt;
  '''''252'''''             timezonepref: 'Eastern Time (US &amp;amp; Canada)',&lt;br /&gt;
  '''''253'''''             public_key: nil,&lt;br /&gt;
  '''''254'''''             copy_of_emails: nil,&lt;br /&gt;
  '''''255'''''             institution_id: 666,&lt;br /&gt;
  '''''256'''''             institution: {&lt;br /&gt;
  '''''257'''''                 name: 'yzhu48'&lt;br /&gt;
  '''''258'''''             }&lt;br /&gt;
  '''''259'''''       }&lt;br /&gt;
  '''''260'''''    }  &lt;br /&gt;
  '''''261'''''    post :create, params, session&lt;br /&gt;
  '''''262'''''    allow_any_instance_of(User).to receive(:undo_link).with('The user &amp;quot;instructor6&amp;quot; has been successfully created. ').and_return(true)&lt;br /&gt;
  '''''263'''''    expect(flash[:success]).to eq &amp;quot;A new password has been sent to new user's e-mail address.&amp;quot;&lt;br /&gt;
  '''''264'''''    expect(response).to redirect_to('http://test.host/users/list')&lt;br /&gt;
  '''''265'''''  end&lt;br /&gt;
&lt;br /&gt;
====Test for Task3====&lt;br /&gt;
 We tested if the Institution column was on the page&lt;br /&gt;
  '''Changed files:''' &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;spec/controllers/users_controller_spec.rb&amp;lt;/font&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
  &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;'''''18'''''  it &amp;quot;check if instructors show their institutions on the same line as their new feature&amp;quot; do&lt;br /&gt;
  '''''19'''''    create(:superadmin, name: 'super_administrator2')&lt;br /&gt;
  '''''20'''''    login_as('super_administrator2')&lt;br /&gt;
  '''''21'''''    visit &amp;quot;/users/list&amp;quot;&lt;br /&gt;
  '''''22'''''    expect(page.has_content?(&amp;quot;Institution&amp;quot;)).to eq(true)&lt;br /&gt;
  '''''23'''''  end&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Process Video==&lt;br /&gt;
 Video Demonstration for Testing Task1: [https://youtu.be/FXQu1fcbM20 Task1-Video]&lt;br /&gt;
 Video Demonstration for Testing Task2: [https://youtu.be/3BIsI2UpNRo Task2-Video]&lt;br /&gt;
 Video Demonstration for Testing Task3: [https://youtu.be/ZmLfvYLmLTo Task3-Video]&lt;br /&gt;
&lt;br /&gt;
==Project Deployment==&lt;br /&gt;
[http://152.46.17.133:8080/ Expertiza_Team_4430]&lt;br /&gt;
&lt;br /&gt;
==Team Information==&lt;br /&gt;
  '''Team:'''&lt;br /&gt;
  Kai Gao (kgao2@ncsu.edu)&lt;br /&gt;
  psengo (psengo@ncsu.edu)&lt;br /&gt;
  kyao (kyao@ncsu.edu)&lt;br /&gt;
  '''Mentor:''' Yunkai Xiao (yxiao28@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza website]&lt;br /&gt;
&lt;br /&gt;
[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/YongjianZhu/expertiza GitHub Project Repository Fork]&lt;br /&gt;
&lt;br /&gt;
[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Task3-1.png&amp;diff=139444</id>
		<title>File:Task3-1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Task3-1.png&amp;diff=139444"/>
		<updated>2021-10-20T18:48:06Z</updated>

		<summary type="html">&lt;p&gt;Kyao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Task1-1.png&amp;diff=139442</id>
		<title>File:Task1-1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Task1-1.png&amp;diff=139442"/>
		<updated>2021-10-20T18:47:55Z</updated>

		<summary type="html">&lt;p&gt;Kyao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Origin3.png&amp;diff=139441</id>
		<title>File:Origin3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Origin3.png&amp;diff=139441"/>
		<updated>2021-10-20T18:46:47Z</updated>

		<summary type="html">&lt;p&gt;Kyao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Origin2.png&amp;diff=139439</id>
		<title>File:Origin2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Origin2.png&amp;diff=139439"/>
		<updated>2021-10-20T18:46:27Z</updated>

		<summary type="html">&lt;p&gt;Kyao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Origin1.png&amp;diff=139438</id>
		<title>File:Origin1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Origin1.png&amp;diff=139438"/>
		<updated>2021-10-20T18:46:13Z</updated>

		<summary type="html">&lt;p&gt;Kyao: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kyao</name></author>
	</entry>
</feed>