Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cleaning-portalmec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Richard Fernando Heise Ferreira
cleaning-portalmec
Commits
fa588b8e
Commit
fa588b8e
authored
3 years ago
by
Israel Barreto Sant'Anna
Browse files
Options
Downloads
Patches
Plain Diff
Fixed submission answer and activity error
parent
e4d28d8a
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/models/concerns/trackable.rb
+2
-2
2 additions, 2 deletions
app/models/concerns/trackable.rb
app/models/learning_object.rb
+1
-1
1 addition, 1 deletion
app/models/learning_object.rb
app/models/submission.rb
+1
-1
1 addition, 1 deletion
app/models/submission.rb
with
4 additions
and
4 deletions
app/models/concerns/trackable.rb
+
2
−
2
View file @
fa588b8e
...
...
@@ -29,9 +29,9 @@ module Trackable
end
def
new_update_activity
return
nil
if
change
d
.
blank?
return
nil
if
previous_
change
s
.
blank?
return
new_activity
(
:update
)
if
ignore_changes
==
%w(updated_at)
filtered
=
change
d
.
reject
{
|
x
|
ignore_changes
.
include?
(
x
)
}
filtered
=
previous_
change
s
.
reject
{
|
x
|
ignore_changes
.
include?
(
x
)
}
new_activity
(
:update
)
unless
filtered
.
empty?
end
...
...
This diff is collapsed.
Click to expand it.
app/models/learning_object.rb
+
1
−
1
View file @
fa588b8e
...
...
@@ -79,7 +79,7 @@ class LearningObject < ApplicationRecord
belongs_to
:license
,
optional:
true
belongs_to
:object_type
,
optional:
true
belongs_to
:attachment
,
class_name:
'LearningObject::Attachment'
,
optional:
true
has_one
:submission
,
dependent: :destroy
has_one
:submission
validates
:name
,
:publisher
,
:object_type
,
:author
,
presence:
true
,
unless: :draft?
validates
:language
,
unless: :draft?
,
:length
=>
{
:minimum
=>
1
}
...
...
This diff is collapsed.
Click to expand it.
app/models/submission.rb
+
1
−
1
View file @
fa588b8e
...
...
@@ -49,7 +49,7 @@ class Submission < ApplicationRecord
after_update
:update_status
def
update_status
if
curator_id_changed?
if
curator_id_
previously_
changed?
curator_assignments
.
each
do
|
ca
|
if
ca
.
user
==
curator
ca
.
answered!
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment