talview / moodle-quizaccess_proctor

GNU General Public License v3.0
1 stars 0 forks source link

Revert "Take additional SB Config from FE" #54

Closed rohansharmasitoula closed 2 weeks ago

rohansharmasitoula commented 1 month ago

Reverts talview/moodle-quizaccess_proctor#52

codiumai-pr-agent-pro[bot] commented 1 month ago

PR Reviewer Guide ๐Ÿ”

Here are some key observations to aid the review process:

**๐ŸŽซ Ticket compliance analysis โŒ** **[52](https://github.com/talview/moodle-quizaccess_proctor/issues/52) - Not compliant** Not compliant requirements: - Add new secure browser configuration fields to event data - Define new properties for secure browser settings - Update CKEditor script version - Add form elements for secure browser configurations - Add language strings for new secure browser settings - Update plugin version and build number
โฑ๏ธ Estimated effort to review: 3 ๐Ÿ”ต๐Ÿ”ต๐Ÿ”ตโšชโšช
๐Ÿงช No relevant tests
๐Ÿ”’ No security concerns identified
โšก Recommended focus areas for review

Removed Functionality
The PR removes fields related to blacklisted software and security settings from the event data. Removed Properties
The PR removes properties for blacklisted software and security settings from the quiz settings. Removed Form Elements
The PR removes form elements for secure browser configurations, including blacklisted software and security settings. Removed Upgrade Step
The PR removes an upgrade step that was adding new fields to the quizaccess_proctor table. Removed Language Strings
The PR removes language strings related to blacklisted software and security settings.
codiumai-pr-agent-pro[bot] commented 1 month ago

PR Code Suggestions โœจ

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Score
Enhancement
Simplify conditional assignment using a more concise ternary operator ___ **Consider using a ternary operator for $eventdata->proctoring_type to simplify the
code and improve readability.** [classes/observer.php [93]](https://github.com/talview/moodle-quizaccess_proctor/pull/54/files#diff-38a8807f90f0ee92d3bbe9ecaf36eb165e825541fb514b12ddca072620fc0f41R93-R93) ```diff -$eventdata->proctoring_type = ($quiz_proctor_settings->proctortype == 'noproctor') ? NULL : $quiz_proctor_settings->proctortype; +$eventdata->proctoring_type = $quiz_proctor_settings->proctortype == 'noproctor' ? null : $quiz_proctor_settings->proctortype; ``` - [ ] **Apply this suggestion**
Suggestion importance[1-10]: 7 Why:
7
Simplify conditional assignment using the null coalescing operator ___ **Consider using the null coalescing operator (??) instead of isset() for cleaner and
more concise code when checking and assigning values.** [rule.php [173]](https://github.com/talview/moodle-quizaccess_proctor/pull/54/files#diff-46982b177d48791b7d8c2bd50e54e4dcfe70642870f2e5a13de184f3ceba7e49R173-R173) ```diff -$proctordata->tsbenabled = (isset($quiz->tsbenabled) && $quiz->tsbenabled) ? 1 : 0; +$proctordata->tsbenabled = ($quiz->tsbenabled ?? 0) ? 1 : 0; ``` - [ ] **Apply this suggestion**
Suggestion importance[1-10]: 7 Why:
7
Best practice
Use strict comparison for more reliable string matching ___ **Use type-safe comparison (===) instead of loose comparison (==) for string
comparison to ensure both type and value are checked.** [classes/observer.php [92]](https://github.com/talview/moodle-quizaccess_proctor/pull/54/files#diff-38a8807f90f0ee92d3bbe9ecaf36eb165e825541fb514b12ddca072620fc0f41R92-R92) ```diff -$eventdata->proctoring_enabled = !($quiz_proctor_settings->proctortype == 'noproctor'); +$eventdata->proctoring_enabled = !($quiz_proctor_settings->proctortype === 'noproctor'); ``` - [ ] **Apply this suggestion**
Suggestion importance[1-10]: 7 Why:
7
Adopt semantic versioning for clearer version representation ___ **Consider using semantic versioning for the plugin version number to better reflect
the nature of changes (major, minor, patch).** [version.php [27]](https://github.com/talview/moodle-quizaccess_proctor/pull/54/files#diff-0dc418129946563e59bb69680a5ef0ded4329ed9e56e3d295c25e12ea726726bR27-R27) ```diff -$plugin->version = 2024042401; +$plugin->version = 2024040100; // Represents version 1.4.0 ``` - [ ] **Apply this suggestion**
Suggestion importance[1-10]: 7 Why:
7

๐Ÿ’ก Need additional feedback ? start a PR chat